Procmail recipe not working with mutt

Bryan Albright bryana at oss.qwest.net
Fri Feb 6 04:39:20 PST 2004


On 02/05/04 at 06:33, Bryan Cassidy wrote:

<SNIP>

> ### Mailboxes
> 
> mailboxes =FreeBSD_Questions
> mailboxes =FreeBSD_Newbies
> mailboxes =FreeBSD_Hackers
> mailboxes =FreeBSD_KDE
> mailboxes =FreeBSD_Security_Notifications
> mailboxes =FreshPorts_Watch
> mailboxes =Fluxbox_Users
> mailboxes =Mutt
> mailboxes =CVS_ALL
> mailboxes =Sent
> mailboxes =Bryan_Cassidy
> mailboxes =CVS_PORTS
> mailboxes =Bob_Cassidy
> mailboxes =Default
> mailboxes =Bryan_Yahoo
> mailboxes =Jim Bonsey
> mailboxes =WKU_Linux
> mailboxes =Richard

Just a thought, but does the " " (space) work when defined in a
mailbox name (Jim Bonsey)in mutt?  

<SNIP>

> DEFAULT=$HOME/Mail/Default
> MAILDIR=$HOME/Mail
> PMDIR=$HOME/Procmail
> VERBOSE=no
> LOGFILE=$PMDIR/pmlog

First thing to do to figure out why they are not going to the correct
mailbox is to set VERBOSE to 'yes'
VERBOSE=yes

and watch the $LOGFILE and see if you can determine why it is failing.


> :0:
> * ^TO_freebsd-questions at freebsd.org
> FreeBSD_Questions
> :0:
> * ^TO_questions
> FreeBSD_Questions
> 
> :0:
> * ^TO_

I hope this is just a typo... if not, it will catch anything and
deliver it to your default mail spool.

> :0:
> * ^wku-linux at linux.wku.edu
> Linux_WKU

Again, not sure if this is a typo or not, but this will only match on
a line that begins with ^wku-linux at ...  (also, you might want to
consider escaping the "."s in your recipes, as un-escaped dots (.)
match any character--so a message that starts with
"wku-linux at linuxawkubedu.edu would make it into the Linux_WKU folder.
Correct syntax would be wku-linux at linux\.wku\.edu.

My thoughts on this rule is that it should probably be:
:0:
* ^TO_wku-linux at linux\.wku\.edu
Linux_WKU

<SNIP>

> :0:
> * .*
> Default

This rule, IMO, is the reason why all of the rules below it go to
Default.  Any header (*) with any string (.*) will always match this
rule.  IF this is what you want, you should definitely have this one
as the _LAST_ rule in your .procmailrc.

> :0:
> * ^From:.*address at bellsouth.net
> Bob_Cassidy
> 
> :0:
> * ^From:.*address at verizon.net
> Jim Bonsey

I'm pretty sure that you can't have spaces in the final delivery
mailbox.  You may want to change this one (and the one in your
.muttrc) to Jim_Bonsey.

> :0:
> * ^From:.*FreshPorts-Watch at FreshPorts.org
> FreshPorts_Watch
> 
> :0:
> * ^TO:.*wku-linux at linux.wku.edu
> WKU_Linux

You may match this one in the rule above, espceially if you modify it
as I suggest, in which case this rule is a duplicate and may be
removed.  (Also, you may want to change the ^TO: to ^TO_)

> :0:
> * TO_:.*security-advisories at freebsd.org
> FreeBSD_Security_Notifications

Remove the : after the TO_ and this one should work fine.  From the
procmailrc man page:

	   If the regular expression contains `^TO_' it will be substituted
	   by `(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope 
	   |Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)', which should
	   catch all destination specifications containing a specific
	   address.

I also think that the .* is superfluous.  Here's what I'd recommend
(unless you are trying to messages that have
xyz-security-advisories at ..., in which case, do have a ".*" after the
"_":

:0:
* TO_security-advisories at freebsd\.org
FreeBSD_Security_Notifications


Hope this has helped.

Bryan

-- 
Bryan Albright                                            Lead IP Engineer
bryana at qwest.net                                  Qwest Internet Solutions

Question: If you plug a charged UPS into itself, will it keep running forever?



More information about the freebsd-questions mailing list