PDA

View Full Version : Mail blocking



seaquest
08-29-2004, 09:32 AM
I know you can use procmail to block spam with ...

:0:
* ^X-Spam-Level: \*\*\*\*\*\*\*
/dev/null

The one problem with this is that it affects all accounts on the server. Is there any way to do this just for specific accounts?

Jim

FZ
08-29-2004, 12:25 PM
Jim,

Sure there is! All you need to do is create the e-mail account(s) in question with home directories - in other words, create them as separate e-mail/FTP accounts via your Site Manager (with FTP enabled) and choose a directory to be the home directory (for example you could just accept the default or use /home/users/username). If you don't want to allow FTP access, create them with FTP enabled, and then go back in and disable FTP access (this will leave the home directory intact). Then all you need to do is create a file called .procmailrc (notice the . before the file name, unlike /etc/procmailrc) in the home directory for the account in question (e.g. /home/users/username) and place the code you have above in that file. Also, after that account receives some mail, you should notice that it creates a .spamassassin directory in the same location - within the .spamassassin directory you will find a file called user_prefs which will allow account-specific customization of SpamAssassin as well.

Using this method, you can have independant Procmail and SpamAssassin settings for all your e-mail accounts...

seaquest
08-29-2004, 12:41 PM
Excellent, thanks Fayez!!

FZ
08-29-2004, 12:55 PM
No problem, Jim.