This is what I use for a Maildir setup using procmail (also spamassissin):
DROPPRIVS=yes
SHELL=/bin/bash 
MAILDIR=$HOME/Maildir
LOGFILE=$HOME/procmail_log
LOCKFILE=$HOME/.lockmail
DEFAULT=$MAILDIR/new
LOG="--- Logging ${LOGFILE} for ${LOGNAME}, "
:0fw
* < 50000
| /usr/bin/spamc
#:0:
#* ^X-Spam-Status: Yes
#$MAILDIR/.Spam/new

# Delete spam with the SpamAssassin Spam-Status header at anything over 5
#:0
#* ^X-Spam-Status: .*, hits=([5-9]\.|[0-9][0-9])
#/dev/null

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Stefano Pogliani
> Sent: Thursday, August 07, 2003 4:43 AM
> To: Todd Lyons
> Cc: Cooker Mailing List
> Subject: [Cooker] Re: Procmail config
> 
> 
> Todd,
> 
>     another couple of questions:
> 
>    1. what would I have to do to teach my system to place my
>       /var/spool/mail/stefano mbox file into my $HOME/Mail directory?
>    2. if I avoid to set the DEFAULT directive in .procmailrc, in
>       principle I would not have to care about the location of my "mbox"
>       file, right?
>       So, the interest in moving the mbox file from /var/spool/mail into
>       $HOME/Mail is "simply" because of quotas... right ?
> 
>       In addition, I would add another advantage in doing what you
>       suggest. When I moved from 9.0 to 9.1, I backed up a lot of
>       things  (including my $HOME) but, for some strange reason, I
>       forgot to backup /var/spool/mail....
>       So, when I restarted my 9.1 system, I lost all mails that where
>       still in the default inbox.... this would have never ghappened if
>       it was under HOME...
>       So, one reason more to learn how to "safely" move this file under
>       HOME.
>    3. I heard other people talking good things about courier-imap.
>       On the other hand, MDK still provide UW as a default.
>       What is your point of view? Which are the advantages/disadvantages
>       of one package versus the other ?
> 
> Thanks a lot. Best regards
> /stefano
> 
> Todd Lyons wrote:
> 
> >-----BEGIN PGP SIGNED MESSAGE-----
> >Hash: SHA1
> >
> >Stefano Pogliani wanted us to know:
> >
> >  
> >
> >>Todd,
> >>  thanks for the reply
> >>    
> >>
> >
> >Bringing it back on the mailing list as others might be able to benefit
> >from this and I charge for consulting.
> >
> >  
> >
> >> 1. well, I do not know what UW is but I suppose is the IMAP program I
> >>    am using by default, right ?
> >>    
> >>
> >
> >If you do 'rpm -qa imap*' and it shows you something like imap-2002a or
> >similar.  That is the UW Imap server (which can also do pop by the way).
> >
> >  
> >
> >> 2. so, the MAILDIR directive simply tells WHERE the OTHER mailboxes
> >>    (what I called "my IMAP folders" are stored).
> >>    IS this correct ?
> >>    
> >>
> >
> >Yes.
> >
> >  
> >
> >> 3. In some sample config, I saw a DEFAULT directive which was
> >>    something like =$MAILDIR/mbox.
> >>    Since I do not have this "mbox" but I have the
> >>    "/var/spool/mail/stefano" one, my question was "how can I set the
> >>    DEFAULT to point to my /var/spool.... file".
> >>    
> >>
> >
> >You are trying to get it to do something that it is not intended to do.
> >That default directive is a DIRECTORY whereas your
> >/var/spool/mail/username mbox is a single FILE.  See, each individual
> >mailbox folder is a single file and they all reside in $HOME/mail by
> >default, except for the INBOX which is the /var/spool/mail/username
> >file.
> >
> >At this point, my advice to you is to quit trying to do it your own way
> >and conform to the standard.  It will make it much easier to do it.
> >Though your way is not wrong, it's technically complicated.  An
> >additional benefit is in the case of an ISP who is offering specific
> >mailbox sizes.  If you implement quotas, it's very easy to enforce them
> >on the home directories.  It can be done on /var as well, but it gets
> >complicated because so many processes write things there, not just
> >users' mail.
> >
> >  
> >
> >>     From what you write at the end of your mail, this is implicit, so
> >>    that if I do not specify this directive, PROCMAIL already knows
> >>    what to do with mails that do not match any filter
> >>    
> >>
> >
> >Correct.  They get appended to /var/spool/mail/username.
> >
> >  
> >
> >> 4. My "Mandrake Export" folder is, actually, deep in a hierarchy.
> >>     From a filesystem point of view it is in
> >>    /home/stefano/Mail/Linux/Mandrake/Expert_4
> >>    How do I describe this nested folder in the procmail rule ?
> >>    
> >>
> >
> >It's not intended to be used that way, but it can be.  Just put for the
> >folder name:
> >  Linux/Mandrake/Expert_4
> >The default path of $HOME/Mail/ is automatically prepended to it.
> >- -- 
> >Blue skies...        Todd    Public key: http://www.mrball.net/todd.asc
> >   $pi = 3.141592653589793238462643383279502884197169399375105; 
> >   # from memory                               --springgraph.pl
> >Linux kernel 2.4.19-24mdk   5 users,  load average: 1.12, 1.51, 1.29
> >-----BEGIN PGP SIGNATURE-----
> >Version: GnuPG v1.2.2 (GNU/Linux)
> >Comment: http://www.mrball.net/todd.asc
> >
> >iD8DBQE/MdAEIBT1264ScBURAukdAKC/0qmD0ZNNYogL5n60SY0rxhR3iACdHLRj
> >znLD/KxMOljDj/QNrl0NSVo=
> >=MO1N
> >-----END PGP SIGNATURE-----
> >  
> >
> 
> 
> 

Reply via email to