RSS Feed

Spam folders and Bluequartz
domenica 12 ottobre 2008

Do you have mailscanner and bluequartz ? Are you using IMAP ? Are you wondering how to get spam emails to be moved to your Junk folder and also old spam to be removed when it becomes older that 30 days ?

Here you are:

1) edit your /etc/procmailrc
2) paste this in the file:

UMASK=001
:0
* ^X-Spam-Status: Yes
{
:0 c: $HOME/mail/Junk
:0 | /usr/local/bin/cleanspam --expunge 30
}

3) create the file /usr/local/bin/cleanspam and paste this code in the file.
4) Change line SPAM = "SPAM" to SPAM = "Junk"

 

Basically, the MDA (procmail) will get emails (already processed by mailscanner), identify if it's a spam by reading the header "X-Spam-Status: Yes".
If it's a spam email, procmail will put that mail in the mail/Junk folder in the user's HOME and then will check if in the Junk folder there are emails that are older than 30 days. If so, those emails will be deleted.

I'm not checking the Junk folder for every mail in order to save ram/processor on a busy server following the rule that a "not very likely to get spam" mailbox does not neet to clean spam emails many times per day.

Basically:
1) On a very spammed mailbox, old spams will be removed many times per day
2) A very used mailbox with not much spam, will be checked only when a new spam email gets in
3) A poor-traffic mailbox will not be checked if not getting spam

Security note:  mail/Junk mailboxes will be created with rw-rw-rw- permissions that basically let other shell users to read the Junk folder. This because the mail/Junk folder is created by procmail with root.siteXX ownership; if you are successful to set the ownership correctly, please advice.

Commenti
NuovoCerca
Commenta
Nome:
Titolo:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
Security Image

Powered by JoomlaCommentCopyright (C) 2006 Frantisek Hliva. All rights reserved.Homepage: http://cavo.co.nr/

 

Accedi






Pass?
Se vuoi iscriviti.
© 2010 Thecloud.org: Julien Buratto

Logo SubitoSMS
La soluzione integrata per i tuoi SMS