[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding Users


are you back at home?  I have a couple of questions for you.  The first
is related to "adding users" - remember there was a discussion in the list
about an interface for custom replacement of getpw{nam,uid} functions?
I have some ideas on this matter, and even ready to write code, but I want
to discuss the concept first.

The second question is easy.  In .cf scripts, when a database lookup is
performed, there is a piece of code like this:

        if a="$(fqdnaliases "$lcaddress")" ; then
                db add expansions "$lcaddress" fqdnaliases
                priv=$(filepriv -M 644 $MAILVAR/db/fqdnaliases$DBEXTtest \
                                $(db owner fqdnaliases)) &&
                nattr=$(newattribute $A privilege $priv) &&
                return $(echo "$a" |                                    \
                         listaddresses  -c "$a fqdn alias expansion"    \
                                        -e root                  |      \
                         maprrouter $nattr "fqdnalias" "$address"       \
                                "$plustail" "$athost")

Now imagine that I get a "new value" ($a) with a custom database
query, that does not have any file associated with it in $MAILVAR/db.
In this case, what is the "proper" way to assign $nattr?

> > Is there a way of adding a user to the Zmailer system without
> > having a UNIX account?.
>      If just having an alias was enough, you propably were
>      not asking this..
>      It depends what you mean with that question.
>      After all, ZMailer is just MTA part of the system, not
>      for example a Message-Store which would care about ways
>      to identify users.
>      Right now it happens co-incidentally that 'mailbox' program
>      is used to do stores to UNIX mailbox, and as such, it cares
>      about what   getpwnam()  yields, but you could run  Cyrus
>      as your MS subsystem, and then all rules change...
>      At my work, (and at several other places,) people configure
>      ZMailer  with option:
>   --with-getpwnam-library="-L.. -l.."
>                             Linking options for non-std getpwnam()
>                             libraries 
>      and then using their special databases/whatnot to supply a virtual
>      "password" view of things.
>      As ZMailer is not a *full* MTA+MS system, just the MTA, you need
>      *some* MS system with similar setup for access to those mailboxes.
>      I have slightly hacked pop3d code -- basically just same linking
>      as what I use with mailbox.  (Or maybe not so slightly modified,
>      as all of our virtual MS users have same UID number value, and
>      the server allows access by canonified mailbox filename, not by
>      UID..)
>      ... but if you want to combine UNIX unames, and non-UNIX unames,
>      I think it becomes rather difficult...  This is those things
>      where you can do one, but not both (easily).
> > Regards,
> > A
> /Matti Aarnio <mea@nic.funet.fi>