I'm trying to do some mail filtering at the server level.
What I want this particular rule to do is take any mail with "DenyHosts Report" in the subject and stick it in a subfolder of the inbox named "DenyHosts".
I've created a .procmailrc in my home directory with the following contents:
This works great in /etc/procmailrc (although the logfile location is set to /var/log/procmail.log in that one), but not in my .procmailrc.
It sticks all of my emails into a file in my Maildir folder simply named ?, in what appears to be mbox format, instead of Maildir format. I know that it's putting them there because it thinks that the email coming in doesn't match any of my rules, so it puts them wherever I have $DEFAULT set. Why it's putting it all in one file and not in separate files in the inbox like normal, I have no idea. It's also not creating the logfile in the home directory like I want it to. I'm having to go to /var/log/procmail.log to see what's going on with it.
So the question is then, what is wrong with this .procmailrc?
What I want this particular rule to do is take any mail with "DenyHosts Report" in the subject and stick it in a subfolder of the inbox named "DenyHosts".
I've created a .procmailrc in my home directory with the following contents:
Code:
LOGDIR=$HOME/.procmail-logs LOGFILE=$LOGDIR/log.`date +%y-%m-%d` VERBOSE=YES LOGABSTRACT=YES DROPPRIVS=yes DEFAULT=$HOME/Maildir/ MAILDIR=$HOME/Maildir/ :0 * ^Subject: .DenyHosts Report $DEFAULT/.DenyHosts/
It sticks all of my emails into a file in my Maildir folder simply named ?, in what appears to be mbox format, instead of Maildir format. I know that it's putting them there because it thinks that the email coming in doesn't match any of my rules, so it puts them wherever I have $DEFAULT set. Why it's putting it all in one file and not in separate files in the inbox like normal, I have no idea. It's also not creating the logfile in the home directory like I want it to. I'm having to go to /var/log/procmail.log to see what's going on with it.
So the question is then, what is wrong with this .procmailrc?
Comment