View Single Post
Old 26th February 2007, 02:33
brt brt is offline
Junior Member
Join Date: Feb 2007
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
Default filing spam to extra (imap)folder on the server

if you are using the imap protocol you can move spam-mails to a seperate folder using procmail.

the following adds appropriate procmail-rules to the global master config file:

echo -e "\n" >> /root/ispconfig/isp/conf/procmailrc.master
echo "# ***SPAM*** -> SPAM Folder" >> /root/ispconfig/isp/conf/procmailrc.master
echo ":H" >> /root/ispconfig/isp/conf/procmailrc.master
echo "* Subject:.*\*\*\*SPAM\*\*\*.*" >> /root/ispconfig/isp/conf/procmailrc.master
echo "$HOME/Maildir/.SPAM/" >> /root/ispconfig/isp/conf/procmailrc.master
  • this effects all mailboxes !
  • you must repeat this after ISPC updates !
  • when using POP3 you do not get any of these mails !
  • some IMAP-Mail Clients may force you to "subscribe" the SPAM folder as it will not be shown by default
  • It only works if the Subject contains: ***SPAM***

Last edited by brt; 26th February 2007 at 02:37.
Reply With Quote