mail address with leading underscore

Discussion in 'General' started by KoS, Nov 25, 2013.

  1. KoS

    KoS Member HowtoForge Supporter


    i am migrating my old vpopmail installation to ispconfig.
    i have written a basic php script to help me with the migration of domains, users, forwards etc, without big error checks etc, it's just for my internal use and not yet finished. you can check it out at github:

    now i run into a domain that has mail addresses with a leading underscore ("_"). i can not add this users to iscponfig because in
    there is the follwing regex check (line 110):
    i don't like mail address with an underscore at the beginning, but still they seem to be valid (e.g. ). could i safely extend the regex to accept an underscore at the beginning or will that have some other implications or limitations?


  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, you can extend the regex. I will add the underscore in the default regex as well. I was not aare that it is allowed in this place. The regex you refer to is for the login fiels, not the amila address.
    Last edited: Nov 25, 2013
  3. KoS

    KoS Member HowtoForge Supporter

    i have changed the regex to
    and it works like expected. (mails for that address are accepted by postfix etc).

    (and yes, i use the email address as login, always :))

Share This Page