postfix-users

req: some help with my simple after-queue content filter

Subject: req: some help with my simple after-queue content filter
From: Jelle de Jong <jelledejong AT powercraft DOT nl>
To: postfix-users AT postfix DOT org
Date: Sun, 05 Aug 2007 12:43:06 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello everybody,

Setup:

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. I use with aliases and need the end deliver address to be
used inn the recipient field. Example: Email to info AT tuxcrafter DOT net
should has an alias for directed at user1 AT tuxcrafter DOT net. So the mail is
delivered to user1 AT tuxcrafter DOT net and spamc should use the
user1 AT tuxcrafter DOT net as recipient.

But when the filter is run info@tuxcrafter instead of the real
user1@tuxcrafter is used. This is causing big problems in my spam auto
learn system that is user specific. Spamc now uses the bayes for user
info@.. instead of user1@..

So how can I get postfix to pass the mail to the filter with the correct
recipient (after alias corrections)?

http://www.postfix.org/FILTER_README.html

I was hopping because I use an after queue filter the aliases were
already corrected before sending it to the filter.

Can somebody help me?

Best regards,

Jelle


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQCVAwUBRrWpuNVnJQVvY+R5AQJkHgP9HfJbToBi56Bw5wVis45/awQ/4EK5Qce7
zONZCmUdDHsBoHzANmfGkXSG0b4sNuNyt7JQ2ma1ArQu4Sagtg0rhzYi/wsJaR0Y
U84n+YBPEr7/9sFSNBlajwCjSx4uv4nltAhN1gVd/QcSiwsHBTedoxOJ5US+gsGm
jGylLNln8EY=
=CNah
-----END PGP SIGNATURE-----

<Prev in Thread] Current Thread [Next in Thread>