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

 
 

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

Submitter:  Steve Schulz <serengeti>
Submitted:  Mon 23 Jul 2007 06:51:38 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

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 Files:
   
   
Comment:
   

Attached Files
file #13497:  spamass-milter-0.3.1-subjhdr.patch added by serengeti (5KiB - application/octet-stream)
file #13443:  cnt_hdr_subj.patch added by serengeti (2KiB - 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
  • -email is unavailable- added by serengeti (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-07-27 serengeti Attached File- Added spamass-milter-0.3.1-subjhdr.patch, #13497
    2007-07-23 serengeti Attached File- Added cnt_hdr_subj.patch, #13443

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code