[Esa-l] Filter doesn't send to multiple addresses

Pedro Timoteo deh at contentlab.net
Wed Sep 20 03:19:04 PDT 2000


Hi. I'm setting up a mail gateway on a Solaris box using Sendmail 8.11
(compiled from source) and the procmail filter.
It delivers all mail to a windows Lotus Notes server. The filter seems to
be working fine, but with one problem: if a message is sent from outside to
multiple addresses inside the company, only one of them (the last one) gets
the mail, whether it was "changed" by the filters or not.

I have the Lotus server specified as a "smart host", in the sendmail.cf,
like this:

# "Smart" relay host (may be null)
DSmailin.contentlab.net

and I followed the instructions from
ftp://ftp.rubyriver.com/pub/jhardin/antispam/procmail-on-gateway.txt. I set
this as a delivery agent:

Mprocmail,      P=/usr/bin/procmail, F=DFMmShu, S=11/31, R=21/31,
T=DNS/RFC822/X-Unix,
                A=procmail -m MAIL_FROM="$_" MAIL_TO="$u" $h


and added this:

# pipe through procmail for processing
R$*<@contentlab.net>$*          $#procmail $@/etc/procmail/filter.rc
$:$1<@contentlab.net.procmail.>$2
R$*<@contentlab.net.>$*         $#procmail $@/etc/procmail/filter.rc
$:$1<@contentlab.net.procmail.>$2
R$*<@$*.procmail.>$*            $1<@$2.>$3


Here's the relevant bit in the sendmail logs:

Sep 20 11:21:35 wnet sendmail[9049]: [ID 801593 mail.info] e8KALYt09049:
from=<ptimoteo at hotmail.com>, size=850, class=0, nrcpts=2,
msgid=<F98CEGJiCuOUfwFbq0k0000ec8a at hotmail.com>, proto=ESMTP, daemon=MTA,
relay=f98.law10.hotmail.com [64.4.15.98] (may be forged)
Sep 20 11:21:35 wnet sendmail[9051]: [ID 801593 mail.info] e8KALYt09049:
to=<deh at contentlab.net>,<marcovaz at contentlab.net>, delay=00:00:01,
xdelay=00:00:00, mailer=procmail, pri=150850,
relay=/etc/procmail/filter.rc, dsn=2.0.0, stat=Sent
Sep 20 11:21:35 wnet sendmail[9053]: [ID 801593 mail.info] e8KALZa09053:
from=<ptimoteo at hotmail.com>, size=1041, class=0, nrcpts=1,
msgid=<F98CEGJiCuOUfwFbq0k0000ec8a at hotmail.com>, relay=root at localhost
Sep 20 11:21:40 wnet sendmail[9055]: [ID 801593 mail.info] e8KALZa09053:
to=marcovaz at contentlab.net.procmail, delay=00:00:05, xdelay=00:00:05,
mailer=relay, pri=121041, relay=mailin.contentlab.net. [192.168.1.1],
dsn=2.0.0, stat=Sent (Message accepted for delivery)


As you can see, it passes two addresses to the filter, but the filter
passes back just the last one. :(


Can anyone help? 
Thanks,
Pedro Timoteo




More information about the esd-l mailing list