/var/run/saslauthd /var/spool/postfix/var/run/saslauthd# ln -s /var/spool/postfix/var/run/saslauthd /var/run/saslauthdAdicionar o usuario postfix no grupo sasl:# adduser postfix saslAte aqui, com pequenas alteracoes, voce esta seguindo o seguinte tutorial:http://www.nervous.it/txt/Postfix-SMTP-AUTH-4-DUMMIES.htmlAdicione as seguintes linhas em /etc/postfix/main.cf :smtpd_sasl_auth_enable = yessmtpd_sasl_local_domain = broken_sasl_auth_clients = yese nao se esqueca de adicionar o parametro permit_sasl_authenticated em smtpd_recipient_restrictions, ficando parecido com isso:smtpd_recipient_restrictions = check_client_access hash:/etc/postfix/whitelist_ip, check_sender_access hash:/etc/postfix/whitelist_dom, permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_unknown_client, reject_non_fqdn_hostname, reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, reject_unauth_destinationEdite o arquivo /etc/initd.d/postfix e localize a seguinte linha (Debian Etch):FILES="etc/localtime etc/services etc/resolv.conf etc/hosts \ etc/nsswitch.conf etc/nss_mdns.config"e deixe-a da seguinte forma:FILES="etc/localtime etc/services etc/resolv.conf etc/hosts \ etc/nsswitch.conf etc/nss_mdns.configetc/postfix/sasl/smtpd.conf"Reinicie o postfix e o saslauthd# /etc/init.d/postfix restart # /etc/init.d/saslauthd start6 - TestandoAdicione um dominio e usuario no KP. Rode o seguinte comando:testsaslauthd -s smtp -u usuario em dominioquevccriou -p 'senha'O resultado tem que ser esse:0: OK "Success."A autenticacao esta funcionando!Caso queira tirar a limpo a historia do campo MD5 do MySQL, edite o arquivo /etc/pam.d/smtp e mude as opcoes de crypt para:crypt=1, ou crypt=2, ou ainda para tirar a criptografia, crypt=0Rode novamente o comando:testsaslauthd -s smtp -u usuario em dominioquevccriou -p 'senha'Veja o resultado:0: NO "authentication failed"7 - Juntando tudoSegue o meu main.cf com as alteracoes propostas:smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)biff = noappend_dot_mydomain = nosmtpd_tls_key_file = /etc/postfix/tls/smtpd.keysmtpd_tls_cert_file = /etc/postfix/tls/smtpd.crtsmtpd_tls_CAfile = /etc/postfix/tls/cacert.pemsmtpd_tls_loglevel = 3smtpd_tls_received_header = yessmtpd_tls_session_cache_timeout = 3600stls_random_source = dev:/dev/urandomsmtpd_sasl_auth_enable = yessmtpd_sasl_local_domain =broken_sasl_auth_clients = yesmyhostname = mx03.hostname.com.bralias_maps = hash:/etc/aliasesalias_database = hash:/etc/aliasesmyorigin = /etc/mailnamemydestination = mx03.hostname.com.br, mx03.hostname.dominio.com.br,localhost.hostname.br, localhostrelayhost =mynetworks = 127.0.0.0/8mailbox_size_limit = 0recipient_delimiter = +inet_interfaces = allhome_mailbox = Maildir/mailbox_transport = jeguepanel:virtual_transport = jeguepanel:local_recipient_maps=mysql:accounts,mysql:vamldapmailbox_command_maps = mysql:accountsalias_maps = mysql:vamldapvirtual_alias_maps = mysql:vamldapvirtual_mailbox_base = /virtual_mailbox_maps = mysql:accountsvirtual_mailbox_limit = 0virtual_uid_maps = static:1001virtual_gid_maps = static:1001canonical_maps = mysql:canodomssender_bcc_maps = mysql:senderbccrecipient_bcc_maps = mysql:recipientbccalways_bcc=accounts_server_host = 127.0.0.1accounts_user = usuarioaccounts_password = senhaaccounts_dbname = jpaccounts_query = select account_homedir from jp_accounts where account_wmail= '%s'vamldap_hosts = 127.0.0.1vamldap_user = usuariovamldap_password = senhavamldap_dbname = jpvamldap_query = select alias_users from jp_aliases where alias_name = '%s'canodoms_hosts = 127.0.0.1canodoms_user = usuariocanodoms_password = senhacanodoms_dbname = jpcanodoms_query = select domain_canonical from jp_domains where domain_name ='%d'senderbcc_hosts = 127.0.0.1senderbcc_user = usuariosenderbcc_password = senhasenderbcc_dbname = jpsenderbcc_query = select account_bcc_sender from jp_accounts whereaccount_wmail = '%s'recipientbcc_hosts = 127.0.0.1recipientbcc_user = usuariorecipientbcc_password = senharecipientbcc_dbname = jprecipientbcc_query = select account_bcc_recipient from jp_accounts whereaccount_wmail = '%s'header_checks = regexp:/etc/postfix/header_checkssmtpd_recipient_restrictions = check_client_access hash:/etc/postfix/whitelist_ip, check_sender_access hash:/etc/postfix/whitelist_dom, permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_unknown_client, reject_non_fqdn_hostname, reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, reject_unauth_destination