<<< Date Index >>>     <<< Thread Index >>>

Re: Mutt problem, probably with procmail



On Sat, Sep 13, 2008 at 02:53:08PM +0200, Aleksandar D. Balalovski wrote:
> hello, I've been using Mutt for half a year now, everything was fine.
> Yesterday I changed some of the recipes in procmailrc and since than
> fetchmail/procmail won't put the mail in the preferred mailbox. It
> puts it in /var/spool/mail/myusername.

To see what procmail is doing, just log its actions, grab a coffee, and
sit down to some reading. I have it permanently enabled, just in case:

                                  # Avoid logging clashes. Separate log records.
MAILDIR=/home/erik/mail           # Thanks to Bart Schaefer & Ruud H.G. van Tol:
LOGFILE=$MAILDIR/tmp_log.$$       # <- Each process uses a temporary log.
FINAL_LOG=$MAILDIR/log            # <- Append here, via TRAP, at process exit:
TRAP='procmail -p DEFAULT=$FINAL_LOG /dev/null < $LOGFILE && rm -f $LOGFILE'

If implicated in your recipes, it may be useful to also log some
specifics, such as:

   :0                                  # Unconditionally extract Message-id:
   {  MSG_ID=`formail -x"Message-id:"` }

LOG=$MSG_ID

   :0                                  
   {  TO=`formail -x"To:"` }

LOG=$TO


If logging is left enabled, it's good to delete or rotate the log file every
few months, when it grows over a few tens of megabytes.

I'll let somone else advise on the mutt side of things. (Mine isn't
involved in mail delivery, and I can't see why it should be, at least
when procmail is in use.)

Erik

-- 
"When one person suffers from a delusion, it is called insanity.
When many people suffer from a delusion, it is called Religion."
-- Robert M. Pirsig  in "Zen and the Art of Motorcycle Maintenance"