Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Feb 2004 06:39:14 -0600
From:      Bryan Albright <bryana@oss.qwest.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: Procmail recipe not working with mutt
Message-ID:  <20040206123914.GA62495@thor.oss.uswest.net>
In-Reply-To: <20040206003332.GA49262@bellsouth.net>
References:  <20040206003332.GA49262@bellsouth.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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@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@...  (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@linuxawkubedu.edu would make it into the Linux_WKU folder.
Correct syntax would be wku-linux@linux\.wku\.edu.

My thoughts on this rule is that it should probably be:
:0:
* ^TO_wku-linux@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@bellsouth.net
> Bob_Cassidy
> 
> :0:
> * ^From:.*address@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@FreshPorts.org
> FreshPorts_Watch
> 
> :0:
> * ^TO:.*wku-linux@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@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@..., in which case, do have a ".*" after the
"_":

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


Hope this has helped.

Bryan

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

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040206123914.GA62495>