procmail
[Top] [All Lists]

Re: Using alternative passwd files?

2002-07-07 04:41:04
On Sat, 06 Jul 2002 12:16:34 -0700, Professional Software Engineering wrote:

At 19:52 2002-07-06 +0000, Lyn St George wrote:
Hi all

I would like procmail to use password files which are kept
in /etc/virtual/<domain_name>/passwd, rather than /etc/passwd.

Procmail uses:

        getspnam()      (defined in /usr/include/shadow.h)
        getpwnam()      (defined in /usr/include/pwd.h)

It doesn't refer to the password files/paths itself.  If you want to hack 
something (for a reason I can't quite determine), you should either look to 
hack the system libraries (which make the most sense if you're running with 
different files), inject an alternate library function into the link, or 
hack at the procmail functions which use these library functions.

As far as I can find - and hopefully I've just missed it - this means
hacking into the code before compiling.

How is it you plan on passing the domain name?  Just wondering.

To explain the situation. We use vm-pop3d (http://www.reedmedia.net)
which is "virtual mailer" and does not use Unix usernames. It collects 
mail from foo/<domain_name>/username. The username:passwd pairs
are held in separate passwd files, in bar/<domain_name>/passwd, and 
usernames can be of any length, eg "some.long.user.name" is quite OK. 
Usernames can thus be duplicated on the machine.

It's a very useful pop daemon, but everyone has the problem of how 
to feed mail to it. We currently use this:- virtusertable changes 
'user(_at_)domain(_dot_)com  user.domain.com', then aliases does this:-
'user.domain.com: /foo/bar/username' (ie, to a file). Sendmail does 
not check a user's existance with this method. The problem here 
is file locking, as vm-pop3d uses dot locking which is not honoured 
by sendmail. 

Also, procmail is obviously a very useful thing to use for numerous
reasons and we want to implement this instead of the 'virtusertable to
aliases' kludge. But we immediately run into the problem of procmail
looking up /etc/passwd and not finding the user. Hence my question.


I was hoping that there would be something like PASSWD=/foo to put several 
times in /etc/procmailrc, but I haven't seen it mentioned.

That'd be because there is no such functionality.

An alternative is to have it avoid password lookups entirely.

Procmail makes the pw calls in order to obtain the users's home dir and 
their default shell.

Hmmm. This is starting to look very complex ... We may need to
think it through from the start again for some alternative method ..

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


-
Cheers
Lyn St George
+---------------------------------------------------------------------------------
+ http://www.zolotek.net .. eCommerce hosting, consulting
+ http://www.os2docs.org .. some 'How To' stuff ...
+----------------------------------------------------------------------------------

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