MailScanner+Postfix virtual_maps support

Juan Pablo Abuyeres jpabuyer at tecnoera.com
Wed Jul 19 22:59:27 IST 2006


I use postfix + MailScanner. My postfix configuration includes these
lines:
virtual_mailbox_domains = mysql:/etc/postfix/mysql-vdomains.cf
virtual_mailbox_base = /
virtual_mailbox_maps = mysql:/etc/postfix/mysql-mailbox-maps.cf
virtual_minimum_uid = 500
virtual_uid_maps = mysql:/etc/postfix/mysql-virtual-uid.cf
virtual_gid_maps = mysql:/etc/postfix/mysql-virtual-gid.cf
virtual_maps = mysql:/etc/postfix/mysql-virtual-maps.cf
transport_maps = mysql:/etc/postfix/mysql-transport-maps.cf

My MailScanner.conf file contains this line:
Required SpamAssassin Score
= /etc/MailScanner/rules/Tpanel.spamassassin.score.rules

and that file contains:
To: acct1 at tecnoera.com 5
To: acct2 at tecnoera.com 4
To: acct3 at tecnoera.com 6
To: everyone at tecnoera.com 1
To: acct4 at tecnoera.com 4
FromOrTo: default 6

everyone at tecnoera.com is really only an "alias".. it's a forward to
other accounts like "acct1 at tecnoera.com", "acct2 at tecnoera.com", and
others.

The problem is when an email is sent to everyone at tecnoera.com, the Score
assigned to everyone at tecnoera.com in the ruleset is not correctly
grabbed by MailScanner, because virtual_maps rewrites the queue files
and replaces the destination with each email address listed in
everyone at tecnoera.com before MailScanner processes the queue file.
(http://www.postfix.org/ADDRESS_REWRITING_README.html#virtual)

I can't use alias_maps because it's only for local transport, and I need
to use virtual.

I was trying a 2-postfix approach, one not using virtual_maps, just to
enqueue mails -> MailScanner -> another postfix... but it's just a big-
mess solution. I didn't like it at all.

So, what I think would be a good solution is an option in MailScanner to
either take options from rulesets for destinations just like it is doing
now, or instead take options from rulesets taking in account _original_
destinations.

Can anyone please give me advice on this?

Thank you.



More information about the MailScanner mailing list