Virtual Users And Domains HowTo saslauthd problem

Discussion in 'HOWTO-Related Questions' started by laser144, Apr 25, 2006.

  1. laser144

    laser144 New Member

    Hi,

    Being relatively new to Linux (Debian Sarge), I followed Falko Timme's 'How To Virtual Users And Domains With Postfix, Courier

    And MySQL (+ SMTP-AUTH, Quota, SpamAssassin, ClamAV)' to the letter.

    Unfortunately my saslauthd won't start. I subsequently tried apt-get update and apt-get upgrade, which resulted in this message:


    invoke-rc.d: initscript saslauthd, action "start" failed

    Any help or hints on how to get this daemon working or how to configure saslauth are most welcome!

    Regards,

    Andy
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you copy and paste the saslauthd script to your server with an SSH client like putty on windows? Its really easy to make a mistake if you type it.
     
  3. Hans

    Hans Moderator Moderator

    Starting up saslauthd

    Hello there, i had the same problem with my Debian system.
    This worked for me, maybe it is also helpful to you:

    Edit /etc/default/saslauthd:

    START=yes
    MECHANISMS=''pam''

    saslauthd is not started after package installation (we’ll do it later)!
    Next file to edit is /etc/postfix/sasl/smtpd.conf:

    pwcheck_method: saslauthd

    Add the next few lines in /etc/postfix/main.cf to enable SASL:

    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

    postfix does a chroot so it can’t communicate with saslauthd. This is the tricky part:

    rm -r /var/run/saslauthd/
    mkdir -p /var/spool/postfix/var/run/saslauthd
    ln -s /var/spool/postfix/var/run/saslauthd /var/run
    chgrp sasl /var/spool/postfix/var/run/saslauthd
    adduser postfix sasl

    Now restart postfix and start saslauthd

    /etc/init.d/postfix restart
    /etc/init.d/saslauthd start


    Hans
     
  4. laser144

    laser144 New Member

    Works like a charm: thanks Hans!

    @Till: I did use Putty as my typing skills are deplorable...

    Grt,

    Andy
     
  5. nenad

    nenad Member

    @Hans
    And what about:

    Did you deleted that line ?
    -----------------------------------------
    What about:

    mech_list: plain login

    Did you deleted that line?
     
    Last edited: May 7, 2006
  6. nenad

    nenad Member

    This works until reboot.

    After reboot /var/run/saslauthd/ is created again

    /etc/init.d/saslauthd start

    failed again
     
  7. falko

    falko Super Moderator Howtoforge Staff

    Not if you modify the saslauthd init script appropriately...
     
  8. chrno

    chrno New Member


    sorry ... where's the isaslauthd's init script located? Will it be in /etc/init.d/ ?

    Thanks!
     
  9. falko

    falko Super Moderator Howtoforge Staff

  10. nenad

    nenad Member

    Great! :) Is that final & all-in-one & all-that-you-need solutions for saslauthd problems described all over this forums?

    I hope so, my firefox is full of bookmarks pointing to various solutions and "solutions" to this annoying problem. :confused:

    Please confirm.
     
  11. falko

    falko Super Moderator Howtoforge Staff

    Try it. It worked for me. :)
     
  12. nenad

    nenad Member

    Question:

    Why I have this in /etc/postfix/local-host-names
    After clean install on Debian, postfix, courier, mysql4.1

    File /etc/postfix/main.cf was diffrent than declared in "perfect setup"
    (http://www.falkotimme.com/howtos/perfect_setup_debian_sarge/) so I edited it accordingly to example in perfect setup.

    Question is: are those names marked in bold sufficient?

    can you please post how should correct /etc/postfix/local-host-names look alike?
     
  13. falko

    falko Super Moderator Howtoforge Staff

    Did you install ISPConfig on this box? If not, then there shouldn't be a /etc/postfix/local-host-names.

    BTW: please use http://www.howtoforge.com/perfect_setup_debian_sarge instead of the tutorial on my personal web site, it's up to date whereas I don't have the time to maintain my personal web site...
     
  14. nenad

    nenad Member

    Yes, I did.

    Anyway, I deleted items marked with bold:

    server200.web-hosting.co.yu.localdomain
    localhost.server200.web-hosting.co.yu.localdomain
    localhost.web-hosting.co.yu.localdomain

    It seems that pop3/smtp works now, but I am wondering why those sufficient "localdomain" were added?
     
  15. falko

    falko Super Moderator Howtoforge Staff

    ISPConfig tries to add any possible combination derived from the hostname command to /etc/postfix/local-host-names to avoid that you get this "mail for ... loops back to myself" error.
     
  16. nenad

    nenad Member

    In this case, when I deleted sufficient postfixes "localdomain" there was no "loops back to myself"

    well... nobody is perfect ;)
     
  17. nenad

    nenad Member

    QUESTION:

    Even I deleted suficient "localdomain" postfixes, and even that survive reboot, after a while few hours, 12 hosurs, I don't know exactly how long, it seems that sufficient "localdomain" sufixes are added again?

    How that happens? How to prevent that?
     
  18. falko

    falko Super Moderator Howtoforge Staff

    I guess you made a change in ISPConfig so that ISPConfig writes the configuration files again (and therefore overwrites your changes). If this localhost doesn't hurt, leave it there.
     
  19. nenad

    nenad Member

    Unfortunatelly, it hurts :(

    Those sufficient "localdomain" postfixes, are one of the causes of postfix " loops back to myself" error :(
     
  20. falko

    falko Super Moderator Howtoforge Staff

    You don't get this error if you list too many FQDNs, only if you list too few.
    What's the exact Postfix error?
     

Share This Page