[Esd-l] Problem with sendmail gateway

Benoit des Ligneris benoit.des.ligneris at physique.usherb.ca
Sat Oct 27 19:53:01 PDT 2001


Hello,

I did what is explained in the procmail on gateway with email sanitizer
http://www.impsec.org/email-tools/procmail-on-gateway.txt

I changed the MX record of the server so that all incoming mail is filtered with
the email sanitizer on the gateway (tested it with "direct" smtp relay and it's
OK).


I then use the mailertable db with the following record :
testmachine.baba.tata         procmail:/etc/procmail/procmailrc.gateway


However, there is a kind of mail loop because when procmail send the mail back.
sendmail gives the mail back to sendmail and it looops !

For instance : 

Oct 27 22:08:50 www02 sendmail[10590]: f9S28oL10590:
from=<ben at baba.tata.gaga>, size=1056, class=0, nrcpts=1,
msgid=<20011027220950.D26557 at baba.tata.gaga>, bodytype=8BITMIME,
proto=ESMTP, daemon=MTA, relay=[111.111.44.123]

Oct 27 22:08:50 www02 sendmail[10592]: f9S28oL10590:
to=<ben at testmachine.baba.tata>, delay=00:00:00, xdelay=00:00:00,
mailer=procmail, pri=31056, relay=/etc/procmail/procmailrc.gateway, dsn=2.0.0,
stat=Sent

and so one 25 times (its the max number of hop for the email !)



However it works fine for the local delivery :

Oct 27 22:42:48 www02 sendmail[12049]: f9S2gms12047:
to=ben at localmachine.baba.tata, ctladdr=ben (0/0), delay=00:00:00,
xdelay=00:00:00, mailer=procmail, pri=30304,
relay=/etc/procmail/procmailrc.gateway, dsn=2.0.0, stat=Sent

Oct 27 22:42:48 www02 sendmail[12055]: f9S2gmE12055:
from=ben at localhost.localdomain, size=451, class=0, nrcpts=1,
msgid=<20011027224248.C11644 at www02.usherb.ca>, relay=ben at localhost

Oct 27 22:42:50 www02 sendmail[12057]: f9S2gmE12055:
to=ben at localmachine.baba.tata.procmail, ctladdr=ben at localhost.localdomain (0/0),
delay=00:00:02, xdelay=00:00:02, mailer=local, pri=30451, dsn=2.0.0, stat=Sent

Which is the "wanted" behevior according to the LOCAL_RULE_0 of the sendmail.mc


Any help more than welcome !

Ben

-- 
 Quand le dernier arbre sera abattu 
 la dernihre rivihre assichie 
 le dernier poisson pjchi 
 L'homme se rendra compte que 
 l'argent n'est pas comestible.

Benoit des Ligneris 
ICQ : 12052994
http://www.physique.usherb.ca/~bligneri/ 
Tel. Travail : (819) 821-8000 3072 ou 3018 
fax.         : (819) 821-8046
Key Fingerprint : 3A58 11D1 686A B4D4 5220  BB34 7D98 BF45 B57B 85B8
 10:05pm  up 16 days,  8:55,  5 users,  load average: 0.50, 0.12, 0.03



More information about the esd-l mailing list