On Tue, Jun 18, 2013 at 12:23:51PM +0100, Z? Loff wrote:
> >
> > I don't really understand what you mean, because if you map your virtual
> > boxes to the 'vmail' user on Postfix, you essentially do:
> >
> > table users { foo => vmail, goo => vmail }
> >
> > unless I didn't understand what you meant
>
> Yes, you're right. I just meant that on postfix you can define a static
> uid for the virtual(8) delivery agent, and forget all about it when
> defining virtual users. I just have a list of valid recipients and
> that's it (no mapping).
>
Nah, we don't have that
> > > Is there any other reason for the mapping to a local user being
> > > mandatory (honest question, no criticism implied)?
> >
> > a mapping is required to determine the id under which a delivery will
> > take place. the user however is not necessarily a local user, it can
> > be a virtual userbase defined in a file or within smtpd.conf
>
> Sorry, now I'm confused. Do you mean 'foo => foo' is valid even if there
> is no local user 'foo'? (and I really apologise for all the newbie
> questions).
>
Nope, I meant that you can define an alternate "user base" that doesn't
rely on your local system users:
table myusers { gilles = 10:100:/home/gilles } # uid:gid:homedir
table vmap { [email protected] = gilles }
accept for domain example.org virtual <vmap> userbase <myusers> [...]
In that example, gilles doesn't have to exist on the system. OpenSMTPD
will assume that a user gilles exists and has uid 10 and gid 100.
Since the myusers replaces the system users lookup, the vmap may refer
to it with everything it implies (wildcards, etc ...)
> > > Anyway, I think an external MDA might be more suited to my needs...
> >
> > Could be, but using virtual and userbase some very tricky virtual setups
> > can be achieved. Maybe you should explain your use-case in details :-)
>
> All I want is to be able to handle multiple domains with multiple
> recipients, each with its own maildir, without needing to add a local
> user for each one. As I said, I managed to do this easily by mapping
> every recipient to a local user, so problem solved :).
>
Yup, that's the way to do it.
> I was just wondering if this could be done without having to add '>=
> localuser' to each entry of the 'users' table, basically.
>
Nope, if you want to provide a list of recipients addresses then you
have to provide the mapping.
If you want to accept mail for an entire domain and your MDA takes
care of checking which ones are valid or not, then you can use the
wildcard notation to avoid providing a full mapping:
table vmap { "@example.org" = vmail }
# smtpd accepts [email protected] and uses the "vmail" user
# for deliveries, the MDA can then check if WHATEVER is acceptable
#
accept for domain example.org virtual <vmap> deliver to mda [...]
--
Gilles Chehade
https://www.poolp.org @poolpOrg
--
You received this email because you are subscribed to mailing list:
[email protected]
To unsubscribe, send mail with subject:
[[email protected]] unregister