Hi there!

I'm having some trouble configuring one postfix as a client to send mails through my mail server. So I have 2 servers, one of them running as the postfix server with virtual users using MySQL (everything ok there), let's call it mail.domain.es and another one, let's call it nagios.domain.es.

The goal is to achieve sending mails from nagios.domain.es through 'domain.es' using the 'mail' command, but I get the "Incorrect authentication data" message in the logs whenever I try.

The relevant part of postconf -n on the server side - mail.domain.es - is:

relayhost = [domain.es]
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_error_sleep_time = 2s
smtpd_hard_error_limit = 20
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks
smtpd_milters = inet:127.0.0.1:12347
smtpd_recipient_restrictions = reject_sender_login_mismatch, permit_mynetworks, permit_sasl_authenticated, reject_rbl_client bl.spamcop.net, reject_rbl_client relays.ordb.org, reject_rbl_client sbl.spamhaus.org, check_policy_service unix:private/policy-spf, reject_unauth_destination, reject_unknown_helo_hostname
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_security_options = noanonymous
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql-virtual_identities.cf
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_soft_error_limit = 10
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes

The whole postconf -n command on the client, nagios.domain.es:

config_directory = /etc/postfix
relayhost = [domain.es]
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl/passwd
smtp_sasl_security_options = noanonymous
smtp_use_tls = yes

The content of the /etc/postfix/sasl/passwd file is:

[domain.es] nag...@domain.es:mypassword

The account nag...@domain.es exists on the server side as a virtual user and I'm 100% sure the password is ok. Of course, I did postmap on that file.

Then I try send an e-mail:

root@nagios:# mail -s "Prb" nico...@domain.es
Cc:
aaaa
root@nagios:#

And it never arrives... :-(

The log on the client side is:

Jun 20 14:51:20 nagios postfix/qmgr[2151]: 260C863CE8: from=<root@nagios.localdomain>, size=343, nrcpt=1 (queue active) Jun 20 14:51:22 nagios postfix/smtp[2153]: 260C863CE8: to=<nico...@domain.es>, relay=domain.es[X.X.X.X]:25, delay=2.7, delays=0.03/0/2.7/0, dsn=4.0.0, status=deferred (SASL authentication failed; server domain.es[X.X.X.X] said: 535 Incorrect authentication data)

Surprisingly on the server side (mail.domain.es) there's no log activity.

Any ideas of why is this happening?

Thank you very much.

Nicolás

Reply via email to