Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-10-2006, 03:55 PM
New Member
 
Posts: 3
Default [SOLVED] Amavisd relaying back to my ISP

Hi,

I've configured my Zimbra system in this way:

- All local addresses are rewriten from user@local.domain to userintheisp@isp.com with a smtp_generic_maps option in main.cf
- The mail is fetched from the ISP with fetchmail:

Code:
poll pop3.isp.com user userintheisp@isp.com with password pass is user@local.domain
Everything works as expected: users can send mail as user@local.domain and receive mail as userintheisp@isp.com. Local mail between user1@local.domain and user2@local.domain works well.

The problem starts when the AS/AV option is started:

- Local users can send mails
- Local users don't receive mails fetched from fetchmail because amavisd gets the MX record of the rewrited address (userintheisp@isp.com) as the relay.

How can I tell amavis to not relay some addresses and deliver locally? Is it possible to rewrite the recipient address before scanning/antispamming?

Thanks!
Reply With Quote
  #2 (permalink)  
Old 10-10-2006, 07:32 PM
Zimbra Employee
 
Posts: 4,792
Default

Why don't you have fetchmail deliver direct to Zimbra via LMTP and skip the AV/AS filtering?
__________________
Bugzilla - Wiki - Downloads - Offline Client
Reply With Quote
  #3 (permalink)  
Old 10-11-2006, 12:28 AM
New Member
 
Posts: 3
Default

Because I don't want to skip the AV/AS filter... I think that this is not a very unusual configuration (small office without a real domain) but I've been unable to find a solution.
Reply With Quote
  #4 (permalink)  
Old 10-11-2006, 01:43 AM
New Member
 
Posts: 3
Default

Ok,

Solved. I've put a pre-cleanup service in main.cf as described in http://www.ijs.si/software/amavisd/README.postfix.txt

Now we can send and receive mail with AV/AS. Nice.

Thanks!
Reply With Quote
  #5 (permalink)  
Old 01-16-2007, 04:14 PM
Member
 
Posts: 11
Default

Quote:
Originally Posted by atei View Post
Because I don't want to skip the AV/AS filter... I think that this is not a very unusual configuration (small office without a real domain) but I've been unable to find a solution.
why would you not get a domain or subdomain if you are going through the effort and cost of installing a mail server.
Reply With Quote
  #6 (permalink)  
Old 01-31-2007, 11:26 PM
Intermediate Member
 
Posts: 19
Default

Hi atei,

I'm having the same problem but can't get the pre-cleanup service working.

Do you mind posting the necessary configuration for everybody's benefit?

Thanks!

Floyd: Just a note on why people may want to do it this way. We are using an internal domain because we are slowly migrating from an existing POP service (the MX of our external domain points to our ISP), so for the moment we are using fetchmail to get external mail into Zimbra. Our internet connection is via a masqueraded ADSL router with non-static IP (and is also rather unreliable), making our internal mail server inappropriate for use as a primary MX for the outside world. We may look into getting an externally hosted server as a backup MX in the future, but its not feasible at this point.
Reply With Quote
  #7 (permalink)  
Old 02-22-2007, 07:04 PM
Intermediate Member
 
Posts: 19
Default

It turns out all this pre-cleanup business was a red-herring.

I managed to fix this issue by adding "smtp_generic_maps=" to the amavis service options in master.cf:

smtp-amavis unix - - n - 10 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
-o max_use=20
-o smtp_generic_maps=

This stops the outgoing generic map from being applied when the mail gets reinjected into postfix. This is probably only useful for people using smtp_generic_maps to rewrite their domain for outgoing email.

I've wasted many an hour on this... hopefully this helps someone.

-R
Reply With Quote
  #8 (permalink)  
Old 03-25-2008, 03:30 AM
Active Member
 
Posts: 40
Default

This is so great for me! riccadus, thank you so much!
I will also use this to help other people. Viva Zimbra and FOSS communities.

Tuan
Reply With Quote
  #9 (permalink)  
Old 10-29-2010, 07:42 AM
Starter Member
 
Posts: 1
Default

Thanks for pointing out amavis as the culprit! That saved me hours!
Actually, the master.cf parameter is overwritten when the MTA is restarted, thus being ineffective.
But in my personal case, we use our ISP's mailbox, which are already scanned for spams and virus, so I ended up deactivating these services.

I'm more than eager to read the final solution, but anyway, thanks a lot!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.