On Mon, Sep 13, 2010 at 07:12:14PM +0200, Valentin Gjorgjioski wrote: > On 13.09.2010 18:59 Victor Duchovni wrote: >> On Mon, Sep 13, 2010 at 06:52:49PM +0200, ???????????????? >> ?????????????????? wrote: >> >>> /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); >> Think about the full set of lookup keys Postfix will use. >> > Yes, that's the second option... To use %u if someone confirm that lookup > key is replaced just first time it is found.
You need to make sure that Postfix does not send partial keys, when doing pattern matching. The closest you get is '%...@%d' which will not try '@domain' keys or bare user keys, but if you have a recipient delimiter, it will still try 'user+extens...@domain' and only then 'u...@domain', so you can't combine what you are doing with address extensions. They pattern matching you are trying to do is really a bad idea IMHO, but its your rope... -- Viktor.