> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of mouss
> Sent: Dienstag, 6. Marz 2007 23:46
> Cc: amavis-user
> Subject: Re: [AMaViS-user] amavis and aliases
> 
> 
> 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).
> 
> 

it works now. i added no_address_mappings to the receive_override_options
for the 10025 listener and removed no_address_mappings for smtp inet
listener.

smtp      inet  n       -       n       -       -       smtpd
  -o content_filter=smtp-amavis:127.0.0.1:10024
  -o receive_override_options=

here a short description what happened:
when i added the no_address_mappings to the above smtp listener the amavis
policies haven?t been applied for aliases. aliases for multiple accounts
didn?t work properly and the sender got a mail back "undelivered mail
returned to sender".

just removing the no_address_mappings option for the smtp listener solved
the problem with policies for aliases but didn?t solve the problem for
aliases with multiple accounts. the message have been delivered twice.
always got duplicate_mark and duplicate_check in the maillog.

adding the no_address_mappings to the 10025 listener solved all the
problems. aliases with policies for the destination account are working now
and aliases for multiple accounts are working too. but i still have the
problem with the duplicate_mark and duplicate_check in my maillog. how can i
solve this now?



-- 
I am using the free version of SPAMfighter for private users.
It has removed 3991 spam emails to date.
Paying users do not have this message in their emails.
Get the free SPAMfighter here: http://www.spamfighter.com/len

-------------------------------------------------------------------------
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
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to