Redirecting mail to the local domain
Redirecting mail to the local domain
am 06.12.2007 20:56:32 von carl.bussema
Here's the scenario:
oldmail.foo.com is running BSD and sendmail and was our primary mail
server for a long time. The Boss (TM) wanted an Exchange server, so we
set that up on newmail.foo.com. We updated DNS records and we changed /
etc/local-host-names to remove foo.com from the list (a couple hosts
like bar.foo.com are still in the list) and restarted sendmail.
Everything works except mail send by scripts run on oldmail.foo.com. A
script there might send mail to me@foo.com and it will get delivered
to the local mailbox on oldmail.foo.com. If you change that script to
send mail to me@gmail.com, it works fine.
What are we missing here?
the .mc file is below:
-------------
divert(0)
VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.10.2.19
2003/12/31 17:42:16
gshapiro Exp $')
OSTYPE(freebsd4)
DOMAIN(generic)
FEATURE(access_db, `hash -o -T /etc/mail/access')
FEATURE(blacklist_recipients)
FEATURE(local_lmtp)
FEATURE(mailertable, `hash -o /etc/mail/mailertable')
FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')
define(`confCW_FILE', `-o /etc/mail/local-host-names')
DAEMON_OPTIONS(`Name=IPv4, Family=inet')
DAEMON_OPTIONS(`Name=IPv6, Family=inet6, Modifiers=O')
define(`confBIND_OPTS', `WorkAroundBrokenAAAA')
define(`confNO_RCPT_ACTION', `add-to-undisclosed')
define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy')
MAILER(local)
MAILER(smtp)
Re: Redirecting mail to the local domain
am 07.12.2007 07:50:11 von Ingo Freund
On 06.12.2007 20:56, carl.bussema@gmail.com wrote (please find the answer below the original text):
> Here's the scenario:
>
> oldmail.foo.com is running BSD and sendmail and was our primary mail
> server for a long time. The Boss (TM) wanted an Exchange server, so we
> set that up on newmail.foo.com. We updated DNS records and we changed /
> etc/local-host-names to remove foo.com from the list (a couple hosts
> like bar.foo.com are still in the list) and restarted sendmail.
>
> Everything works except mail send by scripts run on oldmail.foo.com. A
> script there might send mail to me@foo.com and it will get delivered
> to the local mailbox on oldmail.foo.com. If you change that script to
> send mail to me@gmail.com, it works fine.
>
> What are we missing here?
>
> the .mc file is below:
>
> FEATURE(mailertable, `hash -o /etc/mail/mailertable')
> FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')
>
> define(`confCW_FILE', `-o /etc/mail/local-host-names')
in mailertable something like
oldmail.foo.com smtp:newmail.foo.com
should do the job.
-Ingo
Re: Redirecting mail to the local domain
am 07.12.2007 16:18:07 von carl.bussema
On Dec 7, 1:50 am, Ingo Freund wrote:
> in mailertable something like
>
> oldmail.foo.com smtp:newmail.foo.com
>
> should do the job.
>
> -Ingo
I should probably restate the problem details to be more specific:
mail is actually sent to ...@bar.com . oldmail.foo.com and
newmail.foo.com do have the same base domain. No mail should really be
address to foo.com although I'm sure it happens.
Tried
oldmail.bar.com esmtp:newmail.foo.com
and
bar.com esmtp:newmail.foo.com
No luck either way (make , make restart after each change).
Any other ideas?
-Carl
Re: Redirecting mail to the local domain
am 07.12.2007 22:24:35 von Kees Theunissen
carl.bussema@gmail.com wrote:
> Here's the scenario:
>
> oldmail.foo.com is running BSD and sendmail and was our primary mail
> server for a long time. The Boss (TM) wanted an Exchange server, so we
> set that up on newmail.foo.com. We updated DNS records and we changed /
> etc/local-host-names to remove foo.com from the list (a couple hosts
Is this a typo or is /etc/local-host-names linked (either a hard link
or a symbolic link) to /etc/mail/local-host-names? Otherwise you cleaned
up a file that is not used by sendmail. Your .mc file below specifies:
define(`confCW_FILE', `-o /etc/mail/local-host-names').
> like bar.foo.com are still in the list) and restarted sendmail.
>
> Everything works except mail send by scripts run on oldmail.foo.com. A
> script there might send mail to me@foo.com and it will get delivered
> to the local mailbox on oldmail.foo.com. If you change that script to
> send mail to me@gmail.com, it works fine.
>
> What are we missing here?
>
> the .mc file is below:
>
> -------------
>
> divert(0)
> VERSIONID(`$FreeBSD: src/etc/sendmail/freebsd.mc,v 1.10.2.19
> 2003/12/31 17:42:16
> gshapiro Exp $')
> OSTYPE(freebsd4)
> DOMAIN(generic)
>
> FEATURE(access_db, `hash -o -T /etc/mail/access')
> FEATURE(blacklist_recipients)
> FEATURE(local_lmtp)
> FEATURE(mailertable, `hash -o /etc/mail/mailertable')
> FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')
>
> define(`confCW_FILE', `-o /etc/mail/local-host-names')
> DAEMON_OPTIONS(`Name=IPv4, Family=inet')
> DAEMON_OPTIONS(`Name=IPv6, Family=inet6, Modifiers=O')
>
> define(`confBIND_OPTS', `WorkAroundBrokenAAAA')
> define(`confNO_RCPT_ACTION', `add-to-undisclosed')
> define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy')
> MAILER(local)
> MAILER(smtp)
>
Regards,
Kees.
--
Kees Theunissen.