Another stupid Sendmail question..

Ok.. This is getting annoying.. I've moved from Exim over to Sendmail without too much effort and have my main incoming/outgoing mail server running just fine (in a jail using local address 10.0.1.198) and have the FreeBSD 'host' OS trying to forward mail to the jailed sendmail..

However, for the life of me I can't get the dumb host version of sendmail to forward all outgoing mail to the jail (at 10.0.1.198). Instead it delivers it locally (WRONG!!).

Any ideas?

Below is my MC file (all references to smtp.my-domain.com refer to the jail -- at 10.0.1.198):

Code:
divert(-1)
divert(0)
VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.34.2.3.2.1 2008/11/25 02:59:29 kensmith Exp $')
OSTYPE(freebsd6)
DOMAIN(generic)

FEATURE(access_db, `hash -o -T<TMPF> /etc/mail/access')
FEATURE(blacklist_recipients)
FEATURE(local_lmtp)
FEATURE(mailertable, `hash -o /etc/mail/mailertable')
FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')
MASQUERADE_AS('my-domain.com')

define(`SMART_HOST', `smtp.my-domain.com')

define(`confCW_FILE', `-o /etc/mail/local-host-names')

DAEMON_OPTIONS(`Name=IPv4, Family=inet')

define(`confBIND_OPTS', `WorkAroundBrokenAAAA')
define(`confNO_RCPT_ACTION', `add-to-undisclosed')
define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy')
define('LOCAL_RELAY', 'mailer:[smtp.my-domain.com]')
MAILER(relay)

Below are some outputs from the /var/log/maillog after sending an email to "root" on the host server (aka 'srv1.my-domain.com') :

Code:
Mar 17 23:34:02 srv1 sendmail[89122]: n2I6Y2cL089122: from=rickf, size=79, class=0, nrcpts=1, msgid=<200903180634.n2I6Y2cL089122@srv1.my-domain.com>, relay=root@localhost
Mar 17 23:34:03 srv1 sm-mta[89123]: n2I6Y2gu089123: from=<rickf@srv1.my-domain.com>, size=362, class=0, nrcpts=1, msgid=<200903180634.n2I6Y2cL089122@srv1.my-domain.com>, proto=ESMTP, daemon=Daemon0, relay=localhost [127.0.0.1]
Mar 17 23:34:03 srv1 sendmail[89122]: n2I6Y2cL089122: to=root, ctladdr=rickf (1001/1001), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30079, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (n2I6Y2gu089123 Message accepted for delivery)
Mar 17 23:34:03 srv1 sm-mta[89124]: n2I6Y2gu089123: to=rickf@my-domain, ctladdr=<rickf@srv1.my-domain> (1001/1001), delay=00:00:01, xdelay=00:00:00, mailer=local, pri=30629, relay=local, dsn=2.0.0, stat=Sent

Any ideas? If I can't solve this, perhaps I'll try out Postfix and see what's involved with that (Ugg!) :r
 
The host OS' smart-host is already set that way -- the jail's hostname is smtp.my-domain.com that handles the incoming/outgoing mail.. For some reason the host version of Sendmail always wants to deliver locally.. If you have any suggestions let me know..
 
Local delivery takes place for every domain listed in /etc/mail/local-host-names. So if you're sending mail to rickf@my-domain and my-domain is in /etc/mail/local-host-names, my-domain will be stripped from the address, and delivery will be to rickf. Which is local. Have you tried aliasing root to a really external email address (e.g. a hotmail/gmail account or something like that)?
 
Thanks.. I'll look into what the local-host-names file.. I've got no idea at this point (I'm at work).. I'll let you know what happens..
 
Back
Top