procmail
[Top] [All Lists]

Re: permission problems

2007-01-11 22:52:00
At 21:26 2007-01-11 -0700, NFN Smith wrote:
I'm having difficulty getting sendmail 8.13.8 to pass messages 3.22-11
on a Debian Sarge box, for a user ID that isn't root.

FTR, 3.22-11 isn't a valid procmail version number - it's a distribution 
specific patch level.  As such, it's pretty much meaningless to everyone 
here except someone who might be running the very same distribution and 
release as you are.

  cyg-admin:  "| /usr/bin/procmail -m ~cyg-admin/.procmailrc"

If you're delivering for a USER WITH AN ACCOUNT ON THE SYSTEM, either rely 
on procmail as LDA (if so configured, which is a fine idea), or use a 
.forward in that users' home directory.  What you're doing here is invoking 
the Mprog mailer to run a program (that's what the pipe symbol does), and 
this IS NOT DONE AS THE USER you think you're delivering mail for - it's 
done by whatever uid the MTA is running as (or which it might be configured 
to switch to when running such processes).  The LHS of the above alias has 
NOTHING WHATSOEVER TO DO WITH THE UID MAIL IS DELIVERED FOR.  In virtually 
every instance of the above format of alias, the LHS does not correspond to 
a local user.

As for determining what user your MTA is running Mprog as, add the 
following after LOGFILE in your .rc:

LOG="$LOGNAME
"

Then send yourself a test message

pri=30652, dsn=5.0.0, stat=Can't create output

If your MTA is running as a non privleged user when it invokes Mprog (say 
"daemon" or "sendmail" or somesuch), that user DOES NOT HAVE PERMS TO SCREW 
WITH FILES IN THE USER HOMEDIR (and other places as well).

If I 'su' to user cyg-admin, and run

So?  The prog alias DOES NOT CHANGE TO A USER FOR THE LHS.  *ALL* prog 
aliases  in your aliases file should be delivering as the MTA identity.

fgrep -i RunAsUser /etc/mail/sendmail.cf

FTR, does cyg-admin have a useable shell in /etc/passwd ?  su generally 
circumvents that (which is what allows root for instance to take on the 
identity of users who can't otherwise log in - I compile a lot of stuff as 
user nobody for instance).

who | procmail -m ~cyg-admin/.procmailrc

huh?  why pipe the output of who (a list of logged in users) to a 
procmailrc?  It isn't a message.

There's something small that I'm missing here -- any idea of what it is?

Uhm, experience with sendmail configuration?

---
  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 homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>