Partial catch-all allowed?

  • acubino

    acubino - 2014-04-23


    I'm tried to create a partial catch-all email.

    I have a account called "" and I make a alias called "notificationes-*".

    Response is: User unknown in virtual mailbox table

    Another alias without '*' are working OK.

    Configuration mistake, or this can't make?

  • Simon Hobson

    Simon Hobson - 2014-04-24

    It's not a supported configuration. I'm sure patches would be welcome.

  • acubino

    acubino - 2014-04-24

    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.

  • Simon Hobson

    Simon Hobson - 2014-04-24
    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 ?
    Last edit: Simon Hobson 2014-04-24
  • acubino

    acubino - 2014-04-24


    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.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks