Postfix relayhost trouble

Discussion in 'Server Operation' started by waf, Sep 14, 2008.

  1. waf

    waf New Member

    Hi, I'm in charge of a postfix 2.5 server called club.school.edu at a university (school.edu). It is set to accept emails of the form [email protected] and redirect them to student's [email protected] via a relayhost called emailrelay.school.edu. Every time someone sends an email to [email protected] the email correctly arrives at [email protected], but the sender gets an additional email from the school.edu email server that says:

    -------
    Delivery has failed to these recipients or distribution lists:

    [email protected]
    The recipient's e-mail address was not found in the recipient's e-mail system. Microsoft Exchange will not try to redeliver this message for you. Please check the e-mail address and try resending this message, or provide the following diagnostic text to your system administrator.
    ------

    The mail.log entry on the club.school.edu server has the following
    entry for the email:
    Code:
    to=<[email protected]>, orig_to=<[email protected]>, relay=emailrelay.school.edu[<<ip redacted>>]:25, delay=0.42, delays=0.06/0.02/0.01/0.34, dsn=2.6.0, status=sent (250 2.6.0 <[email protected]> Queued mail for delivery)
    
    Does anybody know how I can prevent this error message from happening?

    postconf -n gives the following
    Code:
    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    append_dot_mydomain = yes
    biff = no
    config_directory = /etc/postfix
    disable_vrfy_command = no
    header_checks = regexp:/etc/postfix/header_checks
    inet_interfaces = all
    inet_protocols = ipv4
    mailbox_command =
    mailbox_size_limit = 0
    mydestination = club.school.edu, localhost.school.edu, localhost, ,
    mydomain = school.edu
    myhostname = club.school.edu
    mynetworks = 127.0.0.0/8 111.222.0.0/16
    myorigin = /etc/mailname
    notify_classes =
    recipient_delimiter =
    relayhost = emailrelay.school.edu
    smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
    smtpd_banner = $myhostname mail server
    smtpd_client_restrictions = reject_unknown_client
    smtpd_delay_reject = yes
    smtpd_helo_required = yes
    smtpd_helo_restrictions = permit_mynetworks,
      reject_non_fqdn_hostname,
      reject_invalid_hostname,
      permit
    smtpd_recipient_restrictions = reject_unauth_pipelining,
      reject_non_fqdn_recipient,
      reject_unknown_recipient_domain,
      permit_mynetworks,
      permit_sasl_authenticated,
      reject_unauth_destination
    smtpd_sender_restrictions = permit_sasl_authenticated,
      permit_mynetworks,
      reject_non_fqdn_sender,
      reject_unknown_sender_domain,
      permit
    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:${queue_directory}/smtpd_scache
    smtpd_use_tls = yes
    
    my /etc/aliases file contains mappings of the style:
    clubmember: [email protected]

    Thanks for any help!
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Can you see from which server exactly this email originates?
     
  3. waf

    waf New Member

    The email seems to originate from emailrelay.rose-hulman.edu, which is the server that the club.school.edu server sends the email to.

    Partial email headers:
    Code:
    Received: from EXCH-GW.school.edu (111.222.8.200) by exch07-fe-1.school.edu (111.222.1.21) with Microsoft SMTP Server id 8.1.291.1; Sat, 13 Sep 2008 17:14:15 -0400
    Received: from EMAILRELAY.school.edu ([111.222.8.199]) by EXCH-GW.school.edu with Microsoft SMTPSVC(6.0.3790.1830);  Sat, 13 Sep 2008 17:14:14 -0400
    From: postmaster <[email protected]>
    
     
  4. falko

    falko Super Moderator ISPConfig Developer

    I'm not sure why, but it seems as if club.school.edu sends out two emails, one with the original address and one with the rewritten one...
     
  5. waf

    waf New Member

    I looked over the logs, and I didn't see where it was sending emails addressed to [email protected]. I did find something interesting, though. Here are the logs:

    Code:
    Sep 13 17:11:08 apo postfix/smtpd[7149]: connect from exch-gw.school.edu[111.222.8.200]
    Sep 13 17:11:08 apo postfix/smtpd[7149]: 2E825104108: client=exch-gw.school.edu[111.222.8.200]
    Sep 13 17:11:08 apo postfix/cleanup[7152]: 2E825104108: message-id=<[email protected]>
    Sep 13 17:11:08 apo postfix/qmgr[2303]: 2E825104108: from=<[email protected]>, size=4603, nrcpt=1 (queue active)
    Sep 13 17:11:08 apo postfix/smtpd[7149]: disconnect from exch-gw.school.edu[111.222.8.200]
    Sep 13 17:11:08 apo postfix/pickup[7148]: D44BA104847: uid=5001 from=<[email protected]>
    Sep 13 17:11:08 apo postfix/cleanup[7152]: D44BA104847: message-id=<[email protected]>
    Sep 13 17:11:08 apo postfix/pipe[7153]: 2E825104108: to=<[email protected]>, relay=spamassassin, delay=0.69, delays=0.03/0.01/0/0.65, dsn=2.0.0, status=sent (delivered via spamassassin service)
    Sep 13 17:11:08 apo postfix/qmgr[2303]: 2E825104108: removed
    Sep 13 17:11:08 apo postfix/qmgr[2303]: D44BA104847: from=<[email protected]>, size=4922, nrcpt=1 (queue active)
    Sep 13 17:11:08 apo postfix/cleanup[7152]: DBA80104108: message-id=<[email protected]>
    Sep 13 17:11:08 apo postfix/qmgr[2303]: DBA80104108: from=<[email protected]>, size=5061, nrcpt=55 (queue active)
    Sep 13 17:11:08 apo postfix/local[7157]: D44BA104847: to=<[email protected]>, relay=local, delay=0.13, delays=0.03/0.01/0/0.09, dsn=2.0.0, status=sent (forwarded as DBA80104108)
    Sep 13 17:11:09 apo postfix/smtp[7158]: DBA80104108: to=<[email protected]>, orig_to=<[email protected]>, relay=emailrelay.school.edu[111.222.8.199]:25,
     delay=0.38, delays=0.06/0.02/0.02/0.28, dsn=2.6.0, status=sent (250 2.6.0  <[email protected]> Queued mail for delivery)
    Sep 13 17:11:09 apo postfix/smtp[7159]: DBA80104108: to=<[email protected]>, orig_to=<[email protected]>, relay=emailrelay.school.edu[111.222.8.199]:25,
     delay=0.39, delays=0.06/0.04/0.03/0.26, dsn=2.6.0, status=sent (250 2.6.0  <[email protected]> Queued mail for delivery)
    Sep 13 17:11:09 apo postfix/qmgr[2303]: DBA80104108: removed
    
    It looks like there is an orig_to header that is set to [email protected]. Could this be causing it, or is not used once it is set?
     
  6. falko

    falko Super Moderator ISPConfig Developer

  7. waf

    waf New Member

    Yes, I have the definition of [email protected] defined in /etc/aliases in this form:
    Code:
    #!/etc/aliases
    ...
    bobby: [email protected]
    bigjoe: [email protected]
    all: bobby, bigjoe
    
    Every time I change the aliases file, I run newaliases to update the aliases database.
     
  8. falko

    falko Super Moderator ISPConfig Developer

    What happens when you change that line to
    Code:
    all: [email protected], [email protected]
    ?
     

Share This Page