[Solved] Infinite email aliases (user-anything) no longer working

  • I migrated my Kopano installation to a new server platform (from SME Server to ClearOS). Same version ( on both old and new server. The new server was installed from scratch and the data was migrated.

    Everything is working as before except I can no longer receive “Infinite Alias” addressed emails. On the old server (qmail) allowed user-anything@domain.com to pass to user and Kopano (and Zarafa before that) would process the email to user. I never configured anything for this, it just worked out of the box.

    The new server (postfix) was bouncing emails addressed to user-anything@domain.com. Logs showed that postfix was bouncing the message because of this default setting in main.cf

    recipient_delimiter = +

    Which I changed to this…

    recipient_delimiter = -

    Now postfix accepts the message but it is getting bounced by Kopano as evidenced here in the dagent log…

    Fri Feb 2 10:25:46 2018: [error ] [12478] Failed to resolve recipient user-test@mydomain.com (0)
    Fri Feb 2 10:25:46 2018: [error ] [12478] Requested e-mail address "user-test@mydomain.com" does not resolve to a user.

    I have scoured all the config files and have not been able to figure this out, can someone please kindly point me in the right direction?

  • Kopano

    Hi @pbfloor ,

    You still have to adapt your postfix configuration so that it properly resolves username-alias to just username.

    Kopano-dagent needs to get passed either the primary email address of a user or the username.

  • Felix,
    Thanks for the quick reply. All I can say is UGH!!! I know next to nothing about postfix (been using qmail for 15 years). I will make good use of google and post my fix for anyone else that needs help.

  • For anyone else interested, you can do this via this setting in main.cf
    I’m sure there are other ways but I couldn’t find anything that worked. I desperately tried luser_relay but just could not get it to work so I ended up doing this…

    virtual_alias_maps = /etc/postfix/virtual

    You have to use regex to accomplish it so if you are using the regular virtual alias file as a hash, you will need to create another one and add it to the “virtual_alias_maps =” line. Your virtual aliases will need something like this (this does both user- and user_)…

    /^user1-/ user1
    /^user1_/ user1
    /^user2-/ user2
    /^user2_/ user2

    You can include any other aliases you want in the file and with regex, the possibilities are endless. Be careful not to allow in everything.

    Then don’t forget…

    #  postmap /etc/postfix/virtual (or whatever virtual alias file you end up using)
    #  postfix reload