Roland Hill wrote:
Bob,
Thanks for your reply.
Heh, sorry about the goofs but yes, it seems to be working well for me
so far!
[...] it does not quite fit another issue (albeit
simiar) I have. This being the 'desire' to catch the odd message that
comes in on my general email account (delivered to wife) and receive them
in my specific mail folders.
I'm doing something that MIGHT be similar. I want "moderation" copies of
all messages to my kids. In this case, it's forwarding from a normal
user to a normal user, so I haven't had problems with the looping etc.
that brought me to the 'neutral territory' solution we were discussing
previously. I want copies under a couple of circumstances:
1. I want copies of ALL messages to kid1 or kid2, UNLESS they're
messages from a handful of "known good" lists.
2. I only want copies of messages to kid3 or kid4 that are BORDERLINE
SPAM, based on spamassassin's bayes rules (anything hitting BAYES_40 or
higher rule). I tweak this according to how well bayes is matching spam,
and may replace spamassassin with bogofilter at some point.
I've current got:
--- cut here --- cut here ---
:0 c
* -5^0
* 8^0 ^(To|Envelope-to): .*\/(kid1|kid2)@mydomain
* 6^0 ^(To|Envelope-to): .*\/(kid3|kid4)@mydomain
* -2^0 ^X-Spam-Status: No, .*BAYES_[0-3][0-9]
* -3^0 ^Delivered-To: mailing list (safe|list|names)@yahoogroups
{
LOG="Moderation copy for $MATCH, forwarded to moderator.$NL"
:0 fw
| formail -A "X-Procmail: moderation copy for $LOGNAME,
forwarded to MODERATOR."
:0
!moderator
}
--- cut here --- cut here ---
Hopefully this one's more correct!
This, with the addition of the oft-recommended X-Loop: header to detect
loops, is working well for me. I add an 'X-Loop: mydomain' header at the
top of /etc/procmailrc, then a SWITCHRC if that's detected before doing
any spam checks etc. to avoid repeats. That way, it'll be scored once,
and control continues with ~/.procmailrc for my copies (which are sorted
into folders).
After converting the spamcatchers folders, I'm considering doing the
same with the moderator/big-brother folder, but I haven't quite decided
on that yet. That would work just as well, using a symlink under my IMAP
folder to it. The downside is that makes changing how I want to sort in
~/.procmailrc less intuitive.
After re-reading your message, I'm understanding that you want copies of
selected messages coming To: your wife to be forwarded to you as well.
If tweaked for your specific needs, I think this recipe would work for that.
- Bob
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail