Re: From root to users

LuKreme <[email protected]> Fri, 30 May 2014 10:36:18 -0600
Newsgroups gmane.mail.procmail
Message-ID <[email protected]>
On 30 May 2014, at 09:59 , Alan Clifford <[email protected]> wrote:

> Arthur Dent wrote (at 12:13 (+0100) on Friday, 30th May, 2014):
> 
>> 
>> Is there a way to inform procmail explicitly to pass on from root to
>> user=mark?
>> 
> 
> 
> I am thinking something like this:
> 
> Delete this
> 
> # Anything else falls through to me:
> | /usr/libexec/dovecot/dovecot-lda -d mark
> 
> 
> add this to /etc/aliases
> 
> # Person who should get root's mail
> root:           alan
> 
> assuming you are using sendmail.  Hmmm, thinks, you said "collect" mail, so I'm not sure what you are using to launch procmail

That won't work, it will alias ALL the root mail to alan before handing it off to the /etc/procmailrc

I think what you have to do is call procmail from the /etc/procmailrc and then call the dovecot LDA from the .procmailrc.

so, in procmailrc:

#deliver anything else to mark
:0
| /usr/local/bin/procmail -d mark

(I don't know if you need any flags on that recipe or not, test first. Test *a lot* first.)

Then, in your .procmailrc, at the end you do

:0
| /usr/libexec/dovecot/dovecot-lda -m $MYBOX

(do not put a f (or w?) flag on this, dovecot-lda is a delivery pipe.

-- 
What we have here is a failure to communicate.