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.


--
J.

Reply via email to