On Mon, Apr 14, 2008 at 01:21:57PM -0700, Jose Hales-Garcia wrote:
>
> On Apr 14, 2008, at 12:38 PM, Mark Martinec wrote:
>
> >> Is this a good idea?
> >
> > If your software is finding such strings in a _body_ of a mail,
> > it is seriously flawed and needs to be fixed. If it is only looking
> > at the header, you are already on the safe side by default.
>
> The duplicate header tags are in the header of the file (sorry for the
> misinformed comment about the body). Also, the
> $remove_existing_spam_headers variable is undefined in my
> configuration file.
When you say undefined, do you mean never defined, or set to undef?
If the latter, try setting it to 1.
> I should be getting the default behavior but duplicate header tags are
> appearing. Below is an example.
>
> The TMail library keeps header info in a hash, so it's retaining the
> last 'X-Spam-Score' header encountered with a value of '*****',
> instead of the one with '16.06'. If duplicate headers shouldn't exist
> then maybe I won't waste my time getting TMail to use an array instead
> of a hash. Can you tell from this example why the duplicates would be
> occurring?
IIRC, as regards most mail headers, there is no definition stating
that they can occur only a single time, and hence they really should be
arrays. However, I think a lot of software which processes mail
headers assumes that only a single occurrence will be present; the Ruby
package is not the only one at fault.
If you want to brute-force the solution, while you look for the true
reason amavisd is failing to strip the previous headers, you could add
a Postfix header_checks rule to be run on the pre-amavisd instance such
as (with PCRE):
/^X-Spam-Score:/ IGNORE
/^X-Spam-Hits:/ IGNORE
/^X-Spam-Level:/ IGNORE
/^X-Spam-Flag:/ IGNORE
etc.
This would wipe out the headers in question prior to feeding them
into amavisd-new. I do this in my configuration, just to be on the
safe side.
-- Clifton
--
Clifton Royston -- [EMAIL PROTECTED] / [EMAIL PROTECTED]
President - I and I Computing * http://www.iandicomputing.com/
Custom programming, network design, systems and network consulting services
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/