Aaron Stone wrote:
On Sun, 2006-11-19 at 13:28 +0100, Paul J Stevens wrote:
To do something like that in dbmail, you'd have to add an alias like
'postmaster@' to user 'myuser' - however, dbmail doesn't support such
wildcard cross-domain aliases! So, you need to add explicit aliases to
all users for each address you which to receive mail on. Or, you need to
start working out some funky stuff in the sql maps postfix supports.
Sure does, I wrote that code months ago :-) 2.2 supports username@ and
@domain catch-alls. I think some SQL trickery would be needed to get the
Postfix alias maps to understand this, however -- but it would be a
useful thing to post up on the Wiki if someone hammers out a reasonable
query for it.
Aaron
If you can create an alias like '[EMAIL PROTECTED]' (or in SQL would it be
'[EMAIL PROTECTED]'?)
then the sql for pulling your users and aliases is pretty easy.
I created a view:
create view postfix_users as
select username from
(
select userid as "username" from dbmail_users
union select
select alias as "username" from dbmail_aliases
) x where x.username ~ '[EMAIL PROTECTED]'
;
I've been using it for my local_recipient_maps all day.
But I'm still using some postfix alias entries because those are more system
related and I think I will want them there for the likes of [EMAIL PROTECTED]