I have a mail system based on postfix amavisd spamassassin clamav. I
wanted to e-mail that come from the outside were filtered before queue.
I tried to use smtpd_proxy_filter but encountered a problem.

When I use the content_filter, postfix sends mail to amavis after using
virtual_alias_maps, so sends to the target mailbox.

When I use smtpd_proxy_filter, postfix sends mail to amavis with the
same RCPT TO he got from the client.

Theoretically, this is no problem but for me it is because I amavisie
settings retrieved from mysql to each recipient separately.
Theoretically, this is no problem but for me it is, because amavis
settings are retrieved from mysql to each recipient separately. I also
have aliases that direct into two or more mailboxes and each of them can
have different settings in amavisie.

Now, when using smtpd_proxy_filter send mail to alias "A" which directs
to the mailbox "B" and "C" amavis gets RCPT TO "A" and trying to find a
setting for "A". It is impossible to replace "A" by example "B" because
it can have different settings than the "C"

Using a content_filter when send mail to alias "A" which directs to the
mailbox "B" and "C" amavis gets RCPT TO "B" RCPT TO "C" and everything
is fine.

I thought it was impossible to smtpd_proxy_filter sent mails to amavis
after using virtual_alias_maps because cleanup process perform
virtual_alias_maps, but smtpd process needs to know about all aliases,
because how else he could rejected emails to non-existent mailboxes.

So I have a question. Is it possible to set postfix to send mail to
amavis before queue but after perform virtual_alias_maps or another
aliases map?

-- 
Best regards!
Piotr Rotter

Reply via email to