Sendmail relay woe on VPN

Today I ran into the a weird sendmail problem: I kept getting “relay denied” message when I tried to send emails out. I tried another mail host without any problem. I even used another client machine to send mail from my original mail host without any problem. I checked the /var/log/syslog and found something like the below:

Sep 20 11:36:42 tsai86 sendmail[7272]: [ID 801593 mail.notice] l8KIafBt007272: ruleset=check_rcpt, arg1=, relay=vpn-129-150-36-151.Central.Sun.COM [], reject=550 5.7.1 … Relaying denied

Checking against earlier successful email log like the below, I noticed the difference being “relay = vpn-129-150-36-151.Central.Sun.COM []” vs. “relay=local”.

Sep 20 10:55:57 tsai86 sendmail[7160]: [ID 801593] l8KHtsjO007159: to=, delay=00:00:01, xdelay=00:00:01, mailer=local, pri=34029, relay=local, dsn=2.0.0, stat=Sent

Cutting to the chase, I logged out of the VPN session and re-logged in the VPN. Voila! The send mail problem went away. How strange! The only explanation I have is that the VPN somehow got confused thinking I’m on a different domain or the IP address got interpreted to be on a different domain. A little hiccup on the network creates a slew of problems. I was told I wasn’t the only one having the problem. Strange indeed.