No SASL authentication mechanisms (Docevot/postfix/postfixadmin)

Discussion in 'Installation/Configuration' started by Fujikatoma, Jul 2, 2014.

  1. Fujikatoma

    Fujikatoma New Member

    Hello,
    i try to install a email Server following a Guide.
    Now t got this error if i try to send a Email with Roundcube:

    Code:
    Jul  2 15:27:08 v22013021530910435 postfix/smtpd[19559]: connect from localhost.localdomain[127.0.0.1]
    Jul  2 15:27:28 v22013021530910435 postfix/smtpd[19559]: fatal: no SASL authentication mechanisms
    Jul  2 15:27:28 v22013021530910435 postfix/pipe[19561]: warning: unexpected end-of-input from dovecot socket while reading input attribute name
    Jul  2 15:27:28 v22013021530910435 postfix/pipe[19561]: warning: deliver_request_get: error receiving common attributes
    Jul  2 15:27:29 v22013021530910435 postfix/master[14220]: warning: process /usr/lib/postfix/smtpd pid 19559 exit status 1
    Jul  2 15:27:29 v22013021530910435 postfix/master[14220]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
    
    
    Dovevot.conf
    Code:
    protocols = imap
    log_timestamp = "%Y-%m-%d %H:%M:%S "
    auth_mechanisms = plain login
    mail_location = maildir:/home/vmail/%d/%n/Maildir
    
    ssl_cert_file = /etc/ssl/certs/dovecot.pem
    ssl_key_file = /etc/ssl/private/dovecot.pem
    
    namespace private {
        separator = .
        prefix = INBOX.
        inbox = yes
    }
    
    protocol lda {
        log_path = /home/vmail/dovecot-deliver.log
        auth_socket_path = /var/run/dovecot/auth-master
        postmaster_address = [email protected]
        mail_plugins = sieve
        global_script_path = /home/vmail/globalsieverc
    }
    
    protocol pop3 {
        pop3_uidl_format = %08Xu%08Xv
    }
    
    auth default {
        user = root
    
        passdb sql {
            args = /etc/dovecot/dovecot-mysql.conf
        }
    
        userdb static {
            args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes
        }
    
        socket listen {
            master {
                path = /var/run/dovecot/auth-master
                mode = 0600
                user = vmail
            }
    
            client {
                path = /var/spool/postfix/private/auth
                mode = 0660
                user = postfix
                group = postfix
            }
        }
    	mechanisms = plain login
    }

    imap Server is Offline


    Cheers
    Lars
     
  2. srijan

    srijan New Member HowtoForge Supporter

    please post the master.cf file
     
  3. Fujikatoma

    Fujikatoma New Member

    Code:
    #
    # Postfix master process configuration file.  For details on the format
    # of the file, see the master(5) manual page (command: "man 5 master").
    #
    # Do not forget to execute "postfix reload" after editing this file.
    #
    # ==========================================================================
    # service type  private unpriv  chroot  wakeup  maxproc command + args
    #               (yes)   (yes)   (yes)   (never) (100)
    # ==========================================================================
    smtp      inet  n       -       -       -       -       smtpd
    #submission inet n       -       -       -       -       smtpd
    #  -o smtpd_tls_security_level=encrypt
    #  -o smtpd_sasl_auth_enable=yes
    #  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    smtps     inet  n       -       -       -       -       smtpd
      -o smtpd_tls_wrappermode=yes
      -o smtpd_sasl_auth_enable=yes
      -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    #628       inet  n       -       -       -       -       qmqpd
    pickup    fifo  n       -       -       60      1       pickup
    cleanup   unix  n       -       -       -       0       cleanup
    qmgr      fifo  n       -       n       300     1       qmgr
    #qmgr     fifo  n       -       -       300     1       oqmgr
    tlsmgr    unix  -       -       -       1000?   1       tlsmgr
    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
    proxywrite unix -       -       n       -       1       proxymap
    smtp      unix  -       -       -       -       -       smtp
    # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
    relay     unix  -       -       -       -       -       smtp
    	-o smtp_fallback_relay=
    #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq     unix  n       -       -       -       -       showq
    error     unix  -       -       -       -       -       error
    retry     unix  -       -       -       -       -       error
    discard   unix  -       -       -       -       -       discard
    local     unix  -       n       n       -       -       local
    virtual   unix  -       n       n       -       -       virtual
    lmtp      unix  -       -       -       -       -       lmtp
    anvil     unix  -       -       -       -       1       anvil
    scache    unix  -       -       -       -       1       scache
    #
    # ====================================================================
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    #
    # Many of the following services use the Postfix pipe(8) delivery
    # agent.  See the pipe(8) man page for information about ${recipient}
    # and other message envelope options.
    # ====================================================================
    #
    # maildrop. See the Postfix MAILDROP_README file for details.
    # Also specify in main.cf: maildrop_destination_recipient_limit=1
    #
    maildrop  unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
    #
    # ====================================================================
    #
    # Recent Cyrus versions can use the existing "lmtp" master.cf entry.
    #
    # Specify in cyrus.conf:
    #   lmtp    cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
    #
    # Specify in main.cf one or more of the following:
    #  mailbox_transport = lmtp:inet:localhost
    #  virtual_transport = lmtp:inet:localhost
    #
    # ====================================================================
    #
    # Cyrus 2.1.5 (Amos Gouaux)
    # Also specify in main.cf: cyrus_destination_recipient_limit=1
    #
    #cyrus     unix  -       n       n       -       -       pipe
    #  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
    #
    # ====================================================================
    # Old example of delivery via Cyrus.
    #
    #old-cyrus unix  -       n       n       -       -       pipe
    #  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
    #
    # ====================================================================
    #
    # See the Postfix UUCP_README file for configuration details.
    #
    uucp      unix  -       n       n       -       -       pipe
      flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    #
    # Other external delivery methods.
    #
    ifmail    unix  -       n       n       -       -       pipe
      flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
    bsmtp     unix  -       n       n       -       -       pipe
      flags=Fq. user=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}
    mailman   unix  -       n       n       -       -       pipe
      flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
      ${nexthop} ${user}
    dovecot   unix  -       n       n       -       -       pipe
        flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient}
    
     
  4. srijan

    srijan New Member HowtoForge Supporter

    Hi

    Please uncomment as per the tutorial.

     
  5. srijan

    srijan New Member HowtoForge Supporter

    After that restart the postfix service. :)
     
  6. Fujikatoma

    Fujikatoma New Member

    I've done these steps and still got this error :
    Code:
    Jul  3 05:47:07 v22013021530910435 postfix/smtpd[27795]: connect from localhost.localdomain[127.0.0.1]
    Jul  3 05:47:27 v22013021530910435 postfix/pipe[26232]: warning: unexpected end-of-input from dovecot socket while reading input attribute name
    Jul  3 05:47:27 v22013021530910435 postfix/smtpd[27795]: fatal: no SASL authentication mechanisms
    Jul  3 05:47:27 v22013021530910435 postfix/pipe[26232]: warning: deliver_request_get: error receiving common attributes
    Jul  3 05:47:28 v22013021530910435 postfix/master[23830]: warning: process /usr/lib/postfix/smtpd pid 27795 exit status 1
    Jul  3 05:47:28 v22013021530910435 postfix/master[23830]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
    
    master.cf:
    Code:
    #
    # Postfix master process configuration file.  For details on the format
    # of the file, see the master(5) manual page (command: "man 5 master").
    #
    # Do not forget to execute "postfix reload" after editing this file.
    #
    # ==========================================================================
    # service type  private unpriv  chroot  wakeup  maxproc command + args
    #               (yes)   (yes)   (yes)   (never) (100)
    # ==========================================================================
    smtp      inet  n       -       -       -       -       smtpd
    submission inet n       -       -       -       -       smtpd
      -o smtpd_tls_security_level=encrypt
      -o smtpd_sasl_auth_enable=yes
      -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    smtps     inet  n       -       -       -       -       smtpd
      -o smtpd_tls_wrappermode=yes
      -o smtpd_sasl_auth_enable=yes
      -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    #628       inet  n       -       -       -       -       qmqpd
    pickup    fifo  n       -       -       60      1       pickup
    cleanup   unix  n       -       -       -       0       cleanup
    qmgr      fifo  n       -       n       300     1       qmgr
    #qmgr     fifo  n       -       -       300     1       oqmgr
    tlsmgr    unix  -       -       -       1000?   1       tlsmgr
    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
    proxywrite unix -       -       n       -       1       proxymap
    smtp      unix  -       -       -       -       -       smtp
    # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
    relay     unix  -       -       -       -       -       smtp
    	-o smtp_fallback_relay=
    #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq     unix  n       -       -       -       -       showq
    error     unix  -       -       -       -       -       error
    retry     unix  -       -       -       -       -       error
    discard   unix  -       -       -       -       -       discard
    local     unix  -       n       n       -       -       local
    virtual   unix  -       n       n       -       -       virtual
    lmtp      unix  -       -       -       -       -       lmtp
    anvil     unix  -       -       -       -       1       anvil
    scache    unix  -       -       -       -       1       scache
    #
    # ====================================================================
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    #
    # Many of the following services use the Postfix pipe(8) delivery
    # agent.  See the pipe(8) man page for information about ${recipient}
    # and other message envelope options.
    # ====================================================================
    #
    # maildrop. See the Postfix MAILDROP_README file for details.
    # Also specify in main.cf: maildrop_destination_recipient_limit=1
    #
    maildrop  unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
    #
    # ====================================================================
    #
    # Recent Cyrus versions can use the existing "lmtp" master.cf entry.
    #
    # Specify in cyrus.conf:
    #   lmtp    cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
    #
    # Specify in main.cf one or more of the following:
    #  mailbox_transport = lmtp:inet:localhost
    #  virtual_transport = lmtp:inet:localhost
    #
    # ====================================================================
    #
    # Cyrus 2.1.5 (Amos Gouaux)
    # Also specify in main.cf: cyrus_destination_recipient_limit=1
    #
    #cyrus     unix  -       n       n       -       -       pipe
    #  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
    #
    # ====================================================================
    # Old example of delivery via Cyrus.
    #
    #old-cyrus unix  -       n       n       -       -       pipe
    #  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
    #
    # ====================================================================
    #
    # See the Postfix UUCP_README file for configuration details.
    #
    uucp      unix  -       n       n       -       -       pipe
      flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    #
    # Other external delivery methods.
    #
    ifmail    unix  -       n       n       -       -       pipe
      flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
    bsmtp     unix  -       n       n       -       -       pipe
      flags=Fq. user=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}
    mailman   unix  -       n       n       -       -       pipe
      flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
      ${nexthop} ${user}
    dovecot   unix  -       n       n       -       -       pipe
        flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient}
    
     
  7. srijan

    srijan New Member HowtoForge Supporter

    Hi

    Please add the line as I mentioned in above post, in master.cf
    "-o smtpd_client_restrictions=permit_sasl_authenticated,reject"
    Further restart the postfix service.
     
    Last edited: Jul 3, 2014
  8. srijan

    srijan New Member HowtoForge Supporter

    Please use this

    Hi

    Please add the line as I mentioned in above post, in master.cf
    "-o smtpd_client_restrictions=permit_sasl_authenticated,reject"
    Please add the line
    Further restart the postfix service.
     
    Last edited: Jul 3, 2014
  9. Fujikatoma

    Fujikatoma New Member

    Didn't saw the Space, sorry.
    I've added a space but it didn't helped.
    Still got the same Error as above.
     
  10. srijan

    srijan New Member HowtoForge Supporter

    Hi there is no space required, it was my copy/paste error.

    Please use

    "-o smtpd_client_restrictions=permit_sasl_authenticated, reject"

    use authenticated not authenticate d
     
    Last edited: Jul 3, 2014
  11. Fujikatoma

    Fujikatoma New Member

    Code:
    submission inet n       -       -       -       -       smtpd
      -o syslog_name=postfix/smtps
      -o smtpd_tls_security_level=encrypt
      -o smtpd_sasl_auth_enable=yes
      -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    smtps     inet  n       -       -       -       -       smtpd
      -o syslog_name=postfix/smtps
      -o smtpd_tls_wrappermode=yes
      -o smtpd_sasl_auth_enable=yes
      -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    and
    Code:
    submission inet n       -       -       -       -       smtpd
      -o syslog_name=postfix/smtps
      -o smtpd_tls_security_level=encrypt
      -o smtpd_sasl_auth_enable=yes
      -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    smtps     inet  n       -       -       -       -       smtpd
      -o syslog_name=postfix/smtps
      -o smtpd_tls_wrappermode=yes
      -o smtpd_sasl_auth_enable=yes
      -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    both didn't work for me.
     
    Last edited: Jul 3, 2014
  12. srijan

    srijan New Member HowtoForge Supporter

    Please use the second one only.

    What error you get when you restart postfix?

    Check it in mail.log for debian & mailog in other distributions
     
  13. Fujikatoma

    Fujikatoma New Member

    Code:
    Jul  3 07:24:30 v22013021530910435 postfix/master[13537]: terminating on signal 15
    Jul  3 07:24:30 v22013021530910435 postfix/master[13731]: daemon started -- version 2.7.1, configuration /etc/postfix
    
    I've used the second one.
    There is no error when i restart postfix
     
  14. srijan

    srijan New Member HowtoForge Supporter

    Now start dovecot

    & check the mail.log
     
  15. Fujikatoma

    Fujikatoma New Member

    Already did
    Code:
    Jul  3 07:24:30 v22013021530910435 postfix/master[13537]: terminating on signal 15
    Jul  3 07:24:30 v22013021530910435 postfix/master[13731]: daemon started -- version 2.7.1, configuration /etc/postfix
    Jul  3 07:26:51 v22013021530910435 dovecot: dovecot: Killed with signal 15 (by pid=16614 uid=0 code=kill)
    Jul  3 07:26:51 v22013021530910435 dovecot: Dovecot v1.2.15 starting up (core dumps disabled)
    Jul  3 07:26:51 v22013021530910435 dovecot: auth-worker(default): mysql: Connected to localhost (postfixdb)

    If i try so send me a email , the same error appears

    Code:
    Jul  3 07:28:08 v22013021530910435 postfix/smtpd[18090]: connect from mail-wg0-f52.google.com[74.125.82.52]
    Jul  3 07:28:28 v22013021530910435 postfix/smtpd[18090]: fatal: no SASL authentication mechanisms
    Jul  3 07:28:28 v22013021530910435 postfix/pipe[18095]: warning: unexpected end-of-input from dovecot socket while reading input attribute name
    Jul  3 07:28:28 v22013021530910435 postfix/pipe[18095]: warning: deliver_request_get: error receiving common attributes
    Jul  3 07:28:29 v22013021530910435 postfix/master[13731]: warning: process /usr/lib/postfix/smtpd pid 18090 exit status 1
    Jul  3 07:28:29 v22013021530910435 postfix/master[13731]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
    

    All Configs i've found :

    dovecot.conf
    Code:
    protocols = imap
    log_timestamp = "%Y-%m-%d %H:%M:%S "
    auth_mechanisms = plain login
    mail_location = maildir:/home/vmail/%d/%n/Maildir
    
    ssl_cert_file = /etc/ssl/certs/dovecot.pem
    ssl_key_file = /etc/ssl/private/dovecot.pem
    
    namespace private {
        separator = .
        prefix = INBOX.
        inbox = yes
    }
    
    protocol lda {
        log_path = /home/vmail/dovecot-deliver.log
        auth_socket_path = /var/run/dovecot/auth-master
        postmaster_address = [email protected]
        mail_plugins = sieve
        global_script_path = /home/vmail/globalsieverc
    }
    
    protocol pop3 {
        pop3_uidl_format = %08Xu%08Xv
    }
    
    auth default {
        user = root
    
        passdb sql {
            args = /etc/dovecot/dovecot-mysql.conf
        }
    
        userdb static {
            args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes
        }
    
        socket listen {
            master {
                path = /var/run/dovecot/auth-master
                mode = 0600
                user = vmail
            }
    
            client {
                path = /var/spool/postfix/private/auth
                mode = 0660
                user = postfix
                group = postfix
            }
        }
    	mechanisms = plain login
    }
    
    main.cf
    Code:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version
    
    
    # Debian specific:  Specifying a file name will cause the first
    # line of that file to be used as the name.  The Debian default
    # is /etc/mailname.
    #myorigin = /etc/mailname
    
    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
    
    readme_directory = /usr/share/doc/postfix
    
    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_use_tls = yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    
    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.
    
    myhostname = mail.mydomain.de
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = local.debian, localhost, localhost.localdomain
    relayhost = 
    mynetworks = 127.0.0.0/8
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    html_directory = /usr/share/doc/postfix/html
    message_size_limit = 30720000
    # a bit more spam protection
    disable_vrfy_command = yes
    # Authentification
    smtpd_sasl_type=dovecot
    smtpd_sasl_path=private/dovecot
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_authenticated_header = yes
    broken_sasl_auth_clients = yes
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps
    smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql_sender_login_maps.cf
    smtpd_sender_restrictions = reject_authenticated_sender_login_mismatch
            reject_unknown_sender_domain
            reject_unverified_sender
    smtpd_recipient_restrictions = permit_sasl_authenticated
            permit_mynetworks
            reject_unauth_destination
            reject_unknown_reverse_client_hostname
    # Virtual mailboxes
    local_transport = virtual
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf
    virtual_mailbox_base = /var/vmail/
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql_virtual_domains_maps.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
    virtual_minimum_uid = 104
    virtual_transport = virtual
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    virtual_transport = dovecot
    dovecot_destination_recipient_limit = 1inet_protocols = ipv4
    
    smptd.conf
    Code:
    pwcheck_method: saslauthd
    mech_list: plain login cram-md5 digest-md5
    allow_plaintext: true
    auxprop_plugin: mysql
    sql_hostnames: 127.0.0.1
    sql_user: postfix
    sql_passwd: -----
    sql_database: postfixdb
    sql_select: select password from mailbox where username=’%u’ and active = 1
    
    mster.cf is on the first page.
    i hope it helps to fix it
     
    Last edited: Jul 3, 2014
  16. Fujikatoma

    Fujikatoma New Member

    Still have the same problem :(
     

Share This Page