Today I did tried to implement one catch-all email per domain.
Actually it seems to me that I hit some bug.... which is most probably
very unlikely ... but still I want to share this experience and maybe
someone will point out where my problem lies.
postconf -n
Important lines:
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
/etc/postfix/mysql-virtual-alias-maps.cf
Important line:
query = SELECT destination FROM view_aliases WHERE '%s' like
concat('%%',email,'%%') and '%s' not in (select email from
view_users);
I know this query can be very inefficient for large table(view) but
leave it now aside.
postmap -q [email protected]
mysql:/etc/postfix/mysql-virtual-alias-maps.cf
Output: [email protected]
postmap -q [email protected] mysql:/etc/postfix/mysql-virtual-alias-maps.cf
No output
sending an email to [email protected]
99914906BB7: to=<[email protected]>, orig_to=<[email protected]>
So far so good
sending an email to [email protected]
99914906BB7: to=<[email protected]>, orig_to=<[email protected]>
Oh ... I hate it ... Why?! Postmap said - no result.
Is there any way to debug this?
Actually I have other ways to solve it (probably!?) but I want to know
what is wrong with this.
And yes - one more thing... Somehow I DID suspect that postfix
replaces my %s in the query just the first time. I don't know why I
have this feeling.
Is there any way to test/debug it?
Valentin
--
Valentin Gjorgjioski
Mobile: +386 40 1 26 26 7
Email: [email protected]
--
Human knowledge belongs to the world
--