postfix + saslauth + crypt

Discussion in 'Installation/Configuration' started by Daemon Cesar, Apr 2, 2016.

  1. Daemon Cesar

    Daemon Cesar New Member

    I can not send email encryption. I using postfix + courier-imap + saslauth.

    My smtpd.conf

    Code:
    pwcheck_method: saslauthd
    mech_list: plain login cram-md5 digest-md5
    allow_plaintext: true
    auxprop_plugin: mysql
    sql_hostnames: localhost
    sql_user: postfix
    sql_passwd: postsol
    sql_database: postfix
    sql_select: select password from mailbox where username='%u@%r'
    
    main.cf
    Code:
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    smtpd_sasl_local_domain =
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    
    smtpd_sasl_path = smtpd
    
    /etc/pam.d/smtp

    Code:
    auth    required   pam_mysql.so user=postfix passwd=postsol host=127.0.0.1 db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=2
    account sufficient pam_mysql.so user=postfix passwd=postsol host=127.0.0.1 db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=2
    
    the error:

    Apr 1 19:13:38 protus postfix/smtpd[8192]: warning: unknown[192.168.0.101]: SASL CRAM-MD5 authentication failed: authentication failure


    If you use the password normally ( No encryption) works!
     
  2. huojianxixi

    huojianxixi New Member

    Рrоblеm mау bе іn Yоur Суrus sеttіngs оr іn РАМ sеttіngs ( рrоbаblу Суrus ЅАЅL usеs РАМ tо соmmunісаtе wіth МуЅQL іn Yоur sеtuр ).

    І аdvіsе Yоu twо thіngs:

    1. Gо саrеfullу thrоugh аdеquаtе sесtіоn іn Роstfіх dосumеntаtіоn:
      PHP:
      http://www.postfix.org/SASL_README.html
    2. Сhесk Yоur /var/log/auth.log
     
  3. Daemon Cesar

    Daemon Cesar New Member

    Already checked everything changed , I checked the permissions and can not find the error.

    Code:
    Apr  2 10:42:01 protus  saslauthd[17305]: do_auth         : auth failure: [[email protected]] [service=smtp] [realm=] [mech=pam] [reason=PAM auth error]
    
     
  4. Daemon Cesar

    Daemon Cesar New Member

    i change /etc/pam.d/smtp (cryp=3)
    Code:
    
    
    auth    required   pam_mysql.so user=postfix passwd=postsol host=127.0.0.1 db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=3account sufficient pam_mysql.so user=postfix passwd=postsol host=127.0.0.1 db=postfix table=mailbox usercolumn=username passwdcolumn=password crypt=3
    The value of "crypt" is 3 ?

    error:pam_mysql - non-crypt()ish MD5 hash is not supported in this build.
     
  5. Daemon Cesar

    Daemon Cesar New Member

    Code:
    [email protected]:/etc/postfix/sasl# testsaslauthd -s smtp -u [email protected] -p  passw
    0: OK "Success."
    
    

    But thunderbird does not work ;
     

Share This Page