FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Reject or remove mails with X-Spam-Flag headers
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Reject or remove mails with X-Spam-Flag headers [message #41229] Thu, 05 June 2008 10:20 Go to next message
TrevorPH is currently offline  TrevorPH   United Kingdom
Messages: 4
Registered: June 2008
Karma: 0
Junior Member
I have recently implemented FUDForum to create a searchable archive of my company's support mailing list so that our support people don't have to reinvent the wheel all the time. It works very well except that it's not using our anti-spam measures. We take mail in using exim, pass it through spamassassin and clamav then, generally, pass it onto cyrus-imapd where a sieve script examines the mails and takes action based on the X-Spam-Flag and/or the X-Spam-Level headers in the mails.

I have this hooked up to exim via the pipe facility so /etc/aliases points to a list of users to get the mails and one of the users is "|/path/to/fudforum/maillist.php 1". Works very well but bypasses the final step in our spam elimination process - never hits cyrus-imapd so never goes through the sieve script. I've had a search around to see if maillist.php can pipe mails into /dev/null if certain headers are present and I cannot find a way to do this? Is it possible? Ideally all I want to do is, if "X-Spam-Flag: YES" then just pipe the mail into the bit bucket with absolutely no notification that it has happened.

I think this would be a really valuable addition to the software. Any chance it might get implemented?
Re: Reject or remove mails with X-Spam-Flag headers [message #41364 is a reply to message #41229] Wed, 11 June 2008 14:34 Go to previous messageGo to next message
TrevorPH is currently offline  TrevorPH   United Kingdom
Messages: 4
Registered: June 2008
Karma: 0
Junior Member
Patch follows

--- maillist.php 2008-05-22 01:23:57.000000000 +0100
+++ newmail.php 2008-06-11 15:32:38.000000000 +0100
@@ -421,6 +421,10 @@
q("UPDATE ".sql_p."msg SET mlist_msg_id="._esc($emsg->msg_id)." WHERE id=".(int)$m[1]." AND mlist_msg_id IS NULL");
return;
}
+ if (isset($emsg->headers['x-spam-flag']) && ($emsg->headers['x-spam-flag'] == 'YES'))
+ {
+ return;
+ }

$msg_post->post_stamp = !empty($emsg->headers['date']) ? strtotime($emsg->headers['date']) : 0;
if ($msg_post->post_stamp < 1 || $msg_post->post_stamp > __request_timestamp__) {
Re: Reject or remove mails with X-Spam-Flag headers [message #163326 is a reply to message #41364] Sun, 17 October 2010 15:42 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Do we still need this? Should it be committed?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Different sized backups of same forum?
Next Topic: Case-insensitive search
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 11:46:48 GMT 2024

Total time taken to generate the page: 0.02632 seconds