procmail
[Top] [All Lists]

Re: [Q] Permission and authentication (or Who is the landlord?) (fwd)

2002-03-10 15:47:27
At 00:06 2002-03-11 +0200, Udi Mottelo wrote:
  Folder: /home/ayalon/sysgrp/uuddii/mail/uuddii                     772

        Procmail created new folder (/home/ayalon/sysgrp/uuddii/mail/uuddii)
        and set the owner to be "root".  I understand from  Sean B. Straw
        that it is normal.

User ROOT created a file, outside of a normal DEFAULT delivery. Guess who owns the file?

If you want to execute code within /etc/procmailrc as the user (that includes CREATING files), you should drop root privledges, by using "DROPPRIVS=YES". I refer you again to 'man procmail' and 'man procmailrc'.

What happen in $DEFAULT cases (/var/spool/mail)?
        iow. why the owner is the $LOGNAME in the ordinary spool?
        What should I do to creat new folders in users home?

If you're doing it from /etc/procmailrc, you need to drop root privledges in order to assume the recipient UID. See above (BTW, a quick search of the manpages for 'root' would have lead you to this answer).

        More details:

[snip - ls results]

These same details were provided in your previous message. Nothing is different, and just as importantly, the significance of this data is unchanged since your original post - that being that NONE of this data is pertinent to the problem. In my original response, I indicated that IF the code in question was being executed from /etc/procmailrc it was going to be executed as root, and that would lead to the result you were reporting.

        From my sendmail.cf:

Mlocal,       P=/usr/bin/procmail, F=lsDFMAw5:/|@qSPfhn9,

It's pretty much a given that if /etc/procmailrc is being processed that procmail is configured as your LDA, unless you're running the script manually.

 S=EnvFromL/HdrFromL,
              R=EnvToL/HdrToL, T=DNS/RFC822/X-Unix,
              A=procmail -t -Y -a $h -d $u

Mprocmail,    P=/usr/bin/procmail, F=DFMSPhnu9, S=EnvFromSMTP/HdrFromSMTP,
              R=EnvToSMTP/HdrFromSMTP, T=DNS/RFC822/X-Unix,
              A=procmail -Y -m $h $f $u

        Can I do:

                 A=procmail -Y -m $h $f  -d $u

On which, Mlocal, or Mprocmail? -m is VERY inappropriate for Mlocal (see 'man procmail' again -- EVERYTHING after the -m argument will be treated as an rcfile - besides that, it'd be inappropriate for LDA anyway - if it DID work, it'd surely strip users of the ability to handle their own .procmailrc files). As for Mprocmail, unless you're manually invoking it from a sendmail rule or mailertable entry, Mprocmail isn't used here (and frankly, in 99.8% of all procmail installations -- for some reason, people assume they need an Mprocmail just to use procmail as an LDA, which simply isn't the case), so config changes to it aren't going to affect anything about your delivery if it's already going through Mlocal.

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

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