blogs | forums | twitter | facebook | wiki | mailing lists | downloads | support portal
Atomic Secure Linux
It is currently Fri Sep 03, 2010 6:25 am

» Feed - atomicorp.com

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic Share/Bookmark  [ 7 posts ] 
Author Message
 Post subject: use procmail to move spam to .Spam folder serverside
PostPosted: Sun Feb 25, 2007 3:06 am 
Offline
New Forum User
New Forum User

Joined: Sat Jan 20, 2007 6:57 pm
Posts: 19
I dont want to automatically delete the spam coming to my inbox but at the same time I dont want to wade through it to find the ham. Also when I check my mail on a mobil device downloading all those spam Subject: headers takes a while.
I found a great howto on using procmail to route the spam to an IMAP folder so it can be viewed later.

Note that the part about installing safecat is irrelevant if you have procmail >= 3.14.

http://www.chrisbeach.co.uk/view/tech/m ... nder_plesk

The procmail script could even be modified to trigger on a certain spam level.

here is the .procmailrc code without safecat:

Code:
MAILDIR=/var/qmail/mailnames/xxx/yyy/Maildir
DEFAULT=${MAILDIR}/
SPAMDIR=${MAILDIR}/.Junk/
LOGFILE=${MAILDIR}/procmail.log
LOG="--- Logging ${LOGFILE} for ${LOGNAME} "

# All mail tagged as spam (eg. with a score higher than the set threshold)
# is moved to the designated spam folder
:0
* ^X-Spam-Status: Yes.*
${SPAMDIR}


Last edited by jpkelly on Sun Feb 25, 2007 5:52 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: better yet...
PostPosted: Sun Feb 25, 2007 3:34 am 
Offline
New Forum User
New Forum User

Joined: Sat Jan 20, 2007 6:57 pm
Posts: 19
Better yet...
I have the spam forward to another address using
Code:
! spam@mydomain.net

instead of
Code:
${SPAMDIR}


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 25, 2007 10:18 am 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 5766
Location: earth
you can do this with qmail-scanner too, based on score, your options are:

Tag/Release
Reject at the SMTP layer or Delete
move to a quarantine folder

So I tag/quarantine at 4, and delete at 7


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 25, 2007 5:51 pm 
Offline
New Forum User
New Forum User

Joined: Sat Jan 20, 2007 6:57 pm
Posts: 19
Can I still use the PSA version of SA when using qmail-scanner to do this?
I mean, do I have to use the qmail-scanner SA to markup the spam for qmail-scanner to filter the messages? Or can qmail-scanner filter based on the markup done by PSA's SA? I want my users to be able to use Plesk to manage their spam settings.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 25, 2007 6:26 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 5766
Location: earth
Short version... uhhh no. Theres no way to control qmail-scanner from psa-spamassassin, and vice versa. At least not without coding something (which someone should do already... come on peeps pony up and help me out here!)

In order of what happens on the system it works like this:

1) mail hits smtpd
2) smptd hands off to qmail-scanner
3) qmail-scanner calls antivirus scanners, then spamassassin
4) qmail-scanner calls qmail-queue
5) qmail-queue dumps to queue, qmail-local reads queue
6) qmail-local reads users .qmail for delivery instructions

At this point, if you dont have psa-spamassassin, the .qmail file just dumps to the user's Mailbox. If you do, then the .qmail file has a line to call spamc, and spamassassin would be run again, with settings of the user. Thats why I say they arent "compatible", they really are its just you're using spamassassin twice when you do it. At this point messages are already marked as spam or ham, so you could just do your filtering here. Step 3 is where qmail-scanner implements its filtering rules (tag/quarantine/delete/reject).


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 25, 2007 6:33 pm 
Offline
New Forum User
New Forum User

Joined: Sat Jan 20, 2007 6:57 pm
Posts: 19
SWSoft?

Are you listening?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 26, 2007 12:10 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 5766
Location: earth
Haha, come on I know I'm not the only one out here that can code. :P


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic Share/Bookmark  [ 7 posts ] 

» Feed - atomicorp.com

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group