Re: Procmail recipes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Anne Wilson wrote:

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@xxxxxxxxxxx
$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@xxxxxxxxxxx
 $MAILDIR/Design/
*****

Anne

I've been working on procmail scripts today also, and I believe I've solved my problem (and you were having the same problem as me). The messages actually need to be put in the 'new' subdirectory. For example, if you're trying to put messages in your Design folder under the Inbox, instead of...

   :0
   * ^To:.*design@xxxxxxxxxxx
   ${MAILDIR}/Design/

...it should be...

   :0
   * ^To:.*design@xxxxxxxxxxx
   ${MAILDIR}/.INBOX.Design/new

or it could be just '/.Design/new' if the Design folder is a top level folder. Anyway, I hope this helps you.

Justin Willmert


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux