Re: header_checks PREPEND

From: mouss (no email)
Date: Wed Nov 01 2006 - 08:03:36 EST

  • Next message: (no name): "Re: header_checks PREPEND"

     wrote:
    > Quoting Sandy Drobic <>:
    >
    >
    >> wrote:
    >>
    >>> Hi,
    >>>
    >>> Im looking to prepend [SPAM] to the Subject: of mails that come in with a preassigned X-SpamReason: value of 1..4.
    >>>
    >>> main.cf:header_checks = pcre:/etc/postfix/header_checks
    >>>
    >>> And in header_checks:
    >>> /X-SpamReason: Yes, hits=([1..4]\.[0-9]*).*required/ PREPEND Subject: [SPAM]
    >>>
    >>> However this is overwriting the Subject completely, and Im just getting [SPAM] in the Subject of the mail
    >>> once its received.
    >>>
    >>> Any idea what I could be doing wrong ?
    >>>
    >> Prepend sets a new Subject header here. This is better done by your filter
    >> software. Header_checks can't set a subject header in relation to another
    >> check on x-spamreason.
    >>
    >> You either need a filter for that or do it directly in your spamfilter.
    >>
    >
    > I see, thanks for the explanation.
    >

    you can use procmail|maildrop with formail|reformail.

    it is possible to with postfix but that would be overkill (run a
    specific smtpd as a content_filter, using the FILTER statement in place
    of your PREPEND. then that smtpd will have its own cleanup to modify the
    subject).

    That said, subject rewrite is more or less ugly. sometimes, a site
    misclassifies a message and tag the subject, then the recipient replies
    to forwards it... I already seen customer requests with a spam tag in
    the subject! fortunately, I don't rely on the subject...

    An alternative is to prepend specific headers. For recipients using
    imap, you can deliver to a Junk folder. Pop users can set filters on
    their MUAs based on the headers you prepend.


  • Next message: (no name): "Re: header_checks PREPEND"





    Hosted Email Solutions

    Invaluement Anti-Spam DNSBLs



    Powered By FreeBSD   Powered By FreeBSD