Mar & Mark --

...and then Fairlight said...
% On Fri, Aug 20, 1999 at 11:10:38AM -0400, Mark E. Drummond wrote:
% > I would like to change my setup a bit so that I have say ~/Mail/ which
% > would contain Maildir style mailboxes under it like so:
% >     ~/Mail/inbox
% >     ~/Mail/mutt
% >     ~/Mail/qmail
% > So everything is set up except for the mail filter and I am wondering
% > which I should use. I have some experience with procmail but have not
% > managed to get it to work with qmail. Is there a filter that I can stick
% > in the pipe that will deliver to Maildir style folders?
% 
% Maildir is the one where each message is in a separate unique file inside
% the "directory" which is the folder, no?

I think so, too, but can't tell for sure.  Maybe I'm thinking of mh.


% 
% Should be easy with procmail.  You just need to do a variable substitution
% from an execution at the top of the .procmailrc to a small script of your
% choice that assembles a random filename from the PID ($$ in most shells)
% and the mm-dd-hh-mm of the `date` command and stick them together like:
% $$-mm-dd-hh-mm  

If I were going to do this, I'd probably put the $$ at the end so that
it would sort well :-)  But you don't even have to do that much...


% 
% So say you have a script "maildirdate" in procmail's path somewhere, you'd
% do:  fixedfile=`maildirdate`
% 
% Then when you save out to your mailing lists, you could use the variable as
% the last part of the filename in your specific recipes:  
% /home/mark/Mail/mutt/$fixedfile

Instead, just tell procmail to put it there; use a destination folder
that looks like

  /home/mark/Mail/mutt/.

to tell procmail to increment its counter and drop the new message in
place.


% 
% I -think- that works the way you want it, maintaining procmail usage for
% you.  :)  I glanced over the procmailrc man page quickly and it looks like
% it's acceptable.
% 
% (another) mark->


:-D
-- 
David Thorburn-Gundlach         * It's easier to fight for one's principles
(play) [EMAIL PROTECTED]      * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]         Helping out at Pfizer
http://www.bigfoot.com/~davidtg/        Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
"Why2k?  Well, I didn't think at the time that I could charge any more!"
Note: If bigfoot.com gives you fits, try sector13.org in its place. *sigh*

PGP signature

Reply via email to