Philippe Trolliet wrote:
>
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] Behalf Of Philippe
>> Trolliet
>> Sent: Montag, 5. Marz 2007 11:41
>> To: amavis-user
>> Subject: Re: [AMaViS-user] amavis and aliases
>>
>>
>>
>>
>>
>>> -----Original Message-----
>>> From: [EMAIL PROTECTED]
>>> [mailto:[EMAIL PROTECTED] Behalf Of mouss
>>> Sent: Samstag, 3. Marz 2007 18:53
>>> Cc: amavis-user
>>> Subject: Re: [AMaViS-user] amavis and aliases
>>>
>>>
>>> Philippe Trolliet wrote:
>>>
>>>>> I am not sure if this will help you. But still here is my config.
>>>>> I have a qmail-ldap setup with Amavisd-new (Qmqp patched) with
>>>>> ldap-lookups enabled. For My email accounts i create a entry in the
>>>>> Ldap with required Amavis attribs and in my Amavisd.conf I have
>>>>> following search filter
>>>>> ---
>>>>> query_filter =>
>>>>> '(&(objectClass=amavisAccount)(|(mail=%m)(mailalternateaddress=%m))
>>>>> )',
>>>>> ---
>>>>>
>>>>> Regards
>>>>> Ram
>>>>>
>>>>>
>>>>>
>>>> ah sorry, doesn?t help and i forgot to tell that i?m using a
>>>>
>>> virtual domain
>>>
>>>> system based on a mysql db. i?m using postfix, cyrus-imapd and
>>>>
>>> amavisd-new.
>>>
>>>> the aliases are in a different table than the user settings
>>>>
>>> (e.g. password,
>>>
>>>> policy_id, etc.) and the policy information itself.
>>>>
>>>>
>>> you can certainly write the right sql query to get the result you want.
>>>
>>> If you decide that aliases should have the same policy as their
>>>
>> targets,
>>
>>> and accept to ignore the effect of rewrite in bayes, then just do alias
>>> expansion before amavisd-new instead of after it (move the
>>>
>> corresponding
>>
>>> receive_override_mapping to the 10025 listener).
>>>
>>>
>> ok, you mean rewrite the mail address before the mail is passed to
>> amavisd-new. is that right?
>> how can i do that?
>> i?m using postfix as MTA.
>>
>>
>
> ok, i got it. in /etc/postfix/master.cf in the line
>
> smtp inet n - n - - smtpd
> -o content_filter=smtp-amavis:127.0.0.1:10024
> -o receive_override_options=no_address_mappings
>
> i just had to remove the no_address_mappings. then it worked and amavis used
> the same policies for the alias as defined for the destination e-mail
> address.
>
but don't just remove it. alias expansion should only happen once,
otherwise, aliases such as
foo foo, bar
will result in duplicates:
[before filter]
foo => foo, bar
[after filter]
foo, bar => foo, bar, bar
thus bar gets the message twice.
so you need to put the option in the after the filter smtpd (the 10025
listener).
more generally, if you daisy chain N filters, then no_address_mappings
should be set in all smtpd listeners but one.
by default, people want alias expansion to happen at last (as close to
delivery as possible). this is more important for aliases that expand to
a lot of addresses. another argument is so that the filter sees a
"virgin" message. this is however debatable, as that would mean filters
should be at the edge, which is an unnecessary requirement. I believe
aliases should be split into two parts: reception time aliases (for
aliases that should have the same policy as the target address, as in
your case), and delivery time aliases (large lists, or aliases that need
to have their own policies. I use multiple addresses that get different
mail, and have different FP acceptability. but I don't use aliases for
this. I just use different accounts. after all, MUAs today support
multiple accounts).
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/