procmail
[Top] [All Lists]

Re: LASTFOLDER blues

2007-03-27 10:37:41
On Tue, Mar 27, 2007 at 08:30:33AM -0700, Bart Schaefer wrote:

There are exactly two ways that I know of to file mail into multiple
mailboxes in procmail.

(1) Use the "c" flag on some recipes.
(2) Build up a space-separated list of directories [MH or maildir] and
deliver to all of them at once with a single recipe.

You insist that you aren't doing (1).  However, (1) is also the only
case in which it's necessary to do error checking on each recipe ...
because, well, in (2) there only is one recipe, so "each" is sort of
meaningless.

I almost agree.  I will note one odd thing, though.

    7:23pm [~/Mail] 655[0]> cat multidelivery.rc
   
    DEFAULT = /dev/null
    VERBOSE = y
   
    :0 w
    DUMMY=| ( rm -rf FolderA FolderB FolderC dummy;\
              touch FolderA FolderB FolderC )
   
    :0
    FolderA/ FolderB/ FolderC/
   
    LOG = "ERRORCODE is $?; LASTFOLDER is $LASTFOLDER"
    LOG = ""
   
    :0e
    { ERROR_FOUND }
   
    7:24pm [~/Mail] 656[0]> procmail -m multidelivery.rc < $SPAMPLE
   procmail: [1988] Tue Mar 27 19:24:16 2007
   procmail: Assigning "DUMMY="
   procmail: [1988] Tue Mar 27 19:24:16 2007
   procmail: Executing " ( rm -rf FolderA FolderB FolderC dummy;\
              touch FolderA FolderB FolderC )"
   procmail: Unable to treat as directory "FolderA"
   procmail: Skipped "FolderB/ FolderC/"
   procmail: Assigning "LASTFOLDER=FolderA"
   procmail: Opening "FolderA"
   procmail: Acquiring kernel-lock
   From Danielsijie(_at_)wanadoo(_dot_)fr  Sat Aug  6 23:40:41 2005
    Subject: Dating site for sexoholics
     Folder: FolderA                                                          
1744
   
    7:24pm [~/Mail] 657[0]> ls -lt | head -4
   total 13824
   -rw-------    1 dman     users        1744 Mar 27 19:24 FolderA
   -rw-------    1 dman     users           0 Mar 27 19:24 FolderB
   -rw-------    1 dman     users           0 Mar 27 19:24 FolderC

Dallman (at least it put the mail somewhere)

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>