fatal: no SASL authentication mechanisms please help!

Discussion in 'Server Operation' started by abcinc, Jan 1, 2014.

  1. abcinc

    abcinc New Member

    Trying to setup sasl, postfix 2.7, dovecot 1.29. The following is in mail.log
    fatal: no SASL authentication mechanisms
    warning: deliver_request_get: error receiving common attributes
    warning: unexpected end-of-input from dovecot socket while reading input attribute name
    warning: process /usr/lib/postfix/smtpd pid 20380 exit status 1

    main.cf
    myorigin = /etc/mailname
    queue_directory = /var/spool/postfix/

    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 = no
    relay_recipient_maps = mysql:/etc/postfix/relay_recipient_maps.mysql.conf
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    # TLS parameters
    smtpd_tls_cert_file = /etc/ssl/certs/dovecot.pem
    smtpd_tls_key_file = /etc/ssl/private/dovecot.pem
    smtpd_use_tls = yes
    smtpd_delay_reject = yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    smtpd_tls_auth_only = no
    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.
    #Enabling SMTP for authenticated users, and handing off authentication to Dovecot
    smtpd_relay_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
    smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
    # smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd.db
    # debug_peer_list = 50.43.121.242
    # debug_peer_level = 3
    smtpd_sasl_type = dovecot
    smtpd_sasl_path = private/dovecot
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_local_domain = $myhostname
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtp_tls_security_level=may
    smtpd_tls_security_level=may
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom
    smtpd_sasl_authenticated_header = yes
    smtpd_sender_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unknown_sender_domain
    smtpd_tls_mandatory_protocols = SSLv3, TLSv1
    smtpd_tls_mandatory_ciphers = medium
    myhostname = mail5.hosting.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    mail5.hosting.com
    mydestination = localhost, web4.hosting.com, mailin.hosting.com, localhost.localdomain
    virtual_transport = dovecot
    virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
    virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
    virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
    # virtual_alias_domains = mysql:/etc/postfix/mysql-virtual-alias-domains.cf
    dovecot_destination_recipient_limit = 1
    relayhost =
    mynetworks = 127.0.0.0/8 50.43.121.0/24
    # mynetworks = 127.0.0.0/8
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    home_mailbox = /var/mail
    mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/conf.d/01-dovecot-postfix.conf -n -m "${EXTENSION}"
    # virtual_mailbox_domains = /etc/postfix/vhosts
    virtual_mailbox_base = /var/mail
    # virtual_mailbox_maps = hash:/etc/postfix/vmaps

    master.cf
    # ==========================================================================
    smtp inet n - n - - smtpd
    submission inet n - n - - smtpd
    # smtpd_tls_security_level=encrypt
    # -o smtpd_sasl_auth_enable=yes
    # -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    # milter_macro_daemon_name=ORIGINATING
    smtps inet n - 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 - n 60 1 pickup
    cleanup unix n - n - 0 cleanup
    qmgr fifo n - n 300 1 qmgr
    #qmgr fifo n - - 300 1 oqmgr
    tlsmgr unix - - n 1000 1 tlsmgr
    rewrite unix - - n - - trivial-rewrite
    bounce unix - - n - 0 bounce
    defer unix - - n - 0 bounce
    trace unix - - n - 0 bounce
    verify unix - - n - 1 verify
    flush unix n - n 1000 0 flush
    proxymap unix - - n - - proxymap
    proxywrite unix - - n - 1 proxymap
    smtp unix - - n - - smtp
    # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
    relay unix - - n - - smtp
    smtp_fallback_relay=
    # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq unix n - 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
    dovecot unix - n n - - pipe
    flags=DRhu user=pass:pass argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient}
    # ====================================================================
    # 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=pass 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.conf
    base_dir = /var/run/dovecot/

    protocols = imap pop3 imaps
    disable_plaintext_auth = no
    log_timestamp = "%Y-%m-%d %H:%M:%S "
    log_path = /var/log/dovecot.log

    ssl_cert_file = /etc/ssl/certs/dovecot.pem
    ssl_key_file = /etc/ssl/private/dovecot.pem

    mail_privileged_group = mail1

    login_greeting = my-domain.tld IMAP server ready...

    ## IMAP specific settings
    protocol imap {
    mail_executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/imap
    mail_plugins = quota imap_quota
    }

    ## POP3 specific settings
    protocol pop3 {
    mail_executable = /usr/lib/dovecot/rawlog /usr/lib/dovecot/pop3
    pop3_uidl_format = %08Xu%08Xv
    mail_plugins = quota
    }

    ## LDA specific settings
    protocol lda {
    # Address to use when sending rejection mails.
    # postmaster_address = <a href="mailto:p[email protected]">[email protected]</a>

    # Support for dynamically loadable plugins. mail_plugins is a space separated
    # list of plugins to load.
    mail_plugin_dir = /usr/lib/dovecot/modules/lda

    # UNIX socket path to master authentication server to find users.
    auth_socket_path = /var/run/dovecot/auth-master

    # Enabling Sieve plugin for server-side mail filtering
    mail_plugins = sieve quota
    }

    ## Plugin settings
    plugin {
    quota = maildir
    sieve=/var/mail/%d/%n/.sieve
    # autocreate = Trash
    # autocreate2 = Sent
    # autocreate3 = Spam
    # autosubscribe = Trash
    # autosubscribe2 = Sent
    # autosubscribe3 = Spam
    }

    ## Authentication processes

    # Executable location
    # SQL database <doc/wiki/AuthDatabase.SQL.txt>
    auth_executable = /usr/lib/dovecot/dovecot-auth
    auth default {
    mechanisms = plain login
    passdb sql {
    args = /etc/dovecot/dovecot-sql.conf
    }
    userdb sql {
    args = /etc/dovecot/dovecot-sql.conf
    }

    socket listen {
    master {
    path = /var/run/dovecot/auth-master
    mode = 0770
    user = vmail
    group = vmail
    }
    client {
    path = /var/spool/postfix/private/dovecot
    mode = 0666
    user = postfix
    group = postfix
    }
    }
    }
    mail_location = maildir:/var/mail/%d/%n
    ssl = yes

    Please help
    Thanks very much and Happy New Year to everyone :)
     

Share This Page