Results 1 to 8 of 8

Thread: Regex and Postfix_header_checks.in Not working

  1. #1
    Join Date
    Dec 2009
    Posts
    3
    Rep Power
    6

    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

  2. #2
    Join Date
    Dec 2009
    Posts
    3
    Rep Power
    6

    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.

  3. #3
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Default

    Pattern match may have been wrong
    Code:
    /^Received: from localhost.*/ IGNORE

  4. #4
    Join Date
    Jul 2010
    Posts
    4
    Rep Power
    5

    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 03:50 PM. Reason: postmap isn't necessary

  5. #5
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    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.
    Last edited by phoenix; 07-29-2010 at 08:15 AM.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  6. #6
    Join Date
    Jul 2010
    Posts
    4
    Rep Power
    5

    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?

  7. #7
    Join Date
    Aug 2008
    Posts
    10
    Rep Power
    7

    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:

    http://www.zimbra.com/forums/adminis...derchecks.html

    Larry

  8. #8
    Join Date
    Feb 2008
    Posts
    8
    Rep Power
    7

    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. http://www.zimbra.com/forums/adminis...derchecks.html
    2. Bug 52942 &ndash; enable use of Postfix header_checks in conjunction with Amavis banned attachment warnings
    3. http://www.zimbra.com/forums/adminis...e-headers.html

    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)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •