HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Postfix relayhost trouble (http://www.howtoforge.com/forums/showthread.php?t=26823)

waf 14th September 2008 10:28

Postfix relayhost trouble
 
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 clubmember@club.school.edu and redirect them to student's username@school.edu via a relayhost called emailrelay.school.edu. Every time someone sends an email to clubmember@club.school.edu the email correctly arrives at username@school.edu, but the sender gets an additional email from the school.edu email server that says:

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

clubmember@club.school.edu
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=<username@school.edu>, orig_to=<clubmember@club.school.edu>, 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 <8199E5FF8EFA8B43AAE85CB33FD4ED780144150D@EVS-CCR.school.edu> 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: username@school.edu

Thanks for any help!

falko 15th September 2008 12:49

Quote:

Originally Posted by waf (Post 145011)
-------
Delivery has failed to these recipients or distribution lists:

clubmember@club.school.edu
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.
------

Can you see from which server exactly this email originates?

waf 15th September 2008 17:30

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 <postmaster@school.edu>


falko 16th September 2008 18:24

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...

waf 16th September 2008 21:13

I looked over the logs, and I didn't see where it was sending emails addressed to all@club.school.edu. 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=<5ED53A7506835E43910851CEE0BCA7E9015E26BA@EVS-CCR.school.edu>
Sep 13 17:11:08 apo postfix/qmgr[2303]: 2E825104108: from=<bsmith@school.edu>, 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=<bsmith@school.edu>
Sep 13 17:11:08 apo postfix/cleanup[7152]: D44BA104847: message-id=<5ED53A7506835E43910851CEE0BCA7E9015E26BA@EVS-CCR.school.edu>
Sep 13 17:11:08 apo postfix/pipe[7153]: 2E825104108: to=<all@club.school.edu>, 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=<bsmith@school.edu>, size=4922, nrcpt=1 (queue active)
Sep 13 17:11:08 apo postfix/cleanup[7152]: DBA80104108: message-id=<5ED53A7506835E43910851CEE0BCA7E9015E26BA@EVS-CCR.school.edu>
Sep 13 17:11:08 apo postfix/qmgr[2303]: DBA80104108: from=<bsmith@school.edu>, size=5061, nrcpt=55 (queue active)
Sep 13 17:11:08 apo postfix/local[7157]: D44BA104847: to=<all@club.school.edu>, 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=<bob@school.edu>, orig_to=<all@club.school.edu>, 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  <5ED53A7506835E43910851CEE0BCA7E9015E26BA@EVS-CCR.school.edu> Queued mail for delivery)
Sep 13 17:11:09 apo postfix/smtp[7159]: DBA80104108: to=<joe@school.edu>, orig_to=<all@club.school.edu>, 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  <5ED53A7506835E43910851CEE0BCA7E9015E26BA@EVS-CCR.school.edu> 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 all@club.school.edu. Could this be causing it, or is not used once it is set?

falko 17th September 2008 18:05

Is there any alias for all@club.school.edu in /etc/aliases as well, or how does the system know that one mail should go to bob and the next one to joe?

waf 17th September 2008 18:51

Yes, I have the definition of all@club.school.edu defined in /etc/aliases in this form:
Code:

#!/etc/aliases
...
bobby: bob@school.edu
bigjoe: joe@school.edu
all: bobby, bigjoe

Every time I change the aliases file, I run newaliases to update the aliases database.

falko 18th September 2008 19:10

What happens when you change that line to
Code:

all: bobby@school.edu, bigjoe@school.edu
?


All times are GMT +2. The time now is 01:49.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.