MailScanner+Postfix virtual_maps support

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

I use postfix + MailScanner. My postfix configuration includes these
virtual_mailbox_domains = mysql:/etc/postfix/
virtual_mailbox_base = /
virtual_mailbox_maps = mysql:/etc/postfix/
virtual_minimum_uid = 500
virtual_uid_maps = mysql:/etc/postfix/
virtual_gid_maps = mysql:/etc/postfix/
virtual_maps = mysql:/etc/postfix/
transport_maps = mysql:/etc/postfix/

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

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

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

The problem is when an email is sent to everyone at, the Score
assigned to everyone at 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 before MailScanner processes the queue file.

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_

Can anyone please give me advice on this?

Thank you.

More information about the MailScanner mailing list