Postfix Sending as Localhost 127.0.0.1

Discussion in 'ISPConfig 3 Priority Support' started by rgwilliams20, Sep 2, 2016.

  1. rgwilliams20

    rgwilliams20 New Member HowtoForge Supporter

    Hi,
    I have an ISP Config 3 (latest stable version) installed on CentOS 6 following the perfect server guide.
    However when sending emails I get the following when sending to Gmail:

    relay=ASPMX.L.GOOGLE.COM[2a00:1450:400c:c06::1a]:25, delay=0.55, delays=0.04/0.05/0.12/0.35, dsn=5.7.1, status=bounced (host ASPMX.L.GOOGLE.COM[2a00:1450:400c:c06::1a] said: 550-5.7.1 [2a01:4f8:212:2495::2] Our system has detected that this message does 550-5.7.1 not meet IPv6 sending guidelines regarding PTR records and 550-5.7.1 authentication. Please review 550-5.7.1 https://support.google.com/mail/?p=ipv6_authentication_error for more 550 5.7.1 information

    This is because Postfix is sending with Localhost 127.0.0.1 in the headers.

    Result of postconf -n below
    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    body_checks = regexp:/etc/postfix/body_checks
    broken_sasl_auth_clients = yes
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    content_filter = amavis:[127.0.0.1]:10024
    daemon_directory = /usr/libexec/postfix
    data_directory = /var/lib/postfix
    debug_peer_level = 2
    header_checks = regexp:/etc/postfix/header_checks
    html_directory = no
    inet_interfaces = all
    inet_protocols = all
    mail_owner = postfix
    mailbox_size_limit = 0
    mailq_path = /usr/bin/mailq.postfix
    manpage_directory = /usr/share/man
    message_size_limit = 0
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    mydestination = server1.mydomain.co.uk, localhost, localhost.localdomain
    myhostname = server1.mydomain.co.uk
    mynetworks = 127.0.0.0/8 [::1]/128
    myorigin = $myhostname
    nested_header_checks = regexp:/etc/postfix/nested_header_checks
    newaliases_path = /usr/bin/newaliases.postfix
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
    receive_override_options = no_address_mappings
    relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
    relayhost =
    sample_directory = /usr/share/doc/postfix-2.6.6/samples
    sendmail_path = /usr/sbin/sendmail.postfix
    setgid_group = postdrop
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtp_sasl_security_options = noanonymous
    smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
    smtp_tls_protocols = !SSLv2,!SSLv3
    smtp_tls_security_level = may
    smtpd_client_message_rate_limit = 100
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_sasl_path = private/auth
    smtpd_sasl_type = dovecot
    smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
    smtpd_tls_protocols = !SSLv2,!SSLv3
    smtpd_tls_security_level = may
    smtpd_use_tls = yes
    transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    unknown_local_recipient_reject_code = 550
    virtual_alias_domains =
    virtual_alias_maps = hash:/etc/mailman/virtual-mailman, proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_gid_maps = static:5000
    virtual_mailbox_base = /var/vmail
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_transport = dovecot
    virtual_uid_maps = static:5000

    Any help would be appreciated
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Very unlikely that this is the cause as most mail servers with internal scanner have localhost in the headers for the internal scanning and they have no problems to send to gmail. The error message that you posted is not about localhost, it says that your IPv6 address is missing a PTR record.
     
  3. rgwilliams20

    rgwilliams20 New Member HowtoForge Supporter

    Hi,
    These are the email headers for the mail that was sent:

    Return-Path: <[email protected]>
    Received: from server1.mydomain.co.uk (unknown [127.0.0.1])
    by server1.mydomain.co.uk (Postfix) with ESMTP id 908DF2340340
    for <[email protected]>; Fri, 2 Sep 2016 15:06:26 +0000 (UTC)
    X-Virus-Scanned: amavisd-new at server1.mydomain.co.uk
    Received: by server1.mydomain.co.uk (Postfix, from userid 48)
    id 91204234034E; Fri, 2 Sep 2016 17:06:25 +0200 (CEST)
    Received: from {IP ADDRESS}
    (SquirrelMail authenticated user [email protected])
    by with HTTP;
    Fri, 2 Sep 2016 15:06:25 -0000
    Message-ID: <[email protected]k>
    Date: Fri, 2 Sep 2016 15:06:25 -0000
    Subject: test
    From: [email protected]
    User-Agent: SquirrelMail/1.4.22-4.el6
    MIME-Version: 1.0
    Content-Type: text/plain;charset=iso-8859-1
    Content-Transfer-Encoding: 8bit
    X-Priority: 3 (Normal)
    Importance: Normal

    I think Google is trying to retrieve a PTR record for 127.0.0.1 which is why I am getting this error
     
  4. rgwilliams20

    rgwilliams20 New Member HowtoForge Supporter

    I get the same issue no matter how I send emails, webmail, shell, etc etc
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    No, your problem is not related to the localhost lines in any way. Googles error message is clear and it refers to a missing PTR record for the external IPv6 address of your server.

    Yes, the reason is the missing IPv6 PTR record of your external IPv6 IP address as google pointed out in the error message that you posted above.

    Regarding the localhost line for your server name, that is most likely a problem in your /etc/hosts file. ensure that your server hostname is listed there only with your external IP, not for 127.0.0.1
     

Share This Page