procmail
[Top] [All Lists]

Re: How to filter aldready delivered email

2004-12-08 11:21:05
I get this error message (is it possible to avoid?):
        procmail: Couldn't create "/var/spool/mail/myuser"


This is not normal, because it tries to write to "/var/spool/mail/myuser"

Du you call the script as user MYUSER ?

Yes, as myuser. (But it is not so important since the mail gets filtered and delivered as it should.)

  ____( stdin )_________________________________________________________
 /
| #!/bin/bash
| | | RET_SENDER=`cat $1 |formail -c -x Sender:`
| echo $RET_SENDER |grep "thelist-list-bounces(_at_)list(_dot_)com" /dev/null 
2>&1
| ES=$?
| if [ $ES == 0 ] ; then
|   mv $1 $HOME/Maildir/.thelist/cur/
| fi
 \______________________________________________________________________

Thanks, I think I may solve it in that way. Maybe the easiest way to convert my .mailfilter (or .procmailrc) into this script format is to create a macro in Emacs or do you know of a better way?

But best would be (I think) if I could have procmail to just tell what it was about to do without doing anything, e.g. "Filter to Maildir/.thelist/". Then I could just run procmail from within a small script and move the mail to that folder that procmail tells me it would have. Then the filename och date+time would be preserved. Also I wouldn't need to convert my .procmailrc into the script format.

Best regards,
Jan

____________________________________________________________
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