Discussion: Help with Procmail
Afficher un message
Vieux 25/09/2006, 09h45   #1
Dave
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut with Procmail

Hi Everyone,


I have procmail set up to scan emails for spam / viruses etc.. and then
forward mail on to another server. Last week i had to set up one
particular account locally. Now, I am trying to add a procmail rule to
deliver mail locally for that one account and i cant seem to get it
working.

This is how my system was before:
Sendmail cf file:

LOCAL_RULE_0
R$* < @ $=w > $* $#procmail $@
/etc/mail/procmailrc-systemwide/procmailrc $: $1<@$2.procmail.>$3
R$* < @ $=w. > $* $#procmail $@
/etc/mail/procmailrc-systemwide/procmailrc $: $1<@$2.procmail.>$3
R$* < @$* .procmail. > $* $1<@$2.>$3 Already filtered, map to original
address

### end of file ###

And the procmailrc:

### start of file ###
DROPPRIVS=yes
LOGFILE = /var/log/procmail.log

### Spamassassin start
:0fw: spamassassin.lock
* < 256000
| /usr/bin/spamc

### Check for executables and drop
:0B
* ^(Content-(Type|Disposition):.*|[ ]*(file)?)name=("[^"]*|[^
]*)\.(bat|cmd|com|exe|js|pif|scr)
/dev/null

### Deliver spam to folder
:0:
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*
! spamtrap@praybourne.local

### Scan again, just in case: Deliver spam to folder
:0:
* ^X-Spam-Status: Yes
! spamtrap@praybourne.local

### Backup all incoming email
BACKUP=/usr/_mailbackup
TODAY=`date +%d-%m-%Y`
:0c:
| formail -b >> $BACKUP/$TODAY

### This rule forwards on all email
:0 w
! -oi -f "$@"

### end of file ###
All of this works perfectly, now when i try to add a basic rule to
catch mail for a local account it doesnt work. This is what i have been
adding at the top of the procmail file:

# Rule for local account to collect email before hitting spam trap.
:0:
* ^TO: localuser@ourserver.com
! localuser

Will be grateful if anyone can tell me where i am going wrong.
Thanks
Dave.

  Réponse avec citation
 
Page generated in 0,05817 seconds with 9 queries