On Jan 2, 2009, at 2:30 AM, mouss wrote:

Jeff Weinberger a écrit :

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,

dspam gets it via LMTP MAIL FROM, and it will pass it back to postfix
with SMT MAIL FROM. I have used this in the past and I'm sure others are
using it now (ping steve?). something in your setup prevents this from
working but I don' think it is a dspam limitation.

It's definitely my set up. I don't use LMTP to pass the message to dspam, I use a transport called "dspam" that uses pipe. That means there's no S/LMTP dialog, just the message itself passed as STDIN.

I have to move dspam to use LMTP and then move it to a before-queue content filter so that this workaround becomes unnecessary, but until I go to make those changes, this will suffice.

I'm not completely convinced that dspam will work seamlessly as a before-queue content filter, so I'll have to do some testing to see how well that works and whether it can do what I need and hand fully formed messages with SMTP dialog information back to postfix.

Thank you!!



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!




Reply via email to