procmail
[Top] [All Lists]

Re: Procmail and Maildir/

2000-08-22 05:02:01
Hi!

Quoting Gjermund Sorseth <gjermund(_at_)nextra(_dot_)com>:

   >   Thanks for the file. I tried it out and noticed that the
above does
   >   not create the $HOME/Maildir if it does not exist and
hence
   >   "maildir deliver" will fail because it tries to chdir to
   >   $HOME/Maildir directly.
   >
   >   Do you have any idea how the above can be changed to make
it create
   >   the $HOME/Maildir first?


I suppose the easiest thing to do would be for me to just make
the
`maildir' utility create the maildir if it did not exist. It was
a
councious design decision to make it fail in this case, but
thinking
about it again I think maybe this was wrong.

As a temporary work-around, you could have procmail call
`maildir create' first. In /etc/procmailrc for example:


  DROPPRIVS = yes

  :0 W
  | maildir create $HOME/Maildir; maildir deliver $HOME/Maildir

  EXITCODE=$?
  HOST


The DROPPRIVS assignment seems neccesary here to make procmail
run the delivery programs as the receiving users uid.

-- 

Thanks for the idea. I put in the following into my /etc/procmailrc :-

DROPPRIVS = yes

:0 W
| /usr/bin/maildir create $HOME/Maildir; /usr/bin/maildir deliver 
$HOME/Mail
   
EXITCODE=$?
HOST

And when I tried to send an email to the user, I get :-

554 5.3.0 <user(_at_)server(_dot_)domain>... unknown mailer error 1

It seems that the create ignored and the Maildir does not created in the 
user home directory.

Hmm.... do you have any idea what have gone wrong? Do you think you will 
make maildir auto create the necessary directories if they do not exist? 
It will definitely make life so much more easier for everyone. ;-p

BTW, if I were to store my mails in Maildir format, do you know how I 
can filter my emails such that certain emails will go into certain 
maildirs? Cos the docs for procmail and procmailrc only mentioned the 
case if using an mbox format file.

Thanks!

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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