Postfix user@domain ?

Discussion in 'Tips/Tricks/Mods' started by cryptic, Apr 24, 2007.

  1. radim_h

    radim_h Member

    as i wrote, that is a solution, but now, smtp authentification is not working for you, i'm i right?
     
  2. pcxtra

    pcxtra New Member

    I didn't check the smtp yet. Need to do so soon as I will need it too.

    All I solved is the 32 character limitation which really frustrated me and a way to prevent that the user needs to keep username and email identical.

    This will unfortunately need a script change. It will show ONLY the e-mail input box for new users. So not the username as this is taken over in the script by the email. Then with user edit it will not allow to change either email or user. I don't think someone would require to change the email?!

    Code:
    diff isp_username.plugin.php_ORIGNAL isp_username.plugin.php
    88a89,90
    >               // pcxtra: added one line to overrule the input box as it's not needed and taken over from email box
    >               $out_user = "";
    96a99,103
    >
    >       // pcxtra: added the condition that the user_email is not empty so in case it exists then it shouldn't be changed
    >       if( $user["user_email"] != '' )
    >         $out_email = $user["user_email"];
    >       else
    122c129
    <         $username = strtolower($plugin_vars["user"]);
    ---
    >         $username = strtolower($plugin_vars["email"]); // pcxtra: changed user into email
    166a174
    > /* pcxtra: no need to update email as it is not longer allowed to change
    177c185
    <
    ---
    > */
    196c204
    < ?>
    \ No newline at end of file
    ---
    > ?>
    It's working properly for me.
     
  3. radim_h

    radim_h Member

    32 chars limit isn't there for fun, it is linux username lenght limit... if your user names are longer ftp and some system stuff will probably not work as ftp users are linux system users

    what does your script do ?
    i'd like to have one,
    which allows you input username and script will create email according it,
    or vice versa you'll input email and it will create username acording it...
    as [email protected] vs domain.tld_someone

    but then we still have not fixed smtp sasl authentification
     
    Last edited: Nov 10, 2008
  4. pcxtra

    pcxtra New Member

    The script does do:
    'you'll input email and it will create username acording it...'

    Just locate isp_username.plugin.php, mine is at:
    /home/admispconfig/ispconfig/lib/plugins/isp_username.plugin.php

    See diff I posted for the changes between the original script and the changes I've performed. I prefer not to submit the full script, otherwise I will need to update for future ispconfig updates.

    So far dovecot + proftp are working properly with usernames over 32 characters. And linux itself uses only the ID's. It would be a stupid limitation, but I guess you could be right... anyway till I didn't found an easy solution.

    No smtp solution from my side yet.
     
  5. radim_h

    radim_h Member

    sounds interesting i'm going to try it tommorrow

    and

    i'm sorry that i've been confusing you
    with /etc/dovecot.conf like
    auth_username_format="%Ld_%Ln"
    and [DOMAIN] prefix smtp sasl will work perfectly, as i'm using this solution for a year :)

    i was tryin find solution, when using [WEB] prefix for username
     
  6. radim_h

    radim_h Member

    isp_username.plugin.php

    Can you put content of whole file
    isp_username.plugin.php in here?

    Radim
     
  7. radim_h

    radim_h Member

    i've got the patch propery now :)

    but this is still not working without limit..
    email part before @ is now extended to 31 characters (without domain which is not included) but username is still cut to 31 characters ?

    as from virtusertable:

    [email protected] domain.eu_0123456789012345678901
    [email protected] domain.eu_0123456789012345678901
    [email protected] domain.eu_0123456789012345678901
    [email protected] domain.eu_0123456789012345678901
     

Share This Page