procmail
[Top] [All Lists]

Re: sendmail and procmail don act on $HOME/.procmailrc

2001-07-02 11:38:17
Thanks Lou,

please find my feedback below:

Hey.  Assuming you are calling procmail with $1 as the username, this
should work if you add it to your /etc/procmailrc prior to the
delivery of the messages:


# this enables automated procmail recipe creation for users;
# roll your own tool to allow creation of procmail recipes on a
# per-user basis and place them there, but it might be a bad
# idea to let users edit their own recipes.
INCLUDERC=/home/$1/.procmailrc


i have this directive in /etc/procmailrc already. this is my /etc/procmailrc
file:

ORGMAIL = /var/spool/mail/$LOGNAME
SENDMAIL = /usr/sbin/sendmail
PATH=/usr/bin:/usr/local/bin:/bin
PMDIR=$HOME/
MAILDIR=$HOME/
LOGFILE=$MAILDIR/log.`date +%y-%m-%d`
SHELL=/bin/sh
INCLUDERC=/path/to/user/.procmailrc

but the catch is that procmail matches this name on all user names. in
particular this recepies filters mail from a certain sender. but when my
other users get mail from this sender the mails are filtered in the same
way, although there are no .procmailrc files in their dirs. so i guess the
INCLUDERC directive simply gets the rules from $HOME/.procmailrc and
propagades them for everyone - which is the same as simply listing the rule
in question in the /etc/procmailrc.

This assumes the users email userid is the same as their home
directory name.
I wouldn't just include the $HOME/.procmailrc, since procmail may be
called by sendmail as root - then you would have to just put it all in
/root/.procmailrc.  On my system, procmail is called by sendmail like
this:
procmail $u $h
where $u is the userid, and $h (if it exists) is the folder the
message should be delivered to.

procmail $u $h is in your sendmail.cf, right? in my sendmail.cf i have:

Mlocal,         P=/usr/bin/procmail,F=lsDFMAw5:/|@qSPfhn9,
S=EnvFromL/HdrFromL$
                    T=DNS/RFC822/X-Unix,
                    A=procmail -Y -a $h -d $u


This way, $1 is typically the same as
the userid of the recipient.

Sorry if I am overcomplicating this.


hey, we linux admins are used to complicated stuff :)  :(

HTH

Lou

On 07/02/01 03:32 PM, Ivailo Chipev sat at the `puter and typed:

   Hi all,

   Problem: sendmail and procmail activate only from /etc/procmailrc,
but
   don't act on any $HOME/.procmailrc recipes. However when i do a local
   recipe test like # procmail .procmialrc < sample.msg the recipe works
   correct.

   I wonder what i am missing. here is what i have done so far:

   1. installed latest procmail
   2. edited the Mlocal parameter in sendmail.cf as described in the
   procmail documentation.
   3. even created a .forward file in the user's home dir

   any input will be appreciated.

   thank you all.

   ===
   Ivailo "ivc/ivak" Chipev mailto: 
[1]contact(_at_)ivc(_dot_)phalanx(_dot_)cc



   Phalanx Web Management GmbH [2]http://www.phalanx.cc



   Public PGP Key [3]http://pgpkeys.mit.edu:11371



   ===

References

   1. mailto:contact(_at_)ivc(_dot_)phalanx(_dot_)cc
   2. http://www.phalanx.cc/
   3. http://pgpkeys.mit.edu:11371/

--
Louis LeBlanc
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
leblanc(_at_)acadia(_dot_)ne(_dot_)mediaone(_dot_)net
http://acadia.ne.mediaone.net                Ô¿Ô¬


===
Ivailo "ivc/ivak" Chipev mailto: contact(_at_)ivc(_dot_)phalanx(_dot_)cc

Phalanx Web Management GmbH http://www.phalanx.cc

Public PGP Key http://pgpkeys.mit.edu:11371

===

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


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