Hi,
your point is well taken. The reason for my setup is this:
I wanted to have virtual addresses for all my domains, which are mapped
separately to virtual users (meaning Maildirs delivered via dovecot
(mainly to use sieve)). Those virtual users would generally be
independant from UNIX users on the machine, so no UNIX users would have
to be created for virtual delivery.
However, I wanted mail delivery on the host for UNIX users to still work
and be compatible to the existing UNIX mechanisms (/etc/aliases,
.forward), so I also deliver mail for those UNIX users via local(8).
Most UNIX users have an alias to a virtual user, but not all. Those not
having it (including all UNIX users in use for system daemons) would be
delivered to spool files. To avoid that, all those users have to be
aliased to virtual users.
That said, I don't really need the delivery via local(8) and hence the
compatibility with /etc/aliases and .forward, so I could deliver all
mail via virtual(8) and disable local(8) altogether.
What would be the best approach for that? Setting local_transport = virtual?
Thanks.
Markus
Am 10.01.2011 18:57, schrieb Jeroen Geilman:
On 1/10/11 4:28 PM, Markus Treinen wrote:
Hello list,
I have a nicely running Postfix installation which uses both virtual
and local users.
To prevent local mail being delivered to spool files, I have to alias
(via /etc/aliases) the relevant users to a virtual user, which is not
very elegant.
It's ass-backwards.
If you need SOME local users to deliver, but not ALL, put the domain
in one of the virtual classes and alias the ones you DO want to
deliver locally, to a local account.
If you don't want ANY mail to be delivered locally, then do not use
externally-reachable local domains.
What I want to do is forward all mail, that _would_ be delivered
locally to a single virtual account, without aliasing every single
UNIX user.
You just said that you don't want mail to be delivered locally. So
don't deliver mail locally.
I tried using "luser_relay", but for that to work,
"local_recipient_maps" must be empty.
Where did you read that ?
luser_relay works fine with the default: local_recipient_maps =
proxy:unix:passwd.byname $alias_maps
But that would prevent local aliases in /etc/aliases to work.
What I have:
- virtual delivery for all my domains (as configured via MySQL)
So, no locally delivered domains at all. Sounds like you already have
what you want.
- all virtual mail is aliased to some_u...@virtual.local
- all mail for @virtual.local is delivered via dovecot
That sounds incredibly complicated.
Any particular reason you're not simply delivering your virtual
domains to dovecot ?
Or with the default postfix virtual(8) MDA ?
- mail for local users is aliased using /etc/aliases
There is absolutely no sane reason to do this.
If you want SOME "local users" to get mail, alias them from virtual to
local:
j...@virtual.domain j...@localhost
the expanded local alias will stil lundergo local(8) alias expansion,
so there is nothing you can't do with such a setup.
Note that, by definition, "local users" have system accounts with
owned mailboxes.
If you mean anything else by the term "local users", we're not going
to see eye to eye.