Hmmm <thinking> I wish I was as smart and intuitive as any of the gurus
on this list but I'm not, so for this present moment here's what I have.
Case 1 - Spank the offender, and send a copy of the email to
"mailadmin", with a copy sent to the boss as well. User gets his/her
mail after actions have taken place
Note:
Untested, and may be subject to critique from those who *TRULY* know
what they are doing.
#adjust as necessary
SHELL=bin/sh
#highly adviseable to keep on until you know all is working
VERBOSE=ON
LOGABSTRACT=ALL
#adjust the next 4 to suit your own preferences regarding dir.
structure/names etc.
MAILDIR=/home/users/mailadmin/mail
PMDIR=/home/users/mailadmin/mail/procmail
LOGFILE=/home/users/mailadmin/Procmail/log
#Where you stash "info.txt" which is what you want to say to the
offender
FILEDIR=/home/users/mailadmin/autores
:0
* ^From:.*\<sender(_at_)foreigndomain\(_dot_)com\>
* ! ^FROM_DAEMON
* ! ^x-loop:.*\<mailadmin(_at_)thisdomain\(_dot_)com\>
{
:0 h c
| ( formail -rt -A "Precedence: junk" \
-A "X-Loop: mailadmin(_at_)thisdomain(_dot_)com" ; \
#make info.txt say whatever you wish in order to
#scold the offender(_at_)foreigndomain(_dot_)com
cat $FILEDIR/info.txt) \
| $SENDMAIL $SENDMAILFLAGS -t
:0 c
! bossman(_at_)thisdomain(_dot_)com
:0c
/home/users/mailadmin/mail/abuse
}
Case 2 - Simply send copies to all relevant parties but without an
autoresponse sent to the offender. Again it lives in /etc/procmailrc
SHELL=/bin/sh
VERBOSE=ON
:0
* ^From: .*\<offender(_at_)foreigndomain\(_dot_)com\>
{
:0c
! bossman(_at_)thisdomain(_dot_)com
:0c
/home/users/mailadmin/mail/abuse
}
As I said above, this is untested and I'm *still* a learner, so really
wait until someone else weighs in on this with their suggestions or
confirmation that this is meaningful. Then again it may not even be what
you are looking for.
Anyway, HTH
-Colin
Hummm... I see I probably didn't explain myself quiet
correctly. The rule
in some way "must" involve sender and recipient. I just want
to check the
mail from a specific sender to a specific
recipient.
R. Riley
:0:offender.lock
* ^From: sender(_at_)foreigndomain(_dot_)com
/home/users/mailadmin/mail/crapper
I use this approach on one box to send offending mail to a designated
folder which I periodically review and "flush" the contents. However, I
am root *plus* the only user. That said, this approach might have an
overhead penalty associated with it if there were thousands of
users and
an unerpowered mail server. I use an INCLUDERC approach on another
machine where I have a moderate number of users (<50). In this case I
use a DIRTY list at the user's request to tank offenders, abusers, etc.
(not spammers, different scenario, different set of tools)
HTH & Regards,
-Colin
--
Colin J. Raven
Hi gurus:
Simple question:
Say I have a sender sender(_at_)foreigndomain(_dot_)com which is sending
garbage to
recipient(_at_)mydomain(_dot_)com
How would I do a recipe that redirects the mails when this happens to
myrecipient(_at_)mydomain(_dot_)com
It is very usual that some users start to send garbage (like insults)
and anoying things > to other users and I would like to receive the
emails to avoid this happens.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail