MailScanner+Postfix virtual_maps support

Julian Field MailScanner at ecs.soton.ac.uk
Sun Jul 23 11:29:46 IST 2006


Please try the support for this in the latest beta, and let me know  
if it has improved.

On Fri21 Jul 06, at 20:58, Drew Marshall wrote:

> On 19 Jul 2006, at 22:59, Juan Pablo Abuyeres wrote:
>
>> 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?
>
> Sadly there isn't really any advice to give. This is a 'design  
> feature' of Postfix's virtual alias expansion. The only work round  
> is to make everyone a local alias, which expands to the virtual  
> aliases later e.g. everyone at ecnoera.com =>  
> everyone at host.ecnoera.com and then in aliases you then have  
> everyone:	acct1 acct2 etc. You then set your score.rules file  
> acordingly.
>
> Not ideal but less messy than 2 Postfix instances.
>
> Drew
>
> -- 
> In line with our policy, this message hasbeen scanned for viruses  
> and dangerouscontent by MailScanner, and is believed to be clean.
> www.themarshalls.co.uk/policy
>
> -- 
> MailScanner mailing list
> mailscanner at lists.mailscanner.info
> http://lists.mailscanner.info/mailman/listinfo/mailscanner
>
> Before posting, read http://wiki.mailscanner.info/posting
>
> Support MailScanner development - buy the book off the website!

--
Julian Field
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store !
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.



More information about the MailScanner mailing list