Link to home
Start Free TrialLog in
Avatar of Ali Kayahan
Ali KayahanFlag for Türkiye

asked on

Postfix SMTP auth issue on outlook

Hi experts ,i have ubuntu 8.4 TLS server with Postfix on it , i can send / receive mails from web mail and can receive from outlook but when i try to send mail from outlook it asks for email / password and cant authenticate on SMTP to send mail.

What should i do ?
SOLUTION
Avatar of lanboyo
lanboyo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ali Kayahan

ASKER

Outlook give the error ;

Task 'xx@xxxx.com - Sending' reported error (0x800CCC92) : 'Your e-mail server rejected your login. Verify your user name and password for this account in Account Settings.'
Also my logs ;

Dec  1 21:59:27 bunra postfix/smtpd[23360]: lost connection after AUTH from unknown[78.183.222.201]
Dec  1 21:59:27 bunra postfix/smtpd[23360]: disconnect from unknown[78.183.222.201]
Dec  1 21:59:31 bunra postfix/smtpd[23360]: connect from unknown[78.183.222.201]
Dec  1 21:59:32 bunra postfix/smtpd[23360]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Dec  1 21:59:32 bunra postfix/smtpd[23360]: warning: unknown[78.183.222.201]: SASL LOGIN authentication failed: generic failure
Dec  1 21:59:32 bunra postfix/smtpd[23360]: lost connection after AUTH from unknown[78.183.222.201]
Dec  1 21:59:32 bunra postfix/smtpd[23360]: disconnect from unknown[78.183.222.201]
Dec  1 21:59:33 bunra postfix/smtpd[23360]: connect from unknown[78.183.222.201]
Dec  1 21:59:34 bunra postfix/smtpd[23360]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Dec  1 21:59:34 bunra postfix/smtpd[23360]: warning: unknown[78.183.222.201]: SASL LOGIN authentication failed: generic failure
Dec  1 21:59:34 bunra postfix/smtpd[23360]: lost connection after AUTH from unknown[78.183.222.201]
Dec  1 21:59:34 bunra postfix/smtpd[23360]: disconnect from unknown[78.183.222.201]
From your LOG SASL is not available on your postfix server

first try this to see if you have the pkg installed

run this  dpkg -l | grep sasl

You should get somethnig similar to this

ii  libsasl2                               2.1.22.dfsg1-18ubuntu2.1     Cyrus SASL - authentication abstraction libr
ii  libsasl2-2                             2.1.22.dfsg1-18ubuntu2.1     Cyrus SASL - authentication abstraction libr
ii  libsasl2-modules                       2.1.22.dfsg1-18ubuntu2.1     Cyrus SASL - pluggable authentication module
ii  sasl2-bin                              2.1.22.dfsg1-18ubuntu2.1     Cyrus SASL - administration programs for SAS

Open in new window


Then if you dont have these you may try to installed then

apt-get install libsasl2 libsasl2-2 libsasl2-modules sasl2-bin


Also if you want to encrpyt your smtp email from outlook to postfix ( which you should if your outtlook client is over the internet )

Look at this complete guide

http://postfix.state-of-mind.de/patrick.koetter/smtpauth/postfix_tls_support.html

Hope this will help you out !

Bye
The output is ;

root@bunra:~# dpkg -l | grep sasl
ii  libsasl2                              2.1.22.dfsg1-18ubuntu2.1    Cyrus SASL - authentication abstraction libr
ii  libsasl2-2                            2.1.22.dfsg1-18ubuntu2.1    Cyrus SASL - authentication abstraction libr
ii  libsasl2-modules                      2.1.22.dfsg1-18ubuntu2.1    Cyrus SASL - pluggable authentication module
ii  sasl2-bin                             2.1.22.dfsg1-18ubuntu2.1    Cyrus SASL - administration programs for SAS

it seems sasl installed how may i configure it ?
Hi I just want to make sure of something.

If you don't have SASL configured in the first place why is you outlook trying to use it.

From outlook go to your account settings.

tools--> account settings --> email tab

From your account settings check if you have the My account requires authentication checked.

Uncheck the box that says my account requires authentication.

Note: Depends on your outlook version the directions I gave my differ but they are similar in general.

Now in case you do want to use Auth then keep following the other experts on how to configure Auth on your server.
Now it says ;

Send test e-mail message:   The server responded: 554 5.7.1 <bilgi@alikayah

Open in new window


from outlook and ;

root@bunra:~# tail -f /var/log/mail.log |grep postfix
Dec  3 20:42:50 bunra postfix/smtpd[5478]: connect from unknown[88.235.72.138]
Dec  3 20:42:51 bunra postfix/smtpd[5478]: NOQUEUE: reject: RCPT from unknown[88.235.72.138]: 554 5.7.1 <bilgi@alikayahan.com>: Relay access denied; from=<bilgi@alikayahan.com> to=<bilgi@alikayahan.com> proto=ESMTP helo=<dragon>
Dec  3 20:42:51 bunra postfix/smtpd[5478]: lost connection after RCPT from unknown[88.235.72.138]
Dec  3 20:42:51 bunra postfix/smtpd[5478]: disconnect from unknown[88.235.72.138]
Dec  3 20:43:56 bunra postfix/smtpd[5478]: connect from unknown[88.235.72.138]
Dec  3 20:43:57 bunra postfix/smtpd[5478]: NOQUEUE: reject: RCPT from unknown[88.235.72.138]: 554 5.7.1 <bilgi@alikayahan.com>: Relay access denied; from=<bilgi@alikayahan.com> to=<bilgi@alikayahan.com> proto=ESMTP helo=<dragon>
Dec  3 20:43:57 bunra postfix/smtpd[5478]: lost connection after RCPT from unknown[88.235.72.138]
Dec  3 20:43:57 bunra postfix/smtpd[5478]: disconnect from unknown[88.235.72.138]

Open in new window


from postfix log

Hi,

Since your outlook client and your postfix server seem to be on different site over the internet I strongly suggest that you use smtp+ TLS + user authentification with SASL


First do you have a user setup on postfix ?

If not here a way to setup all this ....

YMMV

   1. cd /etc/postfix; saslpasswd2 -c -u FQDN-SMTP-SERVER user
   2. Add user to permit sender like this vi /etc/postfix/sender_access
      # those email can send anywhere
      Email@domain	OK
   3. postmap /etc/postfix/sender_access
   4. vi main.cf
       # you need at leat this permit_sasl_authenticated
       smtpd_sender_restrictions = permit_sasl_authenticated, check_sender_access hash:/etc/postfix/sender_access, reject_non_fqdn_sen
der, reject_unknown_sender_domain
      # to enable sasl
      smtpd_sasl_auth_enable = yes
      smtpd_sasl_security_options = 
      smtpd_sasl_local_domain = FQDN-SMTP-SERVER

   5. /etc/init.d/postfix restart

Open in new window


Hope this will help you out !

Bye
bouqui ; thanks for your helps , i am using ISPManager to add users ect. and it works fine for receive mails . On the other hand those libraries libsasl2 libsasl2-2 libsasl2-modules sasl2-bin seems to be installed , my config files are here ;

main.cf

# 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 (Ubuntu)
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

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.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 = bunra.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = $myhostname
mydestination = $myhostname, localhost.$mydomain, localhost
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = /usr/bin/procmail
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mydomain = localdomain
local_recipient_maps = unix:passwd.byname $alias_maps
virtual_alias_domains = /etc/mail/local-host-names
virtual_alias_maps = hash:/etc/mail/virtusertable
smtp_generic_maps = hash:/etc/mail/generic
smtpd_sasl_auth_enable = yes
smtpd_sender_restrictions = permit_sasl_authenticated, check_sender_access hash:/etc/mail/access
smtpd_recipient_restrictions = permit_sasl_authenticated, check_recipient_access hash:/etc/mail/access, permit_mynetworks, reject_unauth_destination, reject_unlisted_recipient, reject_unverified_recipient

Open in new window


The error that you get

"The server responded: 554 5.7.1 <bilgi@alikayah"

Is because outlook did not auth your user

In oulook make sure you have in your smtp setting

1) username corectly type

2) Use TLS or SSL but port still 25

3) Plain Authentification must be Check or Secure Auth must be uncheck depends on outloiok version.

Bye



Thanks