Postfix Sending as Localhost

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

  1. rgwilliams20

    rgwilliams20 New Member

    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 for more 550 5.7.1 information

    This is because Postfix is sending with Localhost 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:[]: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 =, localhost, localhost.localdomain
    myhostname =
    mynetworks = [::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/
    relay_recipient_maps = mysql:/etc/postfix/
    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/
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_recipient_access mysql:/etc/postfix/
    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/
    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/
    unknown_local_recipient_reject_code = 550
    virtual_alias_domains =
    virtual_alias_maps = hash:/etc/mailman/virtual-mailman, proxy:mysql:/etc/postfix/, proxy:mysql:/etc/postfix/
    virtual_gid_maps = static:5000
    virtual_mailbox_base = /var/vmail
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/
    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

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

    Return-Path: <[email protected]>
    Received: from (unknown [])
    by (Postfix) with ESMTP id 908DF2340340
    for <[email protected]>; Fri, 2 Sep 2016 15:06:26 +0000 (UTC)
    X-Virus-Scanned: amavisd-new at
    Received: by (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: <>
    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 which is why I am getting this error
  4. rgwilliams20

    rgwilliams20 New Member

    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

Share This Page