Gary wrote:

> Guillaume wrote:

>> Hello,

>> I Googled my interrogation and searched the list, but it was irrelevant, 
>> so I am posting my question here.

>> In my company, we are currently hosting mails for some domains.  So, if 
>> someone sends an email to one of these domains, for example to 
>> [EMAIL PROTECTED], Postfix rewrites it to [EMAIL PROTECTED] and sends it to 
>> AMaViS, XX being a number, the one assigned to the user the email is 
>> sent to.

>> However, in my Amavis configuration file, for the whitelist of these 
>> domains, we put something like ".foo.com => read_hash("whitelist_file")"

>> That doesn't work since amavis receives the recipient as @ourdomain.com
>> instead of @foo.com (from Postfix).  The easy solution would be to add 
>> each email we are hosting in the file, pointing to the whitelist file.  
>> However, this is a long process and is not very efficient.  I though of 
>> regexes, put it didn't work either.

>> So, I was wondering if there would be a way of telling amavis to rewrite 
>> the recipient address from [EMAIL PROTECTED] to [EMAIL PROTECTED], in the 
>> configuration file.  Is it possible?  If not, could this problem be 
>> solved with a regexp?  If so, how?

>> Thank you for your help!  And sorry for my bad english, my mother tongue 
>> is French...

>> Good day,
>> Guillaume Gervais.

> Assuming you are using amavisd-new as an 'after queue' content filter
> you could investigate delaying address rewriting until after that mail
> has already passed through amavisd-new (address rewriting would occur
> when the mail is reinjected).

> http://www.postfix.org/postconf.5.html#receive_override_options
> http://www.postfix.org/FILTER_README.html#advanced_filter
> http://www.ijs.si/software/amavisd/README.postfix.txt

> You can use either receive_override_options or two cleanup services.
> In addition to what happens when mail is received via smtpd, consider
> what happens to mail received via the pickup service - notably if you
> are overriding the content_filter (-o content_filter=) for the pickup
> service. You may have to juggle placement of
> receive_override_options=no_address_mappings between main.cf and
> master.cf. I'm sure there are other options, but I would personally
> choose this.

Of course it depends on how much of your setup is already tied to
rewritten addresses. If you have 5000 users all set up in SQL using
the rewritten addresses, this would not be ideal. You would need to
spend a little time thinking through the implications.

Gary V


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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/

Reply via email to