sendmail on server with ip aliases and virtual hosts
derek at computinginnovations.com
Wed Jul 2 20:21:32 UTC 2008
At 11:26 AM 7/2/2008, D W wrote:
>Having a problem with sendmail on some of my servers supporting several
>virtual apache hosts. Because these servers have 5-10 ip aliases bound, it
>sometimes trips up sendmail when sending outbound mail to my smarthost. All
>servers are configured to use the same smarthost. But on one of the hosts,
>sendmail will send out as the one of the virtual hosts instead of the main
>host, which is what I need.
>webhost01.webdomain.com (10.10.0.1) is the main host.
>mail01.webdomain.com (10.10.10.2) is the smarthost.
>Five ip aliases for apache virtual servers:
>But when one I try to:
>$ telnet mail01.webdomain.com 25
>and watch the maillog on the smarthost, it tells me the connection is coming
>from www.siteA.com (or one of the other virtual ip aliases/hosts) instead of
>the main host, webhost01.webdomian.com.
>This will cause "relaying denied" failures on the smarthost, unless I go
>into the local-host-names and account for every virtual host and add it.
>The other puzzling thing is that I have 9 other "main" hosts with many
>virtual hosts, and they all seem to be working the way I expect; ie.,
>outbound mail is coming from the main host name/ip instead of one of the
>aliases. It's just this webhost01 that is messed up I can't figure out why.
>The other thing is that if I destroy an alias, sendmail will use another
>aliases, then if I put the destroyed virtual alias back, it may or may not
>use it again when sending email.
>How do I get sendmail to just send *everything* as from the main host and
>connect on the main ip address instead of one of the aliases?
>I have in /etc/mail/webhost01.webdomain.com.mc:
>FEATURE(access_db, `hash -o -T<TMPF> /etc/mail/access')
>FEATURE(mailertable, `hash -o /etc/mail/mailertable')
>FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')
>and in generics-domains:
>Thanks for any help.
I would suggest you check both your forward and reverse DNS's for all these
domains. Sendmail will use the DNS listings.
Are your virtual apache server's sending the emails from webpages? If so,
check your setup on those virtual servers that you are specifying the from
address including the correct domain.
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the freebsd-questions