Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.forward/aliases fail?

Status
Not open for further replies.
May 7, 2007
54
0
0
US
Hi,
I'm running sendmail 8.13.8 on a RH5 system. This server (call it appsrv3) is set so it won't relay any email for other systems.

I have it set up to use mailhost to relay to. IE email to testguy@ourdomain.com gets relayed to mailhost. This works perfectly, except for one (or 2) issue. If I sent email to testguy@ourdomain.com from the command line it works. If I define a .forward or an entry in the aliases file that points to testguy@ourdomain.com the email delivery fails. The maillog shows:

Oct 1 16:32:34 appsrv3 sendmail[18923]: l91NWYTp018923: from=root, size=35, class=0, nrcpts=1, msgid=<200710012332.l91NWYTp018923@appsrv3.ourdomain.local>, relay=root@localhost
Oct 1 16:32:34 appsrv3 sendmail[18924]: l91NWYiQ018924: from=<root@appsrv3.ourdomain.local>, size=339, class=0, nrcpts=1, msgid=<200710012332.l91NWYTp018923@appsrv3.ourdomain.local>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Oct 1 16:32:34 appsrv3 sendmail[18923]: l91NWYTp018923: to=localTestguy, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30035, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (l91NWYiQ018924 Message accepted for delivery)
Oct 1 16:32:34 appsrv3 sendmail[18925]: l91NWYiQ018924: to=testguy@ourdomain.com, ctladdr=<MESAmail@appsrv3.ourdomain.local> (8/0), delay=00:00:00, mailer=local, pri=120339, dsn=5.1.1, stat=User unknown
Oct 1 16:32:34 appsrv3 sendmail[18925]: l91NWYiQ018924: l91NWYiQ018925: DSN: User unknown
Oct 1 16:32:34 appsrv3 sendmail[18925]: l91NWYiQ018925: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31600, dsn=2.0.0, stat=Sent

Can anyone shed some light an what I need to fix to rectify this problem? TIA
 
I've seen this where the server that you are relaying to doesn't allow relaying

simply put in access list on mailhost

appsrv3 RELAY

OR
appsrv3 OK

and then rebuild/compile the access list

makemap hash /etc/mail/access < /etc/mail/access


 
Thanks. I tried the access changes but that didn't work.

From the log I can see that the initial message is accepted, the alias is determined, then the alias is determined to be invalid and the email fails. It appears to me that instead of relaying the email to mailhost it relays it to itself (appsrv3) which doesn't accept email for that address.

What I wanted was for all email generated on APPSRV3 to go to our email server. After multiple attempts I found the following changes to sendmail.mc worked:
define(`SMART_HOST', `mailhost.ourdomain.com')dnl
define(`confFALLBACK_SMARTHOST', `mailhost.ourdomain.com')dnl
define(`LUSER_RELAY', `mailhost.ourdomain.com')dnl
define(`LOCAL_RELAY', `mailhost.ourdomain.com')dnl

Now email to testuser (valid on APPSRV3 or not) is relayed to mailhost.

The only problem I have (annoyance actually) is that mail addressed without the @ symbol (IE testuser) is addressed to testuser@appsrv3.ourdomain.com instead of testuser@ourdomain.com when it is passed to mailhost. The mailhost accepts and delivers it properly, but I'd like it to use ourdomain.com. Any thoughts on how to accomplish this?
 
should be able to use the MASQUERADE section to do that

dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl
dnl MASQUERADE_DOMAIN(mydomainalias.com)dnl
dnl MASQUERADE_DOMAIN(mydomain.lan)dnl
 
Thanks for the info. I tried what you suggested, both in submit.mc and sendmail.mc. I was able to get it to change the sender's domain but not the recipient. I set it back as I do want to know where the emails are coming from (system messages to/from root/adm/etc).

Any further thoughts on this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top