fetchmail-friends
[Top] [All Lists]

[fetchmail]Question on UID setting with mda

2004-02-22 18:26:52
I am trying to get fetchmail to set the euid to the appropriate value when 
delivering to an mda, but it does not seem to work as I would expect.

The fetchmail man pages indicate that when fetchmail is run as root and is 
delivering to an mda, the uid is set to the receipient's uid for the 
executing mda.

I have fetchmail running, as root, as a system daemon and it retrieves mail 
from a collection of outside mailboxes for multiple local uses, and feeds the 
messages into a local mailstore.

I have added the following line to my fetchmailrc:

poll mail.lippman.org protocol pop3 user "remoteusername" pass 
"remotepassword" is "nl" here smtpname "nl(_at_)lippman(_dot_)org" mda 
"/home/nl/test/mdatester"

mdatester is my test program, which just reads from stdin and drops the output 
into a file, so I can test fetchmail's feeding the mail correctly onto the 
mda. This part works fine.

However, I also have mdatester output the results of getuid(), geteuid(), 
getgid(), and getegid(). I expected that since is used the sequence 'is nl 
here' that the euid at least would be that of user nl, but in fact it all 
four values are 0 (root).

Can anyone help me to figure out what I might need to do to make this work 
correctly?

Thanks.
nl



<Prev in Thread] Current Thread [Next in Thread>
  • [fetchmail]Question on UID setting with mda, Neal Lippman <=