On Jan 1, 2009, at 12:58 PM, mouss wrote:
Jeff Weinberger a écrit :
I've been reading the dspam docs this morning and the project owner
states fairly strongly that sendmail is far preferable to SMTP
re-injection (in the postfix setup docs), but doesn't say why.
if he doesn't say why, then we don't know whether there was a
problem at
the time or if there is another reason. People have been using smtp
mode
without problems.
I don't
know enough about the workings of dspam (yet) to know, but I'd tend
to
agree with you on the use of SMTP as more desirable.
dspam has always had this mysql issue, which is related to its
database
of spam tokens, and I'll look into whether it might be related.
I don't think it is related, but check it though...
First let me thank mouss for all his generous help on this - as it
turned out, I was able to solve it with the information in this thread
and http://www.pubbs.net/postfix/200811/3719/ from Victor but it
required some trickery to get the envelope-sender past dspam.
I'm posting my solution here in the hope that it might help someone
else.
I used a pcre: table for smtpd_sender_restrictions and the PREPEND
action as follows:
main.cf:
smtpd_sender_restrictions = check_sender_access pcre:/etc/
postfix/smtpd_sender_restrictions.pcre
smtpd_sender_restrictions.pcre
/^(.*)/ PREPEND X-Envelope-Sender: ${1}
this will insert into every message a header "X-Envelope-Sender: "
followed by the envelope sender value. It won't pass the envelope-
sender as SMTP MAIL FROM (dspam wasn't designed to do that, and until
I take the step to a better before-queue filter or something that
does, this will work, since all I needed was to capture the envelope-
sender).
Limited testing shows this to work. There might be cases beyond what I
tested that will behave differently than I expect or very oddly.
Thanks again!