Re: [Exim] Translating Sendmail....

Top Page
Delete this message
Reply to this message
Author: krelvinaz
Date:  
To: Tabor J. Wells
CC: exim-users
Subject: Re: [Exim] Translating Sendmail....
> From: "Tabor J. Wells" <twells@???>
> Date: 2003/07/28 Mon PM 05:47:40 EDT
> Subject: Re: [Exim] Translating Sendmail....
>
> Well you're probably not going to find too many sendmail experts on the
> exim-users list, so why don't you post details of the routing requirement
> and what you're trying to accomplish and someone here should be able to help
> with that. We can help you get to the end result you're looking for if we
> know what it is.


Okay... this is a bit long.

Basically what I am replacing is a mail hub. 99% of the stuff is really easy... This one route is causing me grief though...

The grief is for mail that arrives for a set of special domains that need to be routed to a specific server for processing. They arrive in the format of user@???. The user is normally a phone number or special code as these are fax, telex and other special processes.

The mail hub (mailhost - phxsnp05) is live.. running sendmail switch. These special routes are going to a server called palm.

When I inject a message into the system using Sendmail... It goes from the mailhost (phxsnp05) to the remote server (palm) like it should and palm deals with it...

If I inject it in using exim on the same server... It goes to the external server (palm) like it should, but then it is sent back to the mailhost, which then sees it as the same thing, forwards it back to the palm server which then polietly accepts it and does what it does.

There is something different in how the message looks when the palm server gets it from Exim as when it gets it from Sendmail. But I can't figure out what it is...

For some reason, the mail coming from Exim is not beeing seen properly by the receiving sendmail on palm.

Again, this is a live system and I can't remove it without effecting mail to all users and processes.

If startup Exim as the mail server, these types of messages will rattle back and forth until too many hops have occurred.

Below are copies of an actual message...

####################
## USING SENDMAIL
####################

When the message is injected into /usr/lib/sendmail

    /usr/lib/sendmail -f kreed@??? -t < test-fax


it shows up on the mailhost log as being injected, and going to palm (the remote server). Palm shows getting it and it processes it with its wierd route that get picked up internally by some special mail processing package.

MailHost Log:

Jul 28 14:31:25 phxsnp05 sendmail[259]: h6SLVP300259: from=kreed@???, size=512, class=0, nrcpts=1, msgid=<200307282131.h6SLVP300259@???>, relay=root@localhost

Jul 28 14:31:25 phxsnp05 sendmail[261]: h6SLVP300259: to=6027285220@???, delay=00:00:00, xdelay=00:00:00, mailer=smtp, pri=120512, relay=palm.mkt.tosco.com. [164.123.188.143], dsn=2.0.0, stat=Sent (OAA76844 Message accepted for delivery)

Palm Log:

logmsg: pri 26, flags 0, from palm, msg Jul 28 14:31:25 sendmail[76844]: OAA76844: from user <kreed@???>: size is 754, class is 0, priority is 30754, and nrcpts=1, message id is <200307282131.h6SLVP300259@???>, protocol=ESMTP, relay=phxsnp05.tosco.com [148.89.201.23]

logmsg: pri 26, flags 0, from palm, msg Jul 28 14:31:26 sendmail[47716]: OAA76844: to=<6027285220@attfax@???>, delay=00:00:01, xdelay=00:00:01, mailer=attims, stat=Sent

=====================================================================

As you can see.. the message was injected, when it got to the palm server it saw it properly and routed it via the attims router.

Now when I do it with exim...

####################
## USING EXIM
####################

When the message is injected into exim... (same mail file)

    /usr/local/exim/bin/exim -f kreed@??? -t < test-fax


it shows up on the mailhost log (exim) as being injected, and going to palm (the remote server). Palm shows getting it but then bounces it back to the mailhost it came from which then sees it arriving (this is the running sendmail server), and redelivers it back to the remote server which accepts it and processes it with its attims router.

Exim outoing log

2003-07-28 17:32:29 19hFbZ-00005F-KN <= kreed@??? U=root P=local S=749 from <kreed@???> for 6027285220@???

2003-07-28 17:32:30 19hFbZ-00005F-KN => 6027285220@??? R=cometsroute T=remote_smtp H=palm.mkt.tosco.com [164.123.188.143] C="250 OAA31014 Message accepted for delivery"


palm log

logmsg: pri 26, flags 0, from palm, msg Jul 28 14:32:30 sendmail[31014]: OAA31014: from user <kreed@???>: size is 749, class is 0, priority is 30749, and nrcpts=1, message id is <E19hFbZ-00005F-KN@???>, protocol=ESMTP, relay=phxsnp05.tosco.com [148.89.201.23]

logmsg: pri 26, flags 0, from palm, msg Jul 28 14:32:30 sendmail[109224]: OAA31014: to=<6027285220@???>, delay=00:00:00, xdelay=00:00:00, mailer=relay, relay=mailhost.tosco.com. [::ffff:148.89.201.23], stat=Sent (2.0.0 h6SLWUI00331 Message accepted for delivery)

phxsnp05 log

Jul 28 14:32:30 phxsnp05 sendmail[331]: h6SLWUI00331: from=<kreed@???>, size=941, class=0, nrcpts=1, msgid=<E19hFbZ-00005F-KN@???>, proto=ESMTP, daemon=MTA, relay=palm.mkt.tosco.com [164.123.188.143]

Jul 28 14:32:30 phxsnp05 sendmail[333]: h6SLWUI00331: to=<6027285220@???>, delay=00:00:00, xdelay=00:00:00, mailer=smtp, pri=120941, relay=palm.mkt.tosco.com. [164.123.188.143], dsn=2.0.0, stat=Sent (OAA31384 Message accepted for delivery)


Palm Log

logmsg: pri 26, flags 0, from palm, msg Jul 28 14:32:30 sendmail[31384]: OAA31384: from user <kreed@???>: size is 1176, class is 0, priority is 31176, and nrcpts=1, message id is <E19hFbZ-00005F-KN@???>, protocol=ESMTP, relay=phxsnp05.tosco.com [148.89.201.23]

logmsg: pri 26, flags 0, from palm, msg Jul 28 14:32:30 sendmail[112004]: OAA31384: to=<6027285220@attfax@???>, delay=00:00:00, xdelay=00:00:00, mailer=attims, stat=Sent

==============================

For some reason, when Exim is sending the message, the attims router doesn't get used.

My only guess is that the original mail hub is changing the address some how before sending the message to the palm server which it then sees, but when Exim does it, it is not doing whatever it wants and just doesn't see it the same way.

If I were to replace the mail hub now, I would end up with an endless loop on these types of special routes but I don't know why.

All I can figure is that somehow, Sendmail presents it in such a way that the other sendmail sees it and Exim isn't doing the same thing.

I don't think the log files show any real difference between the two inbound messages.

===

On the Mailhost that is forwarding this stuff…

Exim router for this is setup like.

File: comets has in it…

attfax.tosco.com
atttelex.tosco.com
vsifax.tosco.com
…

cometsroute:
driver = manualroute
domains = "partial-lsearch;/usr/local/exim/comets"
route_list = * palm.mkt.tosco.com bydns
transport = remote_smtp
no_more


The Sendmail.cf section that does this (I think) is…

Sendmail.cf info

The section that does this for Sendmail (I think) is…

C{SpecialDomain} attfax atttelex vsifax skytel pagenet attinvf attinvt
[more names are here]

…

R$+<@ $={SpecialDomain}.tosco.com> $#smtp $@ palm.mkt.tosco.com $: $1@$2
R$+<@ $={SpecialDomain}.tosco.com.> $#smtp $@ palm.mkt.tosco.com $: $1@$2


On Palm (the server that this stuff gets routed to) the section of sendmail.cf that I think pertains is:

C{FaxPage} attfax atttelex vsifax skytel pagenet attinvf attinvt

###########################################
### Rulset 3 -- Name Canonicalization ###
###########################################
S3

R$+@$={FaxPage}         $@$1<@$2>
R$+@$={FaxPage}.tosco.com               $@$1<@$2>


....

#
# Pass only addresses consisting of exactly one token, an '@', and one
# or more tokens.
#
R$-@$+                  $#$1.$2


######################################
### Ruleset 0 -- Parse Address ###
######################################

S0
################ JJG added email express specific aliases ##################
R$*@$+<@mailhost3.tosco.com.>   $: $1<@$2>
R$+<@$={FaxPage}>               $#attims $:$1@$2
R$+<@$={FaxPage}.tosco.com>             $#attims $:$1@$2


#
# Added gehr
#
R$*@$+<@phxsnp05.tosco.com.>    $: $1<@$2>
R$+<@$={FaxPage}>               $#attims $:$1@$2
R$+<@$={FaxPage}.tosco.com>             $#attims $:$1@$2



Hopefully someone sees the obvious that I am missing...

All of these mail servers are internal.