Problem with saslauthd

Discussion in 'HOWTO-Related Questions' started by dex, Mar 18, 2006.

  1. dex

    dex New Member

    Hi,
    when i write this code :
    Code:
    PARAMS="-m /var/spool/postfix/var/run/saslauthd -r"
    in the /etc/default/saslauthd to activate saslauthd

    and I do : /etc/init.d/saslauthd force-reload

    i am an error : Salsauthd authentication : failed

    sorry but I'm not speaking english very well
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Does this happen when you send an email? What's the exact error message from the mail log?

    What's the output of
    Code:
    ps aux|grep saslauthd
    ?
     
  3. dex

    dex New Member

    ps aux|grep saslauthd :
    Code:
    root      3573  0.0  0.6  6664 1648 ?        Ss   Mar18   0:00 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -r -a pam
    root      3574  0.0  0.6  6664 1648 ?        S    Mar18   0:00 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -r -a pam
    root      3575  0.0  0.6  6664 1648 ?        S    Mar18   0:00 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -r -a pam
    root      3576  0.0  0.6  6664 1648 ?        S    Mar18   0:00 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -r -a pam
    root      3577  0.0  0.6  6664 1648 ?        S    Mar18   0:00 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -r -a pam
    root     11014  0.0  0.3  2072  772 pts/2    R+   09:29   0:00 grep saslauthd
    
    /var/log/auth.log :
    Code:
    Mar 20 09:29:21 mail saslauthd[6311]: server_exit     : master exited: 6311
    Mar 20 09:29:23 mail saslauthd[11004]: detach_tty      : could not lock pid file /var/spool/postfix/var/run/saslauthd/saslauthd.pid: Resource temporarily unavailable
    Mar 20 09:29:23 mail saslauthd[11003]: detach_tty      : Cannot start saslauthd
    Mar 20 09:29:23 mail saslauthd[11003]: detach_tty      : Another instance of saslauthd is currently running
    
    /var/log/mail.log :
    Code:
    Mar 20 09:41:10 mail postfix/smtpd[11280]: connect from mail.domain.tld[82.210.170.123]
    Mar 20 09:41:10 mail postfix/smtpd[11280]: 4BD291112A2: client=mail.domain.tld[82.210.170.123], sasl_method=LOGIN, sasl_username=admin
    Mar 20 09:41:10 mail postfix/cleanup[11283]: 4BD291112A2: message-id=<001101c64bfa$18b414c0$a000a8c0@etch>
    Mar 20 09:41:10 mail postfix/smtpd[11280]: disconnect from mail.domain.tld[82.210.170.123]
    Mar 20 09:41:10 mail postfix/qmgr[6303]: 4BD291112A2: from=<[email protected]>, size=1391, nrcpt=1 (queue active)
    Mar 20 09:41:40 mail postfix/smtp[11286]: connect to mx1.celeonet.fr[193.25.197.64]: Connection timed out (port 25)
    Mar 20 09:42:10 mail postfix/smtp[11286]: connect to mx2.celeonet.fr[193.25.197.24]: Connection timed out (port 25)
    Mar 20 09:42:10 mail postfix/smtp[11286]: 4BD291112A2: to=<[email protected]>, relay=none, delay=60, status=deferred (connect to mx2.celeonet.fr[193.25.197.24]: Connection timed out)
    
    And I send the mail but the mail can't arrive to the destination
    But I receive all mails very good

    /etc/postfix/main.cf :
    Code:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    biff = no
    
    # appending .domain is the MUA's job.
    append_dot_mydomain = no
    
    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h
    
    myhostname = mail.domain.tld
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    #mydestination = mail.domain.tld, localhost.domain.tld, localhost
    relayhost =
    mynetworks = 127.0.0.0/8
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    smtpd_sasl_local_domain =
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination,permit
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtpd_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom
    
     
    Last edited: Mar 20, 2006
  4. falko

    falko Super Moderator ISPConfig Developer

    Kill the existing saslauthd processes:

    Code:
    kill -9 3573
    kill -9 3574
    kill -9 3575
    kill -9 3576
    kill -9 3577
    and start saslauthd:
    Code:
    /etc/init.d/saslauthd start
     
  5. dex

    dex New Member

    ok, thank you very much it's easy
     
  6. nenad

    nenad ISPConfig Developer ISPConfig Developer

    This works only until reboot.

    Does not solve problem with acessing pop3 with email client, neither with webmail.

    After reboot,

    /etc/init.d/saslauthd stop or start or restart do not work again.
     
  7. admire

    admire New Member

    This is easy to fix :)

    edit the file: /etc/init.d/saslauthd

    find this line:
    Code:
    PIDFILE=/var/run/$NAME/saslauthd.pid
    change it to:
    Code:
    PIDFILE=/var/spool/postfix/var/run/$NAME/saslauthd.pid
    This is because the pidfile is created inside the jail, but the init script looks for an not chrooted sasl pidfile.
     
  8. falcon5

    falcon5 New Member

    problem solved???

    Hi,

    Does this solve the problem?
    pwcheck_method: saslauthd auxprop
    mech_list: plain login
    allow_plaintext: true
    auxprop_plugin: mysql
    sql_hostnames: localhost
    sql_user: ***
    sql_passwd: ***
    sql_database: ***
    sql_select: select password from users where email = '%u'
    sql_verbose: yes

    With this I don't have "postfix/smtpd: _sasl_plugin_load failed on sasl_auxprop_plug_init for plugin: sql" BUT I do receive "postfix/smtpd: sql auxprop plugin using mysql engine"

    How can I get rid of this message too???
     
  9. falko

    falko Super Moderator ISPConfig Developer

    I don't think this message:
    Code:
    postfix/smtpd: sql auxprop plugin using mysql engine
    is an error. :)
     
  10. falcon5

    falcon5 New Member

    Thank You Falko for confirming it. I just want to know if there's some way I do not receive this message again without disabling it in logcheck. I hope my previous message will solve some problems.

    BTW: I saw a new postfix comming out on backports. Is there some howto which is as extended as yours for this version?

    Thanks in advance
     
  11. falko

    falko Super Moderator ISPConfig Developer

    No, but you can use mine, but keep this in mind:
    The format of the cf files has changed from Postfix 2.1 to 2.2. For example, on Postfix prior to 2.2, /etc/postfix/mysql-virtual_domains.cf looks like this:
    Code:
    user = mail_admin
    password = mail_admin_password
    dbname = mail
    table = domains
    select_field = 'virtual'
    where_field = domain
    hosts = 127.0.0.1
    Starting with 2.2, the file looks like this:

    Code:
    user = mail_admin
    password = mail_admin_password
    dbname = mail
    query = SELECT virtual FROM domains WHERE domain='%s'
    hosts = 127.0.0.1
    It should be easy to adopt this for the other cf files.
     
  12. my5660

    my5660 New Member


    Maybe this can help (using shadow)

    1. if you use chrooted then edit /usr/lib/sasl2/smtpd.conf
    add -> saslauthd_path: /var/run/sasl2/mux
    2. stop saslauthd then start saslauthd using this command:
    saslauthd -m var/spool/postfix/var/run/sasl2-a shadow
     

Share This Page