On Tue, Nov 16, 2004 at 08:31:27AM -0600, Paul Crittenden wrote:
I have set up SpamAssassin along with procmail. Because of the way
students read there email, through a web based mail reader which can't
filter email, I want to filter out the spam for them. I have tried 2
ways to do this but without success.
I set up a list of all students and then set up a rule to look through
that list and if they were on it filter out any spam. Here are 2 rules
I tried that didn't work.
Try number 1:
:0:
* ^X-Spam-Status: Yes
* ? fgrep -iqf /etc/students
/usr/users/truncmail/spam/ac-spam
Not sure what you were thinking with that one. You're piping the entire
header through fgrep tying to match something against /etc/students.
Seems highly likely you'll match on all sorts of cruft you weren't
intending to. In any case it's a lot of extra work for much less
accuracy.
Try number 2:
:0:
* ^X-Spam-Status: Yes
* ? (formail -x To: | fgrep -iqf /etc/students)
/usr/users/truncmail/spam/ac-spam
All I ended up doing was filtering all spam from all accounts which I
didn't want to do. So how can I filter some accounts but not others?
Well, for one, you probably want the -w option to fgrep. Otherwise
you're inviting more too-loose matching. And you don't really need
the parens here, I don't think, though they shouldn't make a difference
in whether it works or not.
Also, I was getting a "list to long" error message. Apparently there is a
limit on how many entries can be in a list, can you tell me what it is?
It has nothing to do with procmail. Check your fgrep binary.
And turn on verbose logging and check the procmail logs to troubleshoot.
--
dman
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail