On Sat, 16 Aug 1997, Philip Guenther wrote:
Lon <lon(_at_)ro(_dot_)com> writes:
I am trying to call procmail through the sendmail as described in the
procmail man page.
...
I have the following in S0 of the sendmail.cf of the receiving machine:
...
Your sendmail rules look good.
...
:0:
*^.*test
/var/spool/mail/test
The "^.*" does nothing, so you might as well toast it.
Thanks. It's gone now.
:0
! -oi -f"$@"
^-- Problem found. I needed space here.
#@&$%! postscript! I was reading the man page for procmail off of a
postscript printout and it looked like there was not a space inbetween the
-f and the "$@". I looked at the sendmail logfile and without the space
there the sender was getting set to root(_at_)localhost instead of
lon(_at_)ro(_dot_)com
and sendmail was sending a copy to lon(_at_)ro(_dot_)com and to
lon(_at_)testmachine(_dot_)ro(_dot_)com(_dot_)procmail(_dot_) Should have just
cut and paste from the
man page.
...
"/usr/sbin/sendmail,-oi,-oi,-flon(_at_)ro(_dot_)com,lon(_at_)testmachine(_dot_)ro(_dot_)com(_dot_)procmail@testmachine.ro.com"
That odd address,
"lon(_at_)testmachine(_dot_)ro(_dot_)com(_dot_)procmail@testmachine.ro.com",
adds credence to the theory that the R directive on the procmail mailer
is not correct. The extra "@testmachine.ro.com" should not have been
added. However, the above appears to show that sendmail had only one
recipient address to begin with, namely yours. Do you have log entries
for when you send a message to someone else?
I changed it to now go through Rule 20 instead of 21. Rule 21 calls rule
61 which was adding < @ *LOCAL* > to the end. Now it sends to
lon(_at_)testmachine(_dot_)ro(_dot_)com(_dot_)procmail(_dot_)
Philip Guenther
Thanks for the help.
-- Lon B.
##### sendmail log without space between -f and "$@"
Aug 17 11:55:55 testmachine sendmail[4111]: SMTP connect from huie.ro.com
[206.96.161.14] (206.96.161.14)
Aug 17 11:55:55 testmachine sendmail[4112]: LAA04112:
from=<lon(_at_)ro(_dot_)com>,
size=303, class=0, pri=30303, nrcp
ts=1, msgid=<33F74A1C(_dot_)5F7E(_at_)ro(_dot_)com>, proto=SMTP,
relay=huie.ro.com
[206.96.161.14]
Aug 17 11:55:56 testmachine sendmail[4114]: LAA04112:
to=<lon(_at_)testmachine(_dot_)ro(_dot_)com>, delay=00:00:01, xdelay=00:00:00
, mailer=procmail, relay=/etc/procmailrcs/test.rc, stat=Sent
Aug 17 11:55:56 testmachine sendmail[4114]: LAA04112: done
Aug 17 11:55:57 testmachine sendmail[4116]: LAA04116: from=root, size=454,
class=0, pri=60454, nrcpts=2, msgid=
<33F74A1C(_dot_)5F7E(_at_)ro(_dot_)com>, relay=root(_at_)localhost
Aug 17 11:55:57 testmachine sendmail[4118]: LAA04116: to=lon(_at_)ro(_dot_)com,
ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=esmtp,
relay=ro.com. [205.216.92.5], stat=Sent
(LAA24015 Message accepted for delivery)
Aug 17 11:55:58 testmachine sendmail[4118]: LAA04116:
to=lon(_at_)testmachine(_dot_)ro(_dot_)com(_dot_)procmail, ctladdr=root (0/0),
dela
y=00:00:01, xdelay=00:00:01, mailer=local, stat=Sent
Aug 17 11:55:58 testmachine sendmail[4118]: LAA04116: done
### sendmail log with the space between -f and "$@"
Aug 17 11:59:17 testmachine sendmail[4132]: SMTP connect from huie.ro.com
[206.96.161.14] (206.96.161.14)
Aug 17 11:59:17 testmachine sendmail[4133]: LAA04133:
from=<lon(_at_)ro(_dot_)com>,
size=346, class=0, pri=30346, nrcp
ts=1, msgid=<33F74AE6(_dot_)4DE4(_at_)ro(_dot_)com>, proto=SMTP,
relay=huie.ro.com
[206.96.161.14]
Aug 17 11:59:17 testmachine sendmail[4135]: LAA04133:
to=<lon(_at_)testmachine(_dot_)ro(_dot_)com>, delay=00:00:00, xdelay=00:00:00
, mailer=procmail, relay=/etc/procmailrcs/test.rc, stat=Sent
Aug 17 11:59:17 testmachine sendmail[4135]: LAA04133: done
Aug 17 11:59:19 testmachine sendmail[4137]: LAA04137:
from=lon(_at_)ro(_dot_)com,
size=497, class=0, pri=30497, nrcpts
=1, msgid=<33F74AE6(_dot_)4DE4(_at_)ro(_dot_)com>, relay=root(_at_)localhost
Aug 17 11:59:19 testmachine sendmail[4139]: LAA04137:
to=lon(_at_)testmachine(_dot_)ro(_dot_)com(_dot_)procmail,
ctladdr=lon(_at_)ro(_dot_)com (
0/0), delay=00:00:01, xdelay=00:00:00, mailer=local, stat=Sent
Aug 17 11:59:19 testmachine sendmail[4139]: LAA04137: done