procmail
[Top] [All Lists]

Re: default=in ignored

2005-10-27 12:11:12
Hanspeter Roth wrote:

I've asked this question already to the mutt-people but got no
answer.

My ~/.procmailrc contains DEFAULT=in. When running fetchmail
procmail is called via sendmail and this assignment is honored.

However when I'm using the mutt MUA locally I have the mutt
assignment sendmail=/usr/bin/procmail.
In this environment mail is delivered to /var/mail/user instead to
~/mail/in. It seems that ~/.procmailrc is ignored.
Do the procmail people have an idea what's going on and how to fix
this?

I've a completely different answer from Bart's.

Because you set mutt's $sendmail to /usr/bin/procmail, then for your 
outgoing mail, mutt invokes

  /usr/bin/procmail maybesomeoptions add(_at_)re(_dot_)ss1 
add(_at_)re(_dot_)ss2 ...


for all the addresses on the envelope of the message.  Thus, procmail 
(1) runs under your account's privileges and (2) takes the first address 
on the line as the name of an rcfile.  Since there is no such rcfile, it 
acts as though it had no rcfile to use and delivers to your $ORGMAIL.

If you want procmail to catch your outgoing mail and process it, you 
have to tell mutt that sendmail="/usr/bin/procmail -m $HOME/.outrc" 
(assuming that you can have spaces in there; with mailx I couldn't and 
had to resort to a workaround -- and also assuming that $HOME will be 
recognized, but if not, you can always substitute the absolute path to 
your home directory).  With -m, procmail carries along the rest of the 
positional parameters given to it.

Then end .outrc with this:

  :0
  ! "$@"

so that the last thing procmail will do will be handing the message over 
to the real MTA with all of the parameters that mutt gave to procmail.


____________________________________________________________
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>