procmail
[Top] [All Lists]

RE: Separate files instead of one file

2007-10-02 07:47:58
Tolga wrote Tuesday, October 02, 2007 9:35 AM:

After a lot of struggling and a lot of help, I managed to
get my messages to be written. However, they are written to
separate files now.  What I want is to have messages written to
files like pflogsumm, postfix, mrtg etc. instead of separate
files.

Please show a sample recipe that is not doing what you want
and a sample verbose log extract.

Basically, if you write to an object that is a simple file,
it will be saved and stored as it sounds like you want -- as
an "mbox"-style folder.  If you write to a directory,
it will save in separate files -- either saves under "legacy"
procmail-style directories where the files start with "msg."
and end with random unique strings, or (if you have appended
a slash to the end of the folder name) maildir-style folders,
or (if you've appended a slash-and-dot) MH-style folders.

"man procmailrc" explains the various choices and how to select
them or choose plain old mbox folders instead.  As I just stated,
flat mbox-folders are just ordinary files.  Use a lockfile (second
colon in the initial recipe line):

   :0:
   * condition
   mbox-file_here

From the man pages:

       If  it is  a directory,  the mail  will be  delivered to  a newly
       created, guaranteed  to be unique  file named $MSGPREFIX*  in the
       specified direc-  tory.  If the  mailbox name ends in  "/.", then
       this directory is  pre- sumed to be an MH  folder; i.e., procmail
       will use the next number it finds available.  If the mailbox name
       ends in  "/", then  this directory  is presumed  to be  a maildir
       folder;  i.e., procmail  will deliver  the message  to a  file in
       a  subdirectory  named  "tmp"  and  rename  it  to  be  inside  a
       subdirectory named "new".   If the mailbox is specified  to be an
       MH folder or  maildir folder, procmail will  create the necessary
       directories if  they don't exist,  rather than treat  the mailbox
       as  a  non-existent filename.   When  procmail  is delivering  to
       directories, you  can specify multiple directories  to deliver to
       (procmail will do so utilising hardlinks).

--
dman

____________________________________________________________
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