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 03-05-2010, 01:05 AM
Junior Member
 
Posts: 6
Default [SOLVED] Zimbra default settings for mail headers rewrite

Hello,

When email is received with badly formed From/To headers:
Code:
From: an evil spammer@spam.com
To: me
it is rewritten the following way:
Code:
From: an@$mydomain, evil@$mydomain, spammer@spam.com
To: me@$mydomain
which is very confusing for the person receiving such email.

Zimbra default setting for postfix headers rewrite seems very reasonable and should not allow this:
Code:
local_header_rewrite_clients = permit_mynetworks,permit_sasl_authenticated
The problem is that this setting does not work!
When incoming email scanned with amavis it gets reinjected to postfix from 127.0.0.1 source address, which falls under permit_mynetworks criterium.

As a workaround I completely disabled From/To headers rewrite:
Code:
local_header_rewrite_clients =
Is there any more elegant way to resolve this issue?
Is it a bug?

PS: Zimbra version - ZCS 6.0.5 open source

Thank you,
Ivan.

Last edited by ivan78; 03-05-2010 at 01:20 AM..
Reply With Quote
  #2 (permalink)  
Old 03-05-2010, 02:21 AM
Moderator
 
Posts: 7,928
Default

Welcome to the forums

How does that effect things ? as the SPAM email should be rejected before being injected back in by LMTP.
__________________
Reply With Quote
  #3 (permalink)  
Old 03-05-2010, 03:16 AM
Junior Member
 
Posts: 6
Default

Thanks.

Are you sure all spam emails are rejected by spam filter? If that was true there would not be such problem in the world as SPAM. :-)
This issue bothers me because my users receiving spam messages as if they were sent from my email server.

Ivan.
Reply With Quote
  #4 (permalink)  
Old 03-05-2010, 03:27 AM
Moderator
 
Posts: 7,928
Default

I understand where you are coming from but that would be no different than a spam coming through as
Code:
From: me@$mydomain
To: me@$mydomain
Are you blocking those as well ? You could add
Code:
smtpd_recipient_restrictions =  reject_non_fqdn_sender
__________________
Reply With Quote
  #5 (permalink)  
Old 03-05-2010, 09:13 AM
Junior Member
 
Posts: 6
Default

Quote:
Originally Posted by uxbod View Post
I understand where you are coming from but that would be no different than a spam coming through as
Code:
From: me@$mydomain
To: me@$mydomain
Are you blocking those as well ?
Let me explain my point again.
Yes, spamers can send emails from @$mydomain, but from my experience:
- they prefer not to do it because they aware of sender verification, such as SPF and DKIM
- if they do it, i know how to deal with that issue

I'm dealing with a case when spamer, not qualified enough to compose valid email template, sending me spam with malformed From: header. This is not a single case, this happens on daily basis.
That's why I'm asking for help. And my question is - how to make Zimbra not to rewrite malformed From: header to multiple addresses from my domain.

Quote:
Originally Posted by uxbod View Post
You could add
Code:
smtpd_recipient_restrictions =  reject_non_fqdn_sender
This check is enabled, but it is related to envelope from, not From: header.

Thank you,
Ivan.
Reply With Quote
  #6 (permalink)  
Old 03-05-2010, 09:30 AM
Moderator
 
Posts: 7,928
Default

Okay; I would file a RFE on this one. I believe the better approach would to be use something like
Code:
local_header_rewrite_clients = permit_sasl_authenticated, check_address_map hash:/opt/zimbra/conf/postfix_interfaces.cf
And in the .cf just have the primary IP address of the server and not the loopback. Great catch
__________________
Reply With Quote
  #7 (permalink)  
Old 03-05-2010, 11:42 AM
Junior Member
 
Posts: 6
Default

Well, after some researching I found a proper way to fix my problem.
Amavis injects scanned email back to postfix via special smtpd instance, listening on localhost:100025, which has its own set of configuration parameters.

I've just added
Code:
-o local_header_rewrite_clients=
at the bottom of master.cf.in and restarted the postfix.

I guess this should be enabled by default.
How this can be done? Please advise.

Ivan.
Reply With Quote
  #8 (permalink)  
Old 03-05-2010, 11:52 AM
Moderator
 
Posts: 7,928
Default

Please file a RFE and people will be able to vote for it (and say it is a bug).
__________________
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.