helpSpamAssassin Milter Plugin - Support: sr #105948, smfi hdridx hard-coded (patch...

 
 

sr #105948: smfi hdridx hard-coded (patch proposed)

Submitted by:  Steve Schulz <serengeti>
Submitted on:  Mon 23 Jul 2007 06:51:38 PM UTC  
 
Category: NonePriority: 5 - Normal
Severity: 3 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenOperating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 14 Dec 2007 02:04:18 PM UTC, comment #2:

Patch as submitted in #13497 does the trick. Processing 50K to 100K messages a day without complaints since 7/28. Please consider the patch for the next release and close the case. Thank you.

Steve Schulz <serengeti>
Fri 27 Jul 2007 06:06:39 PM UTC, comment #1:

Initial approach did not work, too C-ish by far. Tackled this by keeping counters per envelope in class SpamAssassin. Might still eat both your mail and your cat, but only after weeding out duplicate Subject: headers. Fixes (oldstring > 0) problem in passing.

(file #13497)

Steve Schulz <serengeti>
Mon 23 Jul 2007 06:51:38 PM UTC, original submission:

According to RFC2822, there must be at most one Subject: header line, but spammers tend to add a second one (or more) in order to hide tags from recipients. sfsistat() overwrites the first one found with subsequent ones (assassin->set_subject) and hands the last one to spamc, while update_or_insert() makes Milter replace the first one only (smfi_chgheader(ctx, header, 1,...). Therefore, I would like to suggest keeping track of the headers, passing the first one to spamc, and deleting extraneous one.
Note that I'm not an accomplished C++ programmer, so I'm not sure whether the proposed patch will eat your mail (or your memory, or your pet), crash spamass-milter (thread-safety?), or do any number of other bad things. Got it to compile and run, though. Please advise.

Steve Schulz <serengeti>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #13497:  spamass-milter-0.3.1-subjhdr.patch added by serengeti (5kB - application/octet-stream)
file #13443:  cnt_hdr_subj.patch added by serengeti (2kB - application/octet-stream - Patch applies to spamass-milter.cpp v1.90)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by serengeti (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 27 Jul 2007 06:06:39 PM UTCserengetiAttached File-=>Added spamass-milter-0.3.1-subjhdr.patch, #13497
    Mon 23 Jul 2007 06:51:39 PM UTCserengetiAttached File-=>Added cnt_hdr_subj.patch, #13443

    Back to the top


    Powered by Savane 3.1-cleanup