Integration of maildrop with spamassassin

"Jayanta Ghosh" <[email protected]>
Newsgroups gmane.mail.maildrop
Message-ID <CBAC0F782F674455BDA3A9B2A8EBB7F8@JayantaGhosh>
We are configuring a mail server on RHEL 6.1(64 Bit) with the following components:-

1.       Postfix

2.       Courier-authlib

3.       Courier-imap

4.       MySql

5.       Maildrop

6.       Spamassassin



The basic functionality of the mail server is in place. Now we would like to integrate Spamassassin with maildrop so that any mail that has been identified as a spam  by the Spamassassin should be delivered to another folder (not the default location) by maildrop.

We searched through the net and found out that we need to write the rules in the maildroprc file that needs to be created in the location /etc/courier or /etc. We are not very sure about where to keep the file exactly. We have created the file maildroprc with the following content 



if ( $SIZE < 204800 )

{

        exception {

                xfilter "/usr/bin/spamassassin"

        }

}

if ( /^X-Spam-Flag: YES/ )

{

        exception {

                to "/home/jayanta.ghosh/Maildir/.Spam/"

        }

}

 and kept the file in both the location. But the mails are not delivered to the desired location i.e in the .Spam folder.



The mail header is as follows: -

Return-Path: <[email protected]>

Received: by dctest1.cesc.co.in (Postfix, from userid 504)

                id 6F877D008A; Thu, 23 Aug 2012 14:26:15 +0530 (IST)

X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on dctest1.cesc.co.in

X-Spam-Flag: YES

X-Spam-Level: **************************************************

X-Spam-Status: Yes, score=999.0 required=5.0 tests=ALL_TRUSTED,GTUBE,

                HTML_MESSAGE,TVD_SPACE_RATIO autolearn=no version=3.3.1

X-Spam-Report: 

                * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP

                * 1000 GTUBE BODY: Generic Test for Unsolicited Bulk Email

                *  0.0 HTML_MESSAGE BODY: HTML included in message

                *  0.0 TVD_SPACE_RATIO TVD_SPACE_RATIO

Received: from JayantaGhosh (unknown [10.50.81.45])

                by dctest1.cesc.co.in (Postfix) with ESMTPA id 4A367D006C

                for <[email protected]>; Thu, 23 Aug 2012 14:26:15 +0530 (IST)

Message-ID: <A2B060EC8E7F42908EAB21EA2242D911@JayantaGhosh>

From: "Jayanta RPSG" <[email protected]>

To: <[email protected]>

Subject: [SPAM] 

Date: Thu, 23 Aug 2012 14:26:14 +0530

MIME-Version: 1.0

Content-Type: multipart/alternative;

                boundary="----=_NextPart_000_00A2_01CD813B.401CB850"

X-Priority: 3

X-MSMail-Priority: Normal

Importance: Normal

X-Mailer: Microsoft Windows Live Mail 15.4.3555.308

X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3555.308

X-Spam-Prev-Subject:



Kindly help.



Regards,

Jayanta

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

_______________________________________________
Courier-maildrop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.