Thunderbird + Courier + sassl

Discussion in 'Installation/Configuration' started by planet_fox, Sep 27, 2006.

  1. planet_fox

    planet_fox Member HowtoForge Supporter

    I have use The Perfect Setup - Debian Sarge (3.1) use and ISPConfig.

    I can recieve emails from webmail and send .

    Thunderbird recive emails and can't send mail.
    When I do connect to Server Login failed

    Logfile mail.log

    PHP:
    Sep 27 16:26:33 localhost postfix/smtpd[18186]: connect from pd95b4b73.dip0.t-ipconnect.de[217.91.75.112]
    Sep 27 16:26:37 localhost postfix/smtpd[18186]: warningSASL authentication failurePassword verification failed
    Sep 27 16
    :26:37 localhost postfix/smtpd[18186]: warningpd95b4b73.dip0.t-ipconnect.de[217.91.75.112]: SASL PLAIN authentication failed
    Sep 27 16
    :26:38 localhost postfix/smtpd[18186]: warningpd95b4b73.dip0.t-ipconnect.de[217.91.75.112]: SASL LOGIN authentication failed
    Sep 27 16
    :26:41 localhost postfix/smtpd[18186]: warningSASL authentication failurePassword verification failed
    Sep 27 16
    :26:41 localhost postfix/smtpd[18186]: warningpd95b4b73.dip0.t-ipconnect.de[217.91.75.112]: SASL PLAIN authentication failed
    Sep 27 16
    :26:42 localhost postfix/smtpd[18186]: warningpd95b4b73.dip0.t-ipconnect.de[217.91.75.112]: SASL LOGIN authentication failed
    Sep 27 16
    :26:45 localhost postfix/smtpd[18186]: warningSASL authentication failurePassword verification failed
    Sep 27 16
    :26:45 localhost postfix/smtpd[18186]: warningpd95b4b73.dip0.t-ipconnect.de[217.91.75.112]: SASL PLAIN authentication failed
    Sep 27 16
    :26:46 localhost postfix/smtpd[18186]: warningpd95b4b73.dip0.t-ipconnect.de[217.91.75.112]: SASL LOGIN authentication failed
    Sep 27 16
    :26:53 localhost courierpop3loginConnectionip=[::ffff:217.91.75.112]
    Sep 27 16:26:54 localhost courierpop3loginLOGINuser=web34_admip=[::ffff:217.91.75.112]
    Sep 27 16:26:55 localhost courierpop3loginLOGOUTuser=web34_admip=[::ffff:217.91.75.112], top=0retr=0time=1
    The Password is korect and here whats

    PHP:
    m:~# telnet localhost 25
    Trying 127.0.0.1...
    Connected to localhost.localdomain.
    Escape character is '^]'.
    220 myserver.de ESMTP Postfix (Debian/GNU)
    ehlo localhost
    250
    -myserver.de
    250
    -PIPELINING
    250
    -SIZE 10240000
    250
    -VRFY
    250
    -ETRN
    250
    -AUTH LOGIN PLAIN
    250
    -AUTH=LOGIN PLAIN
    250 8BITMIME
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Are you sure you followed the "Perfect Setup" as close as possible? For example, I don't see a STARTTLS line in the telnet output, so you must have done something differently from the tutorial.
    Please compare your /etc/default/saslauthd and /etc/init.d/saslauthd with the ones from the tutorial.
     
  3. planet_fox

    planet_fox Member HowtoForge Supporter

    this is in my /etc/default/saslauthd and /etc/init.d/saslauthd

    PHP:
    # This needs to be uncommented before saslauthd will be run automatically
    START=yes

    PARAMS
    ="-m /var/spool/postfix/var/run/saslauthd -r"

    # You must specify the authentication mechanisms you wish to use.
    # This defaults to "pam" for PAM support, but may also include
    # "shadow" or "sasldb", like this:
    # MECHANISMS="pam shadow"

    MECHANISMS="pam"
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Have you started sasl by running:

    /etc/init.d/saslauthd start

    If this wont help, please post the content of your /etc/postfix/main.cf, comments stripped.
     
  5. falko

    falko Super Moderator Howtoforge Staff

    You have this in /etc/default/saslauthd AND in /etc/init.d/saslauthd? :eek:
     
  6. planet_fox

    planet_fox Member HowtoForge Supporter

    here is main.cf

    PHP:
    # 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 myserver.de
    alias_maps 
    hash:/etc/aliases
    alias_database 
    hash:/etc/aliases
    relayhost 
    =
    mynetworks 11.135.6.333127.0.0.0/8
    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_tls_auth_only 
    no
    smtp_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
    home_mailbox 
    Maildir/
    mailbox_command =

    broken_sasl_auth_clients yes

    virtual_maps 
    hash:/etc/postfix/virtusertable

    mydestination 
    = /etc/postfix/local-host-names
    inet_interfaces 
    all
    reject_code 
    550



    ####################################
    #Postgresy#
    #################################

    smtpd_recipient_restrictions permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination,check_policy_service inet:127.0.0.1:$


    ##########
    #Amavis
    ###########

    content_filter amavis:[127.0.0.1]:10024
    receive_override_options 
    no_address_mappings

    #########################


     
  7. planet_fox

    planet_fox Member HowtoForge Supporter

    I have this in /etc/init.d/saslauthd

    You want this line ?

    PIDFILE="/var/spool/postfix/var/run/${NAME}/saslauthd.pid"

    PHP:
    #!/bin/sh -e

    NAME=saslauthd
    DAEMON
    ="/usr/sbin/${NAME}"
    DESC="SASL Authentication Daemon"
    DEFAULTS=/etc/default/saslauthd
    PWDIR
    =/var/run/saslauthd
    PIDFILE
    ="/var/spool/postfix/var/run/${NAME}/saslauthd.pid"

    createdir() {
    # $1 = user
    # $2 = group
    # $3 = permissions (octal)
    # $4 = path to directory
            
    [ -"$4" ] || mkdir -"$4"
            
    chown --"$1:$2" "$4"
            
    chmod -"$3" "$4"
    }

    test -"${DAEMON}|| exit 0

    # Source defaults file; edit that file to configure this script.
    if [ -"${DEFAULTS}]; then
        
    "${DEFAULTS}"
    fi

    # If we're not to start the daemon, simply exit
    if [ "${START}!= "yes" ]; then
        
    exit 0
    fi

    # If we have no mechanisms defined
    if [ "x${MECHANISMS}"x" ]; then
        
    echo "You need to configure ${DEFAULTS} with mechanisms to be used"
        
    exit 0
    fi

    # Add our mechanimsms with the necessary flag
    PARAMS="${PARAMS} -a ${MECHANISMS}"

    START="--start --quiet --pidfile ${PIDFILE} --startas ${DAEMON} --name ${NAME} -- ${PARAMS}"

    # Consider our options
    case "${1}in
      start
    )
            echo -
    "Starting ${DESC}: "
            
    dir=`dpkg-statoverride --list $PWDIR`
            
    test -"$dir|| createdir $dir
            
    if start-stop-daemon ${START} >/dev/null 2>&then
                    
    echo "${NAME}."
            
    else
                    if 
    start-stop-daemon --test ${START} >/dev/null 2>&1then
                            
    echo "(failed)."
                            
    exit 1
                    
    else
                            echo 
    "${DAEMON} already running."
                            
    exit 0
                    fi
            fi
            
    ;;
      
    stop)
            echo -
    "Stopping ${DESC}: "
            
    if start-stop-daemon --stop --quiet --pidfile "${PIDFILE}\
                    --
    startas ${DAEMON} --retry 10 --name ${NAME} \
                    >/
    dev/null 2>&then
                            
    echo "${NAME}."
            
    else
                    if 
    start-stop-daemon --test ${START} >/dev/null 2>&1then
                            
    echo "(not running)."
                            
    exit 0
                    
    else
                            echo 
    "(failed)."
                            
    exit 1
                    fi
            fi
            
    ;;
      
    restart|force-reload)
            $
    0 stop
            exec 
    $0 start
            
    ;;

                            exit 
    1
                    
    else
                            echo 
    "${DAEMON} already running."
                            
    exit 0
                    fi
            fi
            
    ;;
      
    stop)
            echo -
    "Stopping ${DESC}: "
            
    if start-stop-daemon --stop --quiet --pidfile "${PIDFILE}\
                    --
    startas ${DAEMON} --retry 10 --name ${NAME} \
                    >/
    dev/null 2>&then
                            
    echo "${NAME}."
            
    else
                    if 
    start-stop-daemon --test ${START} >/dev/null 2>&1then
                            
    echo "(not running)."
                            
    exit 0
                    
    else
                            echo 
    "(failed)."
                            
    exit 1
                    fi
            fi
            
    ;;
      
    restart|force-reload)
            $
    0 stop
            exec 
    $0 start
            
    ;;
      *)
            echo 
    "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
            
    exit 1
            
    ;;
    esac

    exit 0

     
  8. planet_fox

    planet_fox Member HowtoForge Supporter

    PHP:
    myserver:/home/foo# ps ax|grep sasl
    22460 ?        Ss     0:00 /usr/sbin/saslauthd -/var/spool/postfix/var/run/saslauthd --a pam
    22461 
    ?        S      0:00 /usr/sbin/saslauthd -/var/spool/postfix/var/run/saslauthd --a pam
    22462 
    ?        S      0:00 /usr/sbin/saslauthd -/var/spool/postfix/var/run/saslauthd --a pam
    22463 
    ?        S      0:00 /usr/sbin/saslauthd -/var/spool/postfix/var/run/saslauthd --a pam
    22464 
    ?        S      0:00 /usr/sbin/saslauthd -/var/spool/postfix/var/run/saslauthd --a pam
    22527 pts
    /0    R+     0:00 grep sasl
     
  9. planet_fox

    planet_fox Member HowtoForge Supporter

    and I have don't understand in falco Howto Postfix what I do when I use ISP config in this file. Is a Problem ?

    /etc/postfix/sasl/smtpd.conf

    PHP:
    pwcheck_methodsaslauthd
    mech_list
    plain login
    allow_plaintext
    true
    auxprop_plugin
    mysql
    sql_hostnames
    127.0.0.1
    #sql_user: mail_admin
    #sql_passwd: mail_admin_password
    #sql_database: mail
    #sql_select: select password from users where email = '%u'
    I don't is wrong when I install with perfect debian how to and install ISP config install and than I have do this howto

    Virtual Users And Domains With Postfix, Courier And MySQL from Falco

    And I must BBig Thanks say to you for help all days !!!
     
  10. planet_fox

    planet_fox Member HowtoForge Supporter

    Oh I have do this

    cat /var/log/auth.log
    is this the problem, and what must I type for the sql data in /etc/postfix/sasl/smtp.conf

    PHP:
    Sep 30 00:11:34 localhost postfix/smtpd[4888]: sql_select option missing
    Sep 30 00
    :11:34 localhost postfix/smtpd[4888]: auxpropfunc error no mechanism available
    Sep 30 00
    :11:34 localhost postfix/smtpd[4888]: _sasl_plugin_load failed on sasl_auxprop_plug_init for pluginsql
    Sep 30 00
    :11:35 localhost saslauthd[4652]: pam_mysqlMySQL err Access denied for user 'mail_admin'@'localhost.localdomain' (using passwordYES)
    Sep 30 00:11:35 localhost saslauthd[4652]: DEBUGauth_pampam_authenticate failedAuthentication failure
    Sep 30 00
    :11:35 localhost saslauthd[4652]: do_auth         auth failure: [user=adm@myserver.de] [service=smtp] [realm=myserver.de] [mech=pam] [reason=PAM auth error]
    Sep 30 00:11:36 localhost saslauthd[4653]: pam_mysqlMySQL err Access denied for user 'mail_admin'@'localhost.localdomain' (using passwordYES)
    Sep 30 00:11:36 localhost saslauthd[4653]: DEBUGauth_pampam_authenticate failedAuthentication failure
    Sep 30 00
    :11:36 localhost saslauthd[4653]: do_auth         auth failure: [user=adm@myserver.de] [service=smtp] [realm=myserver.de] [mech=pam] [reason=PAM auth error]
    Sep 30 00:11:37 localhost saslauthd[4649]: pam_mysqlMySQL err Access denied for user 'mail_admin'@'localhost.localdomain' (using passwordYES)
    Sep 30 00:11:37 localhost saslauthd[4649]: DEBUGauth_pampam_authenticate failedAuthentication failure
    Sep 30 00
    :11:37 localhost saslauthd[4649]: do_auth         auth failure: [user=adm@myserver.de] [service=smtp] [realm=myserver.de] [mech=pam] [reason=PAM auth error]
     
  11. falko

    falko Super Moderator Howtoforge Staff

    ISPConfig is incompatible with the virtual Postfix tutorial because ISPConfig uses system users, and in the tutorial you create virtual users. That's a big difference.
     
  12. planet_fox

    planet_fox Member HowtoForge Supporter

    Oh, I musst reinstall sasl ?
     
  13. falko

    falko Super Moderator Howtoforge Staff

    You must undo the complete virtual Postfix configuration. Maybe it's easier to do a complete reinstall...
     
  14. planet_fox

    planet_fox Member HowtoForge Supporter

    postfix new install omg . ok i do it :) . I hope I make than better.
     
  15. planet_fox

    planet_fox Member HowtoForge Supporter

    ok i have new install postfix only with debian perfect install. when I want sen mails with outlock express Outlocck said

    PHP:
    Die Nachricht konnte nicht gesendet werdenda einer der Empfänger vom Server nicht akzeptiert wurde. Die nicht akzeptierte E-Mail-Adresse ist "[email protected]"Betreff 'sad'Konto'myserver.de'Server'mail.servtime.de'ProtokollSMTPServerantwort'554 <[email protected]>: Relay access denied'Port25Secure (SSL): NeinServerfehler554Fehlernummer0x800CCC79
    Its only with email adress outside from server. All domains on server no problem
    with sending
     
  16. falko

    falko Super Moderator Howtoforge Staff

    Did you enable "Server requires authentication." in Outlook Express?
     
  17. planet_fox

    planet_fox Member HowtoForge Supporter

    When I do this, I musst loginname and passwort type. and do that all the time I can' t connect . ( I have not new install isp config, Only mailserver

    main.cf

    PHP:
    smtpd_banner $myhostname ESMTP $mail_name
    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 server.de
    alias_maps 
    hash:/etc/aliases
    alias_database 
    hash:/etc/aliases
    myorigin 
    = /etc/mailname
    mydestination 
    = /etc/postfix/local-host-names
    relayhost 
    =
    mynetworks 81.19.223.89127.0.0.0/8
    mailbox_command 
    =
    mailbox_size_limit 0
    recipient_delimiter 
    = +
    smtpd_sasl_local_domain $myhostname
    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
    inet_interfaces 
    all
    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
    home_mailbox 
    Maildir/

    alias_maps hash:/etc/aliases
    alias_database 
    hash:/etc/aliases
    virtual_maps 
    hash:/etc/postfix/virtusertable


    content_filter 
    amavis:[127.0.0.1]:10024
    receive_override_options 
    no_address_mappings
    master.cf

    PHP:
    # ==========================================================================
    # service type  private unpriv  chroot  wakeup  maxproc command + args
    #               (yes)   (yes)   (yes)   (never) (100)
    # ==========================================================================
    smtp      inet  n       -       -       -       -       smtpd -o pam
    #submission inet n      -       -       -       -       smtpd
    #       -o smtpd_etrn_restrictions=reject
    #628      inet  n       -       -       -       -       qmqpd
    pickup    fifo  n       -       -       60      1       pickup
    cleanup   unix  n       
    -       -       -       0       cleanup
    qmgr      fifo  n       
    -       -       300     1       qmgr
    #qmgr     fifo  n       -       -       300     1       oqmgr
    rewrite   unix  -       -       -       -       -       trivial-rewrite
    bounce    unix  
    -       -       -       -       0       bounce
    defer     unix  
    -       -       -       -       0       bounce
    trace     unix  
    -       -       -       -       0       bounce
    verify    unix  
    -       -       -       -       1       verify
    flush     unix  n       
    -       -       1000?   0       flush
    proxymap  unix  
    -       -       n       -       -       proxymap
    smtp      unix  
    -       -       -       -       -       smtp
    relay     unix  
    -       -       -       -       -       smtp
    #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq     unix  n       -       -       -       -       showq
    error     unix  
    -       -       -       -       -       error
    local     unix  
    -       n       n       -       -       local
    virtual   unix  
    -       n       n       -       -       virtual
    lmtp      unix  
    -       -       n       -       -       lmtp
    anvil     unix  
    -       -       n       -       1       anvil
    #
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    #
    # maildrop. See the Postfix MAILDROP_README file for details.
    #
    maildrop  unix  -       n       n       -       -       pipe
      flags
    =DRhu user=vmail argv=/usr/local/bin/maildrop -${recipient}
    uucp      unix  -       n       n       -       -       pipe
      flags
    =Fqhu user=uucp argv=uux ----a$sender $nexthop!rmail ($recipient)
    ifmail    unix  -       n       n       -       -       pipe
      flags
    =F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
    bsmtp     unix  -       n       n       -       -       pipe
      flags
    =Fquser=bsmtp argv=/usr/lib/bsmtp/bsmtp --t$nexthop -f$sender $recipient
     scalemail
    -backend unix -       n       n       -       2       pipe
      flags
    =R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}

    # only used by postfix-tls
    #tlsmgr   fifo  -       -       n       300     1       tlsmgr
    #smtps    inet  n       -       n       -       -       smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
    #587      inet  n       -       n       -       -       smtpd -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes


    amavis unix - - - - 2 smtp
        
    -o smtp_data_done_timeout=1200
        
    -o smtp_send_xforward_command=yes

     127.0.0.1
    :10025 inet n - - - - smtpd
        
    -o content_filter=
        -
    o local_recipient_maps=
        -
    o relay_recipient_maps=
        -
    o smtpd_restriction_classes=
        -
    o smtpd_client_restrictions=
        -
    o smtpd_helo_restrictions=
        -
    o smtpd_sender_restrictions=
        -
    o mynetworks=127.0.0.0/8
        
    -o strict_rfc821_envelopes=yes
        
    -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
    smtp.conf

    PHP:
    mech_listplain login
    pwcheck_method
    saslauthd
    /etc/ini.d/saslauthd
    PHP:
    #!/bin/sh -e

    NAME=saslauthd
    DAEMON
    ="/usr/sbin/${NAME}"
    DESC="SASL Authentication Daemon"
    DEFAULTS=/etc/default/saslauthd
    PWDIR
    =/var/run/saslauthd
    PIDFILE
    ="/var/spool/postfix/var/run/${NAME}/saslauthd.pid"

    createdir() {
    # $1 = user
    # $2 = group
    # $3 = permissions (octal)
    # $4 = path to directory
            
    [ -"$4" ] || mkdir -"$4"
            
    chown --"$1:$2" "$4"
            
    chmod -"$3" "$4"
    }

    test -"${DAEMON}|| exit 0

    # Source defaults file; edit that file to configure this script.
    if [ -"${DEFAULTS}]; then
        
    "${DEFAULTS}"
    fi

    # If we're not to start the daemon, simply exit
    if [ "${START}!= "yes" ]; then
        
    exit 0
    fi

    # If we have no mechanisms defined
    if [ "x${MECHANISMS}"x" ]; then
        
    echo "You need to configure ${DEFAULTS} with mechanisms to be used"
        
    exit 0
    fi

    # Add our mechanimsms with the necessary flag
    PARAMS="${PARAMS} -a ${MECHANISMS}"

    START="--start --quiet --pidfile ${PIDFILE} --startas ${DAEMON} --name ${NAME} -                                                          - ${PARAMS}"

    # Consider our options
    case "${1}in
      start
    )
            echo -
    "Starting ${DESC}: "
            
    dir=`dpkg-statoverride --list $PWDIR`
            
    test -"$dir|| createdir $dir
            
    if start-stop-daemon ${START} >/dev/null 2>&then
                    
    echo "${NAME}."
            
    else
                    if 
    start-stop-daemon --test ${START} >/dev/null 2>&1then
                            
    echo "(failed)."
                            
    exit 1
                    
    else
                            echo 
    "${DAEMON} already running."
                            
    exit 0
                    fi
            fi
            
    ;;
      
    stop)
            echo -
    "Stopping ${DESC}: "
            
    if start-stop-daemon --stop --quiet --pidfile "${PIDFILE}\
                    --
    startas ${DAEMON} --retry 10 --name ${NAME} \
                    >/
    dev/null 2>&then
                            
    echo "${NAME}."
            
    else
                    if 
    start-stop-daemon --test ${START} >/dev/null 2>&1then
                            
    echo "(not running)."
                            
    exit 0
                    
    else
                            echo 
    "(failed)."
                            
    exit 1
                    fi
            fi
            
    ;;
      
    restart|force-reload)
            $
    0 stop
            exec 
    $0 start
            
    ;;
      *)
            echo 
    "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
            
    exit 1
            
    ;;
    esac

    exit 0
     
    Last edited: Oct 3, 2006
  18. falko

    falko Super Moderator Howtoforge Staff

  19. planet_fox

    planet_fox Member HowtoForge Supporter

    I have this do marked requires authentication and outloock take open a window with the questions Give me Loginname and Password and I give the right things.
    and outloock says 2secends the same question :( .
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    Which error do you get in the mail log? Please check that your SASL setup is exactly like the setup described in the perfect setup howto.
     

Share This Page