On Sunday, August 05, 2007 at 12:43 CEST,
Jelle de Jong <jelledejong AT powercraft DOT nl> wrote:
> I have a very nice spamc / spamd sql userpref based spamassassin
> configuration for my postfix and dovecot mailserver.
>
> /etc/postfix/master.cf:
> smtp inet n - - - - smtpd
> -o receive_override_options=no_address_mappings
> -o content_filter=filter:dummy
> filter unix - n n - 10 pipe
> flags=Rq user=filter argv=/usr/bin/spamc -u ${recipient} -e
> /usr/sbin/sendmail -G -i -f ${sender} -- ${recipient}
>
> problem description:
>
> When the filter is executed the recipient is not the email address were
> the mail should be delivered to, but it is the mail address located in
> the TO header.
No, the To: header is irrelevant. Postfix will however pass the original
ENVELOPE recipient address (which may or may not coincide with the
To: HEADER address) as ${recipient} since you've explicitly disabled
address rewriting with receive_override_options=no_address_mappings. If
you want address rewriting before the filter then remove that override
and think about why it was added in the first place.
Also note that unless you have
filter_destination_recipient_limit = 1
in your main.cf the filter will misbehave if a single message has more
than one local recipient.
[...]
--
Magnus Bäck
magnus AT dsek.lth DOT se
|