![]() |
Spam scan for forwarded mail
Hi,
got another question: What would I have to do to let forwarded mail be scanned for spam? (With the standard setup, when a mail account is set to be forwarded to one or more external mail addresses, the mails aren't scanned for spam, only the ones that are to be put into a local mail box) |
You will have to change the order of included procmail recipes in the file .procmailrc in the home directory of the mail user so the spam scanning script is in front of the redirection script.
If you want to change it globally for new users, you will have to modify the template file /root/ispconfig/isp/conf/procmailrc.master |
cool, thanks for the hint.
this is my .procmailrc: Code:
MAILDIR=$HOME/Maildir/the .custproc.rc has all my self-made "put mail from xy to folder xy" rules... |
Ah, found it. It's the .forward file in the user's directory. Which process reads it and how do I make it come after the procmailrc? I seem to understand that postfix gives incoming mail to "objects" in the .forward file, which is a comma separated list.
So the forwarded mail is totally independant of the mail which will be spam scanned and delivered to a mailbox? Ideas? |
You'd have to rewrite the forwarding mechanism so that it uses a procmail recipe instead of the .forward file. In the .forward file you would invoke procmail which then reads the procmail recipes.
|
:eek: ok... how it would be in english? (or spanish.. je)
|
I don't have such a script at hand right now. You'd have to invent one yourself. ;)
|
OK, here's the howto:
1) Modify /root/ispconfig/isp/conf/procmailrc.master to include a "per-user-procmail" file by adding this line to the end: Code:
INCLUDERC={PMDIR}/.custproc.rc2) Delete the forward in the ISPConfig web interface 3) Add the following to the user's ".custproc.rc" (or whatever name you chose): Code:
:0Like this you can provide accounts that are forwarded, but also spam scanned. Another option: if you want to keep a local copy in the user's mailbox, make the first line in the .custproc.rc Code:
:0 c |
Just out of interest, was this "mini-howto" of any interest to anyone (besides me)? Or is there even a better way to do it?
|
Quote:
|
| All times are GMT +2. The time now is 08:56. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.