On Jan 1, 2009, at 9:31 AM, mouss wrote:

jeff_homeip a écrit :
--- In post...@yahoogroups.com, mouss <mo...@...> wrote:
Jeff Weinberger a écrit :
I've verified that the "R" flag is there and I use -f ${sender} on the
command line (the script does parse the arguments)

I think the envelope-sender is missing before it enters the content
filter. This from my mail.log:

Dec 31 19:50:07 s postfix/qmgr[3345]: A4C5E2943D74: from=<m...@...>,
size=1505, nrcpt=1 (queue active)

look at the queue-id: A4C5E2943D74

Dec 31 19:50:07 s postfix/smtpd[3340]: disconnect from
smtp120.isp.mail.sp1.myisp.tld[69.147.64.93]

postfix disconnects from 69.147.64.93.

Dec 31 19:50:07 s dspam[3356]: query error: VERBOSE DEBUG (INFO ONLY -
NOT AN ERROR): see sql.errors for more details

dspam barks. so dspam got the message.

Dec 31 19:50:09 s postfix/smtpd[3348]: connect from localhost[127.0.0.1]

dspam connects to postfix (after the filter smtpd).

Dec 31 19:50:09 s postfix/smtpd[3348]: 646A62943D79:
client=localhost[127.0.0.1]

this dspam connection has a queue-id of 646A62943D79

Dec 31 19:50:09 s postfix/cleanup[3344]: 646A62943D79:
message-id=<fb0b0ed6-d05d-48c6-a077-10662907d...@...>
Dec 31 19:50:09 s postfix/qmgr[3345]: 646A62943D79: from=<>, size=2936,
nrcpt=1 (queue active)

the envelope sender is empty for queue-id 646A62943D79, which
corresponds to dspam re-injection. so dspam has reinjected the message
with an empty sender.

Dec 31 19:50:09 s postfix/smtpd[3348]: disconnect from localhost[127.0.0.1]
Dec 31 19:50:09 s postfix/pipe[3346]: A4C5E2943D74:
to=<mypost...@...>, relay=dspam, delay=5.1,
delays=3.4/0/0/1.7, dsn=2.0.0, status=sent (delivered via dspam service)

once dspam has delivered the message, postfix tells you that the
original transaction was delivered. this comes late because dspam does
not queue mail, so postfix can't know that delivery _will_ succeed.

[snip]



From this log entry it looks like the envelope sender is empty before the mail is send to dspam - the "from=<>" three lines before the mail is delivered to dspam makes me think
this.


don't rely on the order of log lines. Instead, look at the queue-id:

A4C5E2943D74 is the queue-id when postfix received the message from the network. 646A62943D79 is the queue-id when postfix received the message
from localhost, which should be dspam re-injection.


When I look at the log entries for the message when it comes back into postfix from
dspam the envelope sender is also empty (again "from=<>"


see above. the log doesn't tell you "I am about to pass mail to dspam". it tells you "mail was delivered, and it was done via dspam". This means
that dspam took the message and said "OK" to postfix, and since dspam
doesn't have a queue manager, this means that the message was already
filtered and passed to postfix/smtpd (the "after the filter" one).

So isn't there something losing the envelope sender before it ever gets to dspam?

but to answer your question directly, dspam re-injects the mail into postfix using SMTP on an alternate port, the same way as is illustrated in the CONTENT_FILTER_README for an
after-queue content filter.


so the problem is in dspam.

Does that help?


I asked just to make sure it was not passing the message to something
else that does the re-injection.



Thank you! That helps clarify what I was missing in this - so clearly dspam is not passing the envelope sender back to postfix.

I suspect it doesn't know how via SMTP, but it can also use the sendmail command to do this. I will experiment with this.

would the correct command be "/usr/sbin/sendmail -f" ?

thanks!

Reply via email to