mailertable and sendmail configs

Hi,

I have a sendmail server which was becoming underpowered for my needs. So I
set up a brand new server, moved all of the user accounts and mailboxes over
to it, then assigned it the hostname (mail.jellico.com) and IP address
(207.191.185.6) of the old server. I changed the hostname and IP address of
the old server to something different (207.191.185.3). This is working fine
except I have noticed a few (very few) pieces of email still getting
delivered to the old box for whatever reason. I figured this would be easy
to fix so I changed /etc/mail/mailertable from
jellico.com local:

to
jellico.com smtp:mail.jellico.com


remapped mailertable.db, restarted sendmail and tested it by sending mail
from root on the old box to steve [at] jellico.com It still got delivered
locally. (sendmail -bt confirmed that the mail would be delivered locally).
Next I removed jellico.com from /etc/mail/local-host-names (it is still in
relay-domains) restarted sendmail and tried again. The mail is not being
delivered locally anymore, it isn't being delivered anywhere. sendmail -bt
verifies that the mail should go where I want it to:

[root [at] Raydeus-Dee mail]# sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> 3,0 steve [at] jellico.com
canonify input: steve [at] jellico . com
Canonify2 input: steve < [at] jellico . com >
Canonify2 returns: steve < [at] jellico . com . >
canonify returns: steve < [at] jellico . com . >
parse input: steve < [at] jellico . com . >
Parse0 input: steve < [at] jellico . com . >
Parse0 returns: steve < [at] jellico . com . >
ParseLocal input: steve < [at] jellico . com . >
ParseLocal returns: steve < [at] jellico . com . >
Parse1 input: steve < [at] jellico . com . >
MailerToTriple input: < smtp : mail . jellico . com > steve < [at] jellico
.. com . >
MailerToTriple returns: $# smtp $ [at] mail . jellico . com $: steve < [at]
jellico . com . >
Parse1 returns: $# smtp $ [at] mail . jellico . com $: steve < [at]
jellico . com . >
parse returns: $# smtp $ [at] mail . jellico . com $: steve < [at]
jellico . com . >
>

but the mail actually bounces. In /var/log/maillog I see this:

[root [at] Raydeus-Dee mail]# grep l7AI8vvI001322 /var/log/maillog
Aug 10 14:09:00 Raydeus-Dee sendmail[1322]: l7AI8vvI001322:
from=<root [at] jellico.net>, size=320, class=0, nrcpts=1,
msgid=<Pine.LNX.4.33.0708101408280.1321-100000 [at] mail.jellico.com>,
proto=ESMTP, daemon=MTA, relay=Raydeus-Dee [127.0.0.1]
Aug 10 14:09:00 Raydeus-Dee mimedefang.pl[1305]:
MDLOG,l7AI8vvI001322,mail_in,,,<root [at] jellico.net>,<steve [at] jellico.com>,Testing
Aug 10 14:09:00 Raydeus-Dee sendmail[1329]: l7AI8vvI001322: SYSERR(root):
mail.jellico.com. config error: mail loops back to me (MX problem?)
Aug 10 14:09:00 Raydeus-Dee sendmail[1329]: l7AI8vvI001322:
to=<steve [at] jellico.com>, delay=00:00:00, xdelay=00:00:00, mailer=smtp,
pri=30293, relay=mail.jellico.com. [207.191.185.6], dsn=5.3.5, stat=Local
configuration error
Aug 10 14:09:00 Raydeus-Dee sendmail[1329]: l7AI8vvI001322: l7AI90vH001329:
DSN: Local configuration error

The mail is looping back. What have I overlooked here?

Thanks,

Lisa Casey
Lisa Casey [ Fr, 10 August 2007 20:39 ] [ ID #1792493 ]

Re: mailertable and sendmail configs

"Lisa Casey" <lisa [at] jellico.net> writes:
> I have a sendmail server which was becoming underpowered for my needs. So I
> set up a brand new server, moved all of the user accounts and mailboxes over
> to it, then assigned it the hostname (mail.jellico.com) and IP address
> (207.191.185.6) of the old server. I changed the hostname and IP address of
> the old server to something different (207.191.185.3). This is working fine
> except I have noticed a few (very few) pieces of email still getting
> delivered to the old box for whatever reason. I figured this would be easy
> to fix so I changed /etc/mail/mailertable from
> jellico.com local:
>
> to
> jellico.com smtp:mail.jellico.com
>
>
> remapped mailertable.db, restarted sendmail and tested it by sending mail
> from root on the old box to steve [at] jellico.com It still got delivered
> locally. (sendmail -bt confirmed that the mail would be delivered locally).
> Next I removed jellico.com from /etc/mail/local-host-names (it is still in
> relay-domains) restarted sendmail and tried again. The mail is not being
> delivered locally anymore, it isn't being delivered anywhere. sendmail -bt
> verifies that the mail should go where I want it to:
>
> [root [at] Raydeus-Dee mail]# sendmail -bt
> ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
> Enter <ruleset> <address>
> 3,0 steve [at] jellico.com
> [...]
> parse returns: $# smtp $ [at] mail . jellico . com $: steve < [at]
> jellico . com .
>
>
> but the mail actually bounces. In /var/log/maillog I see this:
> [...]
> Aug 10 14:09:00 Raydeus-Dee sendmail[1329]: l7AI8vvI001322: SYSERR(root):
> mail.jellico.com. config error: mail loops back to me (MX problem?)
> [...]
>
> The mail is looping back. What have I overlooked here?

1) Your sendmail rewrites steve [at] jellico.com to steve [at] mail.jellico.com
2) The host is the best MX for mail.jellico.com but mail.jellico.com is
not on its list of local email domains

Find out *WHY* the rewrite occurs:

echo '3,0 steve [at] jellico.com' | sendmail -d21.12 -d60.5 -bt

-d21.12 - more detailed tracking R lines processing
-d60.5 - tracking of map lookups

--
[pl>en: Andrew] Andrzej Adam Filip : anfi [at] priv.onet.pl : anfi [at] xl.wp.pl
My doctor told me to stop having intimate dinners for four.
Unless there are three other people.
-- Orson Welles
Andrzej Adam Filip [ Fr, 10 August 2007 20:47 ] [ ID #1792494 ]

Re: mailertable and sendmail configs

Hi again,

The old machine still thinks it is mail.jellico.com. See below. Where is
this coming from if not local-host-names?

[root [at] Raydeus-Dee mail]# echo '$=w' | sendmail -bt -d0.4
Version 8.12.6
Compiled with: DNSMAP LOG MATCHGECOS MILTER MIME7TO8 MIME8TO7
NAMED_BIND NETINET NETUNIX NEWDB PIPELINING SASL SCANF
USERDB
XDEBUG
Canonical name: mail.jellico.com
a.k.a.: mail
UUCP nodename: Raydeus-Dee
a.k.a.: mail.jellico.com
a.k.a.: localhost
a.k.a.: [127.0.0.1]

============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = mail
(canonical domain name) $j = mail.jellico.com
(subdomain name) $m = jellico.com
(node name) $k = Raydeus-Dee
========================================================

ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> raydeus-dee.jellico.com
mail
localhost.localdomain
localhost
netlink2000.net
[127.0.0.1]
Raydeus-Dee
mail.jellico.com
Lisa Casey [ Fr, 10 August 2007 20:50 ] [ ID #1792495 ]

Re: mailertable and sendmail configs

In article <13bpc3uqaq8pifa [at] corp.supernews.com> "Lisa Casey"
<lisa [at] jellico.net> writes:
>
>but the mail actually bounces. In /var/log/maillog I see this:
>
>[root [at] Raydeus-Dee mail]# grep l7AI8vvI001322 /var/log/maillog
>Aug 10 14:09:00 Raydeus-Dee sendmail[1322]: l7AI8vvI001322:
>from=<root [at] jellico.net>, size=320, class=0, nrcpts=1,
>msgid=<Pine.LNX.4.33.0708101408280.1321-100000 [at] mail.jellico.com>,
>proto=ESMTP, daemon=MTA, relay=Raydeus-Dee [127.0.0.1]
>Aug 10 14:09:00 Raydeus-Dee mimedefang.pl[1305]:
>MDLOG,l7AI8vvI001322,mail_in,,,<root [at] jellico.net>,<steve [at] jellico.com>,Testing
>Aug 10 14:09:00 Raydeus-Dee sendmail[1329]: l7AI8vvI001322: SYSERR(root):
>mail.jellico.com. config error: mail loops back to me (MX problem?)

The old server is seeing what it considers to be its own host name in
the greeting from the new server, and deduces that "it's talking to
itself". This shouldn't happen if you actually changed the host name of
the old server and restarted sendmail there - unless you're (against
recommendations in the docs) hardwiring the hostname in the sendmail
config via confDOMAIN_NAME in the .mc file.

A short-term workaround is to add the 'k' flag to the SMTP mailer
definitions on the old server:

MODIFY_MAILER_FLAGS(`SMTP', `+k')

See also FAQ 4.5 (at the very end).

--Per Hedeland
per [at] hedeland.org
per [ Fr, 10 August 2007 21:07 ] [ ID #1792497 ]

Re: mailertable and sendmail configs

Hi Andrew,

I'm not sure exactly what this is telling me, but I think the problem is (as
I stated in my reply to myself here) that this old server still thinks it is
mail.jellico.com. It's hostname is raydeus-dee:

[root [at] Raydeus-Dee rc.d]# hostname
Raydeus-Dee

I need to convince it that it is NOT mail.jellico.com. I have checked my
DNS, the A record for mail.jellico.com does point to the correct IP address,
207.191.185.6. I believe the problem is in my sendmail configuration
somewhere, but where?


[root [at] Raydeus-Dee rc.d]# echo '3,0 steve [at] jellico.com' |
sendmail -d21.12 -d60.5 -bt
WARNING: local host name (Raydeus-Dee) is not qualified; fix $j in config
file
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> canonify input: steve [at] jellico . com
-----trying rule: $ [at]
----- rule fails
-----trying rule: $*
-----rule matches: $: $1 < [at] >
rewritten as: steve [at] jellico . com < [at] >
-----trying rule: $* < $* > $* < [at] >
----- rule fails
-----trying rule: [at] $* < [at] >
----- rule fails
-----trying rule: $* [ IPv6 : $+ ] < [at] >
----- rule fails
-----trying rule: $* : : $* < [at] >
----- rule fails
-----trying rule: : include : $* < [at] >
----- rule fails
-----trying rule: $* : $* [ $* ]
----- rule fails
-----trying rule: $* : $* < [at] >
----- rule fails
-----trying rule: $* < [at] >
-----rule matches: $: $1
rewritten as: steve [at] jellico . com
-----trying rule: $* ;
----- rule fails
-----trying rule: $* < $+ : ; > $*
----- rule fails
-----trying rule: $* < $* ; >
----- rule fails
-----trying rule: $ [at]
----- rule fails
-----trying rule: $*
-----rule matches: $: < $1 >
rewritten as: < steve [at] jellico . com >
-----trying rule: $+ < $* >
----- rule fails
-----trying rule: < $* > $+
----- rule fails
-----trying rule: < >
----- rule fails
-----trying rule: < $+ >
-----rule matches: $: $1
rewritten as: steve [at] jellico . com
-----trying rule: [at] $+ , $+
----- rule fails
-----trying rule: [at] [ $* ] : $+
----- rule fails
-----trying rule: [at] $+ : $+
----- rule fails
-----trying rule: $+ : $* ; [at] $+
----- rule fails
-----trying rule: $+ : $* ;
----- rule fails
-----trying rule: $+ [at] $+
-----rule matches: $: $1 < [at] $2 >
rewritten as: steve < [at] jellico . com >
-----trying rule: $+ < $+ [at] $+ >
----- rule fails
-----trying rule: $+ < [at] $+ >
-----rule matches: $ [at] $> Canonify2 $1 < [at] $2 >
Canonify2 input: steve < [at] jellico . com >
-----trying rule: $* < [at] localhost > $*
----- rule fails
-----trying rule: $* < [at] localhost . > $*
----- rule fails
-----trying rule: $* < [at] localhost . UUCP > $*
----- rule fails
-----trying rule: $* < [at] [ $+ ] > $*
----- rule fails
-----trying rule: $* < [at] [at] $=w > $*
----- rule fails
-----trying rule: $* < [at] [at] $+ > $*
----- rule fails
-----trying rule: $* < [at] $+ . UUCP > $*
----- rule fails
-----trying rule: $* < [at] $+ . . UUCP . > $*
----- rule fails
-----trying rule: $* < [at] $* $=P > $*
----- rule fails
-----trying rule: $* < [at] $* $~P > $*
-----rule matches: $: $&{daemon_flags} $| $1 < [at] $2 $3 > $4
rewrite: RHS $&{daemon_flags} => "(NULL)"
rewritten as: $| steve < [at] jellico . com >
-----trying rule: $* CC $* $| $* < [at] $+ . $+ > $*
----- rule fails
-----trying rule: $* CC $* $| $*
----- rule fails
-----trying rule: $* $| $* < [at] $* > $*
-----rule matches: $: $2 < [at] $[ $3 $] > $4
map_lookup(host, jellico.com, %0=jellico.com) => jellico.com. (0)
rewritten as: steve < [at] jellico . com . >
-----trying rule: $* $| $*
----- rule fails
-----trying rule: $* < [at] $=w > $*
----- rule fails
-----trying rule: $* < [at] $=M > $*
----- rule fails
-----trying rule: $* < [at] $={VirtHost} > $*
----- rule fails
-----trying rule: $* < [at] $* . . > $*
----- rule fails
Canonify2 returns: steve < [at] jellico . com . >
rewritten as: steve < [at] jellico . com . >
canonify returns: steve < [at] jellico . com . >
parse input: steve < [at] jellico . com . >
-----trying rule: $*
-----rule matches: $: $> Parse0 $1
Parse0 input: steve < [at] jellico . com . >
-----trying rule: < [at] >
----- rule fails
-----trying rule: $* : $* ; < [at] >
----- rule fails
-----trying rule: [at] < [at] $* >
----- rule fails
-----trying rule: < [at] $+ >
----- rule fails
-----trying rule: $+ < [at] >
----- rule fails
-----trying rule: $*
-----rule matches: $: < > $1
rewritten as: < > steve < [at] jellico . com . >
-----trying rule: < > $* < [at] [ $* ] : $+ > $*
----- rule fails
-----trying rule: < > $* < [at] [ $* ] , $+ > $*
----- rule fails
-----trying rule: < > $* < [at] [ $* ] $+ > $*
----- rule fails
-----trying rule: < > $* < [at] [ $+ ] > $*
----- rule fails
-----trying rule: < > $* < $* : $* > $*
----- rule fails
-----trying rule: < > $*
-----rule matches: $1
rewritten as: steve < [at] jellico . com . >
-----trying rule: < > $*
----- rule fails
-----trying rule: $* < [at] . $* > $*
----- rule fails
-----trying rule: $* < [at] $* . . $* > $*
----- rule fails
-----trying rule: $* < [at] $* [at] > $*
----- rule fails
-----trying rule: $* [at] $* < [at] $* > $*
----- rule fails
-----trying rule: $* , $~O $*
----- rule fails
-----trying rule: $* < [at] > $*
----- rule fails
-----trying rule: < [at] $=w . > : $*
----- rule fails
-----trying rule: $- < [at] $=w . >
----- rule fails
-----trying rule: < [at] $+ >
----- rule fails
-----trying rule: $* $=O $* < [at] $=w . >
----- rule fails
-----trying rule: $-
----- rule fails
-----trying rule: < [at] *LOCAL* >
----- rule fails
-----trying rule: $* $=O $* < [at] *LOCAL* >
----- rule fails
-----trying rule: $* < [at] *LOCAL* >
----- rule fails
Parse0 returns: steve < [at] jellico . com . >
rewritten as: steve < [at] jellico . com . >
-----trying rule: < [at] >
----- rule fails
-----trying rule: $*
-----rule matches: $: $> ParseLocal $1
ParseLocal input: steve < [at] jellico . com . >
-----trying rule: $* < [at] $+ . REDIRECT . >
----- rule fails
-----trying rule: $* < [at] $+ . REDIRECT . > < i >
----- rule fails
-----trying rule: $* < [at] $+ . REDIRECT . > < $- >
----- rule fails
ParseLocal returns: steve < [at] jellico . com . >
rewritten as: steve < [at] jellico . com . >
-----trying rule: $*
-----rule matches: $: $> Parse1 $1
Parse1 input: steve < [at] jellico . com . >
-----trying rule: $* < [at] [ $+ ] > $*
----- rule fails
-----trying rule: $* < [at] [ $+ ] > $*
----- rule fails
-----trying rule: $* < [at] [ $+ ] : > $*
----- rule fails
-----trying rule: $* < [at] [ $+ ] : $- : $* > $*
----- rule fails
-----trying rule: $* < [at] [ $+ ] : $+ > $*
----- rule fails
-----trying rule: $+
-----rule matches: $: < ! > $1
rewritten as: < ! > steve < [at] jellico . com . >
-----trying rule: < ! > $+ < [at] $={VirtHost} . >
----- rule fails
-----trying rule: < ! > $+ < [at] $=w . >
----- rule fails
-----trying rule: < [at] > $+ + $+ < [at] $* . >
----- rule fails
-----trying rule: < [at] > $+ + $* < [at] $* . >
----- rule fails
-----trying rule: < [at] > $+ + $* < [at] $* . >
----- rule fails
-----trying rule: < [at] > $+ + $+ < [at] $+ . >
----- rule fails
-----trying rule: < [at] > $+ + $* < [at] $+ . >
----- rule fails
-----trying rule: < [at] > $+ + $* < [at] $+ . >
----- rule fails
-----trying rule: < [at] > $+ < [at] $+ . >
----- rule fails
-----trying rule: < [at] > $+
----- rule fails
-----trying rule: < ! > $+
-----rule matches: $: $1
rewritten as: steve < [at] jellico . com . >
-----trying rule: < error : $- . $- . $- : $+ > $*
----- rule fails
-----trying rule: < error : $- $+ > $*
----- rule fails
-----trying rule: < $+ > $+ < [at] $+ >
----- rule fails
-----trying rule: $=L < [at] $=w . >
----- rule fails
-----trying rule: $+ < [at] $=w . >
----- rule fails
-----trying rule: $* < [at] $+ > $*
-----rule matches: $: < $2 > $1 < [at] $2 > $3
rewritten as: < jellico . com . > steve < [at] jellico . com . >
-----trying rule: < $+ . > $*
-----rule matches: $: < $1 > $2
rewritten as: < jellico . com > steve < [at] jellico . com . >
-----trying rule: < $+ > $*
-----rule matches: $: < $( mailertable $1 $) > $2
map_lookup(mailertable, jellico.com, %0=jellico.com) =>
smtp:mail.jellico.com (0)
rewritten as: < smtp : mail . jellico . com > steve < [at] jellico . com . >
-----trying rule: < $~[ : $* > $*
-----rule matches: $> MailerToTriple < $1 : $2 > $3
MailerToTriple input: < smtp : mail . jellico . com > steve < [at] jellico
.. com . >
-----trying rule: < > $*
----- rule fails
-----trying rule: < error : $- . $- . $- : $+ > $*
----- rule fails
-----trying rule: < error : $- $+ > $*
----- rule fails
-----trying rule: < local : $* > $*
----- rule fails
-----trying rule: < $~[ : $+ [at] $+ > $* < $* > $*
----- rule fails
-----trying rule: < $~[ : $+ > $*
-----rule matches: $# $1 $ [at] $2 $: $3
rewritten as: $# smtp $ [at] mail . jellico . com $: steve < [at] jellico . com . >
MailerToTriple returns: $# smtp $ [at] mail . jellico . com $: steve < [at]
jellico . com . >
rewritten as: $# smtp $ [at] mail . jellico . com $: steve < [at] jellico . com . >
Parse1 returns: $# smtp $ [at] mail . jellico . com $: steve < [at]
jellico . com . >
rewritten as: $# smtp $ [at] mail . jellico . com $: steve < [at] jellico . com . >
parse returns: $# smtp $ [at] mail . jellico . com $: steve < [at]
jellico . com . >
Lisa Casey [ Fr, 10 August 2007 21:16 ] [ ID #1792498 ]

Re: mailertable and sendmail configs

I rebooted the box and it works now. Don't know why. I did stop & start
sendmail so it should have read the configs and a reboot sdhouldn't have
been necessary, but it's working now. Thanks for the responses.

Lisa

"Per Hedeland" <per [at] hedeland.org> wrote in message
news:f9id1d$1kgh$1 [at] hedeland.org...
> In article <13bpc3uqaq8pifa [at] corp.supernews.com> "Lisa Casey"
> <lisa [at] jellico.net> writes:
>>
>>but the mail actually bounces. In /var/log/maillog I see this:
>>
>>[root [at] Raydeus-Dee mail]# grep l7AI8vvI001322 /var/log/maillog
>>Aug 10 14:09:00 Raydeus-Dee sendmail[1322]: l7AI8vvI001322:
>>from=<root [at] jellico.net>, size=320, class=0, nrcpts=1,
>>msgid=<Pine.LNX.4.33.0708101408280.1321-100000 [at] mail.jellico.com>,
>>proto=ESMTP, daemon=MTA, relay=Raydeus-Dee [127.0.0.1]
>>Aug 10 14:09:00 Raydeus-Dee mimedefang.pl[1305]:
>>MDLOG,l7AI8vvI001322,mail_in,,,<root [at] jellico.net>,<steve [at] jellico.com>,Testing
>>Aug 10 14:09:00 Raydeus-Dee sendmail[1329]: l7AI8vvI001322: SYSERR(root):
>>mail.jellico.com. config error: mail loops back to me (MX problem?)
>
> The old server is seeing what it considers to be its own host name in
> the greeting from the new server, and deduces that "it's talking to
> itself". This shouldn't happen if you actually changed the host name of
> the old server and restarted sendmail there - unless you're (against
> recommendations in the docs) hardwiring the hostname in the sendmail
> config via confDOMAIN_NAME in the .mc file.
>
> A short-term workaround is to add the 'k' flag to the SMTP mailer
> definitions on the old server:
>
> MODIFY_MAILER_FLAGS(`SMTP', `+k')
>
> See also FAQ 4.5 (at the very end).
>
> --Per Hedeland
> per [at] hedeland.org
Lisa Casey [ Fr, 10 August 2007 21:36 ] [ ID #1792499 ]

Re: mailertable and sendmail configs

"Lisa Casey" <lisa [at] jellico.net> writes:
> [...]
> I rebooted the box and it works now. Don't know why. I did stop & start
> sendmail so it should have read the configs and a reboot sdhouldn't have
> been necessary, but it's working now. Thanks for the responses.
>
> Lisa

A wild guess: cached `old' MX record.

--
[pl>en: Andrew] Andrzej Adam Filip : anfi [at] priv.onet.pl : anfi [at] xl.wp.pl
"If a camel flies, no one laughs if it doesn't get very far."
-- Paul White
Andrzej Adam Filip [ Fr, 10 August 2007 21:52 ] [ ID #1792500 ]
Miscellaneous » comp.mail.sendmail » mailertable and sendmail configs

Vorheriges Thema: Problems With Connection Rate Throttling And Mailman
Nächstes Thema: sendmail FAQ