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 12-09-2009, 04:10 PM
New Member
 
Posts: 3
Default Regex and Postfix_header_checks.in Not working

So, we are testing this out ... but we got this nasty Received: section popping thru on the email

Received: from localhost (localhost.localdomain [127.0.0.1])
by vmail.redibank.com (Postfix) with ESMTP id E140523509
for <bradrose@hotmail.com>; Wed, 9 Dec 2009 16:49:43 -0700 (MST)
X-Virus-Scanned: amavisd-new at redibank.com
Received: from vmail.redibank.com ([127.0.0.1])
by localhost (vmail.redibank.com [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id BAN22YuUkJm3; Wed, 9 Dec 2009 16:49:43 -0700 (MST)
Received: from vmail.redibank.com (vmail.redibank.com [192.168.XXX.XXX])
by vmail.redibank.com (Postfix) with ESMTP id AF6992350D
for <bradrose@hotmail.com>; Wed, 9 Dec 2009 16:49:43 -0700 (MST)
Date: Wed, 9 Dec 2009 16:49:43 -0700 (MST)


So I have tried just about everything in the forums including the postfix_header_checks.in which I am including here.

Please note: Am trying for simplicity first...
(first 4 lines removed)
/^Received: from localhost/ IGNORE
/^X-Mailer: Z/ IGNORE

Theoretically this should remove the localhost line... but it does not.
I did restart using:
zmmtactl stop; zmmtactl start

This shouldn't be rocket science but it is feeling like it.

Thanks,

Brad
Reply With Quote
  #2 (permalink)  
Old 12-14-2009, 03:08 PM
New Member
 
Posts: 3
Default

Quote:
Originally Posted by bradrose90 View Post
So, we are testing this out ... but we got this nasty Received: section popping thru on the email

Received: from localhost (localhost.localdomain [127.0.0.1])
by vmail.redibank.com (Postfix) with ESMTP id E140523509
for <bradrose@hotmail.com>; Wed, 9 Dec 2009 16:49:43 -0700 (MST)
X-Virus-Scanned: amavisd-new at redibank.com
Received: from vmail.redibank.com ([127.0.0.1])
by localhost (vmail.redibank.com [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id BAN22YuUkJm3; Wed, 9 Dec 2009 16:49:43 -0700 (MST)
Received: from vmail.redibank.com (vmail.redibank.com [192.168.XXX.XXX])
by vmail.redibank.com (Postfix) with ESMTP id AF6992350D
for <bradrose@hotmail.com>; Wed, 9 Dec 2009 16:49:43 -0700 (MST)
Date: Wed, 9 Dec 2009 16:49:43 -0700 (MST)


So I have tried just about everything in the forums including the postfix_header_checks.in which I am including here.

Please note: Am trying for simplicity first...
(first 4 lines removed)
/^Received: from localhost/ IGNORE
/^X-Mailer: Z/ IGNORE

Theoretically this should remove the localhost line... but it does not.
I did restart using:
zmmtactl stop; zmmtactl start

This shouldn't be rocket science but it is feeling like it.

Thanks,

Brad
Update:
Modified external firewall to strip out the whacked headers; but still, curious to see why the regex doesn't work.
I don't consider this solved.
Reply With Quote
  #3 (permalink)  
Old 01-18-2010, 06:38 PM
Moderator
 
Posts: 7,928
Default

Pattern match may have been wrong
Code:
/^Received: from localhost.*/ IGNORE
__________________
Reply With Quote
  #4 (permalink)  
Old 07-28-2010, 10:30 AM
New Member
 
Posts: 4
Angry

For some reason this postconf variable isn't getting set properly on my Release 6.0.6_GA_2330.UBUNTU8 UBUNTU8 FOSS edition.

Code:
zimbra$ zmlocalconfig postfix_header_checks
postfix_header_checks = pcre:${zimbra_home}/conf/postfix_header_checks

# /opt/zimbra/postfix/sbin/postconf | grep header_checks
header_checks =
Fix like so:
Code:
# /opt/zimbra/postfix/sbin/postconf -e header_checks=pcre:/opt/zimbra/conf/postfix_header_checks
# /opt/zimbra/bin/postfix reload
Now you can go edit postfix_header_checks (not the .in file).
It's write only, so I just used `:!w` in vi as root to override. You might have to `chmod +w` the file.

Apply the changes by running:
Code:
# /opt/zimbra/bin/postfix reload
FWIW, I'm only bothering with all this hacking so I can have something close to a mailman list on my zimbra server. (reply-to). I know the developers are only concerned with doing their best work, and I appreciate what they've come up with so far, so I'll eat my rage and frustration for now and simply insist that Bug 15664 &ndash; Add reply-to option for distribution lists would be REALLY NICE.

Last edited by fm_ian; 07-29-2010 at 02:50 PM.. Reason: postmap isn't necessary
Reply With Quote
  #5 (permalink)  
Old 07-29-2010, 04:22 AM
Zimbra Consultant & Moderator
 
Posts: 20,312
Default

Quote:
Originally Posted by fm_ian View Post
FWIW, I'm only bothering with all this hacking so I can have something close to a mailman list on my zimbra server. (reply-to). I know the developers are only concerned with doing their best work, and I appreciate what they've come up with so far, so I'll eat my rage and frustration for now and simply insist that Bug 15664 &ndash; Add reply-to option for distribution lists would be REALLY NICE.
It would be of more use if you added your vote to that bug report, that's what gets the developers attention.
__________________
Regards


Bill

Last edited by phoenix; 07-29-2010 at 07:15 AM..
Reply With Quote
  #6 (permalink)  
Old 07-29-2010, 06:46 AM
New Member
 
Posts: 4
Default

I added my vote! Lets hope it makes a difference!

I also voted for...
https://bugzilla.zimbra.com/show_bug.cgi?id=8968

Which, at 43 votes and 4 years of age, should be completed any time now, right?
Reply With Quote
  #7 (permalink)  
Old 11-08-2010, 08:43 AM
Partner (VAR/HSP)
 
Posts: 10
Default

Quote:
Originally Posted by fm_ian View Post
For some reason this postconf variable isn't getting set properly on my Release 6.0.6_GA_2330.UBUNTU8 UBUNTU8 FOSS edition.

...

Fix like so:
Code:
# /opt/zimbra/postfix/sbin/postconf -e header_checks=pcre:/opt/zimbra/conf/postfix_header_checks
# /opt/zimbra/bin/postfix reload
Unfortunately, that won't actually fix it. main.cf is managed by zmmtaconfig, and it will erase your change to header_checks when it re-writes the main.cf config file. See:

Code:
$ postconf -e header_checks=pcre:/opt/zimbra/conf/postfix_header_checks
$ grep header_check /opt/zimbra/postfix/conf/main.cf
header_checks = pcre:/opt/zimbra/conf/postfix_header_checks
$ postfix stop; postfix start
 ...
postfix/postfix-script: starting the Postfix mail system
$ grep header_check /opt/zimbra/postfix/conf/main.cf
header_checks =
I created a bug today regarding this issue, being stymied in the attempt to add a header check. See: Bug 52942 &ndash; enable use of Postfix header_checks in conjunction with Amavis banned attachment warnings

Also see forum post:

[SOLVED] Headerchecks

Larry
Reply With Quote
  #8 (permalink)  
Old 10-16-2011, 05:12 AM
Junior Member
 
Posts: 8
Default header_checks ignored

I follow lots of posts on this forum , but none of the suggested
have helped . i an trying to stripped all headers from any outgoing email
Received: from .....

i did this :
set up postfix_header_checks.in = didnt help
set up zmmta.cf , disable zimbraMtaBlockedExtensionWarnRecipient = didnt help
follow this threads :

1. [SOLVED] Headerchecks
2. Bug 52942 &ndash; enable use of Postfix header_checks in conjunction with Amavis banned attachment warnings
3. Changing localhost (localhost.localdomain [127.0.0.1]) in message headers

Can anyone help on how to remove all this extra headers
from outgoing mails . i want it to be simple as possible .

p.s
This server was upgraded from version 4.0.5 to 7.1.2 (over the years)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


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.