Re: From root to users

Arthur Dent <[email protected]> Fri, 30 May 2014 18:51:03 +0100
Newsgroups gmane.mail.procmail
Message-ID <1401472263.11206.32.camel@localhost>
On Fri, 2014-05-30 at 10:36 -0600, LuKreme wrote:
> 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

Sadly that didn't work. My test mail went through
to /var/spool/mail/root which as I am now using Maildir was invisible.

> > 
> > 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.)

That didn't work either.
I sent a test mail though the system and saw nothing. I was wondering
where it had gone when I noticed a rhythmical clicking coming from the
hard drive on the server I did a tail -f on the procmail log and found:

From [email protected]  Fri May 30 18:27:03 2014
 Subject: Testing14783
  Folder: /bin/procmail -d mark						   4191
From [email protected]  Fri May 30 18:27:03 2014
 Subject: Testing14783
  Folder: /bin/procmail -d mark						   4191

repeating about twice per second.

I couldn't find a process to kill and it wasn't until I
re-edited /etc/procmailrc to put back the
| /usr/libexec/dovecot/dovecot-lda -d mark line that it stopped!

What could be wrong with that?

Thanks again...

Mark