procmail
[Top] [All Lists]

General Filter problem

2000-05-15 23:22:02
Situation:  I have a mail server that receives emails and fowards the
mails straight out to users ISP's pop accounts.  No users connect to the
server to collect mail, except me for testing.  Mail is redirected using
the /etc/aliases file (.forward files not used).  I want to use procmail
to check the contents of all incoming mail for the .vbs extension - I
think we all know why.  I can get procmail to do this fine.  However
root seems to get the mail and not the user it is intended for.  I check
the log file and can see promail is picking out and .vbs emails but they
are not being delivered if they are not .vbs.  I have been successful
when using a .procmailrc file in the test users account I have, so
instantly I think "ok I will set everyone up an account on the system
and use .forward files to redirect the mail" but it does not work
because sendmail redirects the mail before it looks at the .procmail
file (so no filtering is done).  What I need is Sendmail to do procmail
checks before doing anything, filter out .vbs mails to admin(_at_)me(_dot_)com, 
and
resume normail delivery if not.

Files:

Sendmail.cf

S0
R$*                     $: $>99 $1

********//******* All the usual stuff inbetween in sendmail.cf on RH
Linux 6.1

S99

R$*<@$+.procmail>$*     $@ $1<@$2>$3    # procmail has already looked at
this.
R$*<@$+>$*      $#procmail $@/etc/mail/procmail.rc
$:$1<@$2.procmail>$3dd



/etc/mail/procnail.rc

VERBOSE=on
PMDIR=/home/testman/.procmail
SHELL=/bin/sh
LOGFILE=$PMDIR/log
INCLUDERC=/etc/mail/proc-virus.rc

/etc/mail/proc-virus.rc

:0B
* 1^1 .vbs
:0
! ljs(_at_)dca-uk(_dot_)net


Solutions to this problem would greatly be appreciated.
Thx.

--
Lee Smith
Systems Operative
DCA UK
Birmingham

<Prev in Thread] Current Thread [Next in Thread>
  • General Filter problem, Lee Smith <=