procmail
[Top] [All Lists]

Re: Using alternative passwd files?

2002-07-09 16:09:37
On Sat, 06 Jul 2002 22:21:55 -0500, Philip Guenther wrote:

PSE-L(_at_)mail(_dot_)professional(_dot_)org writes:
At 19:52 2002-07-06 +0000, Lyn St George wrote:
I would like procmail to use password files which are kept
in /etc/virtual/<domain_name>/passwd, rather than /etc/passwd.

You'll need to change the source in the src/authenticate.c file to
do this.  Changing the cgetpwnam() and cgetpwuid() routines should be
all you need to do.  Actually, that depends on how you intend on telling
procmail what the domain of the user is.  If you want to pass the domain
as part of the username on the command line, then you'll need to hack
auth_finduser() too, and possibly others.  Good luck!


Procmail uses:

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

Actually, since procmail has no use for passwords, this functions
is not needed at all.  (The call to getspnam() in src/authenticate.c
is inside #ifndef PROCMAIL/#endif.  It's only there for use by other
programs written against the authenticate.h interface, of which cucipop
is the only one I know of.  Indeed, cucipop drove the development of
the authenticate.h interface...)


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

It also needs a getpwuid() lookalike for determining what the invoking
user is allowed to do and for when the -m option is used with an rcfile
in /etc/procmailrcs/

Thanks for all that. I've just done another search through the archives
and found that this general question has been asked several times. 
(apologies for not doing this properly before).

A couple of the most interesting posts are: 1996-12/msg00032 with
configurations, and 1999-12/msg00116 with an untested hack.

Haven't gone further yet, but I will and will post any results.

PS. does anyone know how to generate a sendmail.mc file 
from a sendmail.cf (ie "reverse engineeer")?

Philip Guenther


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