I'm tried to create a partial catch-all email.
I have a account called "firstname.lastname@example.org" and I make a alias called "email@example.com".
Response is: User unknown in virtual mailbox table
Another alias without '*' are working OK.
Configuration mistake, or this can't make?
It's not a supported configuration. I'm sure patches would be welcome.
Oh. I'm really unhappy with this :(, I will try to make directly with postfix and so patch the code and upload. But i didn't know if will have luck, i don't have enought free time for develop now.
Thinking a bit more about this, you can probably do it by adding
another SQL lookup (or possibly editing the existing one).Having
a little think, something along the lines of :
select goto FROM alias WHERE address MATCHES CONCAT ( pattern1,
'%', pattern2, '@', '%d' )
I just can't think offhand what the code needs to be for
pattern1 and pattern2 (my SQL foo is rusty and not enough
coffee this morning).
Hmm, if alias.address is of the form 'pattern1*pattern2'
(where pattern1 or pattern2 can be null), then transcoding '*'
to '%' and then testing '%s' MATCHES '<transcoded version of
alias.address>' ought to do it. You could possibly just allow
'%' as a character in an alias address field (IIRC there's a
regex of allowed characters in PFA) and just do "'%s' matches
address" - does this introduce any security issues allowing
the user to do direct SQL match expressions ?
If it doesn't create any security issues, then allowing % and
? (or transcoding * to %) would allow immense flexibility -
ie allow the user to cock stuff up themselves really well !
And what happens if there is more than one match ? More
than one goto record will be returned to Postfix - will it
barf on them ?
The easiest option is to use postfix' recipient_delimiter - but this will affect all addresses.
If you want a solution specific to one or two addresses, see
https://sourceforge.net/apps/mediawiki/postfixadmin/index.php?title=Regexp_Aliases for a possible solution.
I just write the reply before but i dind't see in the replys.
Looking in google i found the url of the wiki you tell in last post and now are working great.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.