Procmail recipes

jdow jdow at earthlink.net
Sat Jan 28 08:42:54 UTC 2006


From: "Anne Wilson" <cannewilson at tiscali.co.uk>

> On Friday 27 Jan 2006 21:58, Alexander Dalloz wrote:
>> Am Fr, den 27.01.2006 schrieb Anne Wilson um 22:17:
> Hi, Alexander.  Thanks for replying.
> 
>>
>> 1st note: wanting Maildir storage with Procmail you _must_ give the
>> target a path with a trailing slash. Without the trailing slash
>> Procmail will store in mbox format.
>>
> I started from there, but then read that it should not have one - much 
> of the documentation around doesn't make it clear when it's dealing 
> with mbox and when it's addressing maildir.
> 
>> 2nd note: using a variable the syntax is i.e. ${MAILDIR}
>>
> Sorry - typo when copying the output onto this box.
> 
>> > Every time, I get the message appended to a text file, as though it
>> > was an mbox file, in ~/Maildir.
>>
>> See above. 3 of your test syntax lines are wrong because of missing
>> trailing slash. The one with the trailing slash writes should have
>> written into directory "Design" as a maildir, though the path is not
>> the one you expect it to be; i.e. if you specified
>> "MAILDIR=/home/awilson/Mail/", then the result would have been
>> "/{/home/awilson/Mail/}Design".
>>
>> Following should work as expected:
>>
>> ###
>>
>> MAILDIR=/home/awilson/Mail/
>> DEFAULT=$MAILDIR
>>
>> :0
>>
>> * ^To:.*design at lydgate.org
>> $MAILDIR/Design/
>>
> Hmm - I must still be missing something.  Now I'm getting a mbox-style 
> file called msg.fYY in ~/Maildir/.INBOX.Design - and of course the 
> message doesn't show up in my folders.  Here is the whole of 
> the .procmailrc as it stands at the moment.  Can you spot the pebcak?  
> Thanks.
> *****
> #These assume that mail is already tagged on injection
> SHELL=/bin/sh
> PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin
> 
> #Set user variable
> USER=`anne`
> 
> #Set user Inbox directory
> MAILDIR=/home/anne/Maildir/
> DEFAULT=$MAILDIR
> 
> #Set logfile
> LOGFILE=/home/anne/pm.log
> VERBOSE=YES
> LOGABSTRACT=YES
> 
> LOG="
> "
> 
> ###For maildir, ensure that all recipe commands end with '/'###
> 
> # Create a safety net
> 
> :0 c
> $MAILDIR/backup/
> 
> #Start real recipes
> 
> :0
> * ^To:.*design at lydgate.org
>  $MAILDIR/Design/
> *****

Is there a possible conflict with the contents of that file and of a global
/etc/procmailrc? Are you sure THIS procmail shown is the one actually being
used? That is to say is this running as you as a user or is it being run
from a jail as nobody or something like that?

One way to be sure the above procmail is being used is this little snip.
:0 fw
| formail -A "X-Anne: user $LOGNAME"

I suspect this file is getting used if mail turns up in the rigt place.



Waitaminit - This whole thing is about moving from mbox format on one
machine to Maildir on another, right? We've been doing this the hard
way sorta kinds.

# cd /usr/share/doc/dovecot-*
# vi REDHAT-FAQ.txt

Read the first entry. It details how to do it.
===8<---
Q. We used to use University of Washington IMAP (UW IMAP), in the Red
   Hat distribution, the rpm was named "imap". We would now like to use
   dovecot and take advantage of its support for Maildir format, but
   we have existing user mail files in the old mbox format we need to
   migrate. How can we do this?

A. Read the documentation in
   /usr/share/doc/dovecot-*/UW-to-Dovecot-Migration. You will also
   find scripts there to help you.
===8<---

But of course, "That's cheating!"

{^_-}





More information about the fedora-list mailing list