postfix backup mx server - mangled to/from addresses

Discussion in 'Server Operation' started by nhybgtvfr, Mar 26, 2015.

  1. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    hi,
    I'm new to postfix and am trying to setup a new backup mx server to another postfix server hosting hundreds of domains.
    I've got it working, receiving mail ( testing from cli using telnet ) and forwarding it to the main server, but using squirrelmail to look at the mail on server, the from address is unknown, if I use the pop3 connector from gmail to collect the mail from the server, then in gmail I get the to address in the from field, and a blank to address. but everything looks fine in the logs.

    telnet send mail:
    220 mail3.scl.co.uk ESMTP Postfix (Ubuntu)
    EHLO gmail.com
    250-mail3.scl.co.uk
    250-PIPELINING
    250-SIZE 10240000
    250-VRFY
    250-ETRN
    250-STARTTLS
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 DSN
    mail from: [email protected]
    250 2.1.0 Ok
    rcpt to:[email protected]
    250 2.1.5 Ok
    data
    354 End data with <CR><LF>.<CR><LF>
    subject: new relay test
    test relay from mail3
    .
    250 2.0.0 Ok: queued as B5BFF6444C
    quit
    221 2.0.0 Bye

    backup mx server log:
    Mar 26 15:25:11 dr1 postfix/smtpd[6199]: connect from 84-45-154-103.static.enta.net[84.45.154.103]
    Mar 26 15:25:28 dr1 postfix/smtpd[6199]: B5BFF6444C: client=84-45-154-103.static.enta.net[84.45.154.103]
    Mar 26 15:25:50 dr1 postfix/cleanup[6208]: B5BFF6444C: message-id=<>
    Mar 26 15:25:50 dr1 postfix/qmgr[5536]: B5BFF6444C: from=<redacted@gmail.com>, size=241, nrcpt=1 (queue active)
    Mar 26 15:25:50 dr1 postfix/smtp[6205]: B5BFF6444C: to=<redacted@scl.co.uk>, relay=mail.scl.co.uk[213.146.180.232]:25, delay=30, delays=29/0/0.28/0.11, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 60F5C35E5)
    Mar 26 15:25:50 dr1 postfix/qmgr[5536]: B5BFF6444C: removed
    Mar 26 15:25:55 dr1 postfix/smtpd[6199]: disconnect from 84-45-154-103.static.enta.net[84.45.154.103]

    main server log:
    Mar 26 15:25:50 mail postfix/smtpd[24245]: connect from unknown[46.101.50.214]
    Mar 26 15:25:50 mail postgrey[1121]: action=pass, reason=triplet found, client_name=unknown, client_address=46.101.50.214, [email protected], [email protected]
    Mar 26 15:25:50 mail postfix/smtpd[24245]: 60F5C35E5: client=unknown[46.101.50.214]
    Mar 26 15:25:50 mail postfix/cleanup[24852]: 60F5C35E5: message-id=<>
    Mar 26 15:25:50 mail postfix/qmgr[2980]: 60F5C35E5: from=<redacted@gmail.com>, size=414, nrcpt=1 (queue active)
    Mar 26 15:25:50 mail postfix/smtpd[24245]: disconnect from unknown[46.101.50.214]
    Mar 26 15:25:50 mail postfix/virtual[22438]: 60F5C35E5: to=<redacted@scl.co.uk>, relay=virtual, delay=0.11, delays=0.1/0/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
    Mar 26 15:25:50 mail postfix/qmgr[2980]: 60F5C35E5: removed

    postconf -n :
    append_dot_mydomain = no
    biff = no
    config_directory = /etc/postfix
    html_directory = /usr/share/doc/postfix/html
    inet_interfaces = all
    inet_protocols = all
    mailbox_size_limit = 0
    maximal_queue_lifetime = 30d
    mydestination =
    myhostname = mail3.scl.co.uk
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
    readme_directory = /usr/share/doc/postfix
    recipient_delimiter = +
    relay_domains = mysql:/etc/postfix/mysql_domains.cf
    relay_recipient_maps =
    relayhost =
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated reject_un auth_destination
    smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
    smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtpd_use_tls = yes
    transport_maps = hash:/etc/postfix/transportmaps

    squirrelmail headers:
    Return-Path: <redacted@gmail.com>X-Original-To: redacted@scl.co.uk
    Delivered-To: redacted@scl.co.uk
    Received: from mail3.scl.co.uk (unknown [46.101.50.214])
    by mail.scl.co.uk (Postfix) with ESMTP id 60F5C35E5
    for <redacted@scl.co.uk>; Thu, 26 Mar 2015 15:25:50 +0000 (GMT)
    Received: from gmail.com (84-45-154-103.static.enta.net [84.45.154.103])
    by mail3.scl.co.uk (Postfix) with ESMTP id B5BFF6444C
    for <redacted@scl.co.uk>; Thu, 26 Mar 2015 15:25:20 +0000 (GMT)
    subject: new relay test

    gmail view:
    new relay test

    [​IMG]redacted@scl.co.uk 15:54 (1 minute ago)
    [​IMG]
    [​IMG]
    [​IMG]
    to
    [​IMG]
    test relay from mail3

    gmail headers:
    Delivered-To: redacted@sclinternet.co.uk
    Received: by 10.229.29.3 with SMTP id o3csp570347qcc;
    Thu, 26 Mar 2015 08:55:03 -0700 (PDT)
    X-Received: by 10.55.55.8 with SMTP id e8mr31081724qka.9.1427385273233;
    Thu, 26 Mar 2015 08:54:33 -0700 (PDT)
    Authentication-Results: mx.google.com;
    spf=softfail (google.com: domain of transitioning [email protected] does not designate 46.101.50.214 as permitted sender) [email protected]
    Received-SPF: softfail (google.com: domain of transitioning redacted@gmail.com does not designate 46.101.50.214 as permitted sender) client-ip=46.101.50.214;
    Message-ID: <[email protected]>
    Received: by 10.140.92.117 with POP3 id a108mf2711027qge.1;
    Thu, 26 Mar 2015 08:54:33 -0700 (PDT)
    X-Gmail-Fetch-Info: [email protected] 1 mail.scl.co.uk 110 [email protected]
    Return-Path: <[email protected]>
    X-Original-To: [email protected]
    Delivered-To: [email protected]
    Received: from mail3.scl.co.uk (unknown [46.101.50.214])
    by mail.scl.co.uk (Postfix) with ESMTP id 60F5C35E5
    for <[email protected]>; Thu, 26 Mar 2015 15:25:50 +0000 (GMT)
    Received: from gmail.com (84-45-154-103.static.enta.net [84.45.154.103])
    by mail3.scl.co.uk (Postfix) with ESMTP id B5BFF6444C
    for <[email protected]>; Thu, 26 Mar 2015 15:25:20 +0000 (GMT)
    subject: new relay test
    Date: Thu, 26 Mar 2015 08:54:33 -0700 (PDT)
    From: [email protected]


    i know i still need to sort out the tls, i'll do that once I've got this problem fixed.
    does anyone know why the to/from fields are getting messed up in the mail client?, and how do i fix it?
    at the moment i don't have any idea where to even start on this one.
    thanks.
    lee.
     

Share This Page