[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Procmail battles



From: "Gregory P. Ennis" <PoMec PoMec Net>

On Sun, 2006-05-14 at 12:52 +0100, Paul Howarth wrote:
On Sat, 2006-05-13 at 20:52 -0500, Gregory P. Ennis wrote:
> On Sat, 2006-05-13 at 21:42 -0400, Paul Michael Reilly wrote:
> > Les Mikesell <lesmikesell gmail com> writes:
> >
> >  > On Sat, 2006-05-13 at 14:48, Paul Michael Reilly wrote:
> >  >
> >  > > LOGFILE=/root/procmail.log
> >  > > LOGABSTRACT=yes
> >  > > VERBOSE=1
> >  > >
> >  > > and send mail to "root" then I actually see an abstract appended to
> >  > > /root/procmail.log which is consistent with the procmail man page in
> >  > > that it says $HOME/.procmailrc will get processed.  I leaped,
> >  > > incorrectly it would appear, to the conclusion that $HOME referred to
> >  > > the mail target.  It must be referring to the User running procmail,
> >  > > i.e. "root" on a stock Fedora Core system, which makes considerable
> >  > > sense.  This, I believe, is the crux of my battles.
> >  >
> >  > $HOME is the expansion of the environment variable HOME, which
> >  > is set to the 6th field of the user's /etc/passwd file entry,
> >  > i.e. their home directory.  This happens in a straightforward
> >  > way during logins and is emulated in procmail runs.
> >  >
> >  > > So that raises the question: how does one configure mail (sendmail or
> >  > > otherwise) on a stock Fedora Core system so that ~User/.procmailrc
> >  > > will be processed for all User's on the system?
> >  >
> >  > ~user is expanded in a shell to the same thing as $HOME would be for
> >  > that user.  Sendmail should, by default, use procmail for everyone
> >  > which should then process their .procmailrc but it will not trust
> >  > files where the permissions allow write access by others.
> >
> > Excellent.  This insight has led to the real culprit: selinux.
> > Disabling selinux leads to FC4 level behavior so it is a safe bet that
> > a more stringent FC5 selinux setting is what is ailing me.  Now,
> > ideally, I should be able to google FC5, selinux and mail and get some
> > insight.  Not so.  Anyone have a reference where I can learn what
> > FC5 now expects from sendmail/procmail to make selinux happy?  The
> > entries in /var/log/messages are not exactly real informative:
> >
> > May 13 21:22:04 roamer kernel: audit(1147569724.815:39): avc: denied { search } > > for pid=26417 comm="procmail" name="log" dev=dm-0 ino=4128796 > > scontext=system_u:system_r:procmail_t:s0 tcontext=system_u:object_r:var_log_t:s0 > > tclass=dir
> >
> >
> > -pmr
> >
> I am having the same problem with FC5 and selinux.  My system worked
> fine with FC4 but is failing with FC5.  I am using procmail to store
> spam in created directory ie /savedrwxr-xr-x root mail root:object_r:root_t > .


/home/$USER/Mail/spam.  When I turn
> selinux off I can get procmail to work perfectly, but when I turn
> selinux back on it fails to be able to write in this directory.  I know
> very little about selinux and would appreciate some references as to
> changes from FC4 to FC5 as well.

The out-of-the-box selinux policy for FC5 was somewhat broken for
procmail, particularly if you wanted to forward mail as an action.

Paul, what log files are you trying to write, and what the the "adv:
denial" messages you see in /var/log/messages when procmail tries to
write to this log?

Gregory, is /save/home/$USER the home directory for $USER?
What's the output of:

Of course one could always use $LOGNAME instead of $USER. The former is
usually defined within procmail instances and the latter may not be.

{^_^}
[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]