El 20/06/2012 17:12, Dennis Guhl escribió:
On Wed, Jun 20, 2012 at 03:00:44PM +0100, Nicolás wrote:
Hi there!
[..]
The whole postconf -n command on the client, nagios.domain.es:
config_directory = /etc/postfix
relayhost = [domain.es]
Is it intentional that you turned MX lookups off? See
http://www.postfix.org/postconf.5.html#relayhost.
You're right, changed that without brackets (this was one of the mistakes).
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl/passwd
smtp_sasl_security_options = noanonymous
smtp_use_tls = yes
Btw: this ist pre Postfix 2.3 syntax, the new^Wtodays syntax is
smtp_tls_security_level
(http://www.postfix.org/postconf.5.html#smtp_use_tls).
[..]
Ok, changed to level 'encrypt'.
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.
Are you really sure your email is directed to the correct server? Is
the A record for domain.es the same as for mail.domain.es?
That was the real mistake. As it was not resolving the MX record, it was
sending the request directly to the registrar server - where there is no
server. So I now changed that, but when I try to send an e-mail now, I
get the following error:
Jun 20 19:25:01 mail postfix/smtpd[14475]: connect from
my.ip.add.ress[my.ip.add.ress]
Jun 20 19:25:02 mail policyd-spf[14480]: None; identity=helo;
client-ip=my.ip.add.ress; helo=nagios.localdomain;
envelope-from=root@nagios.localdomain; receiver=nico...@domain.es
Jun 20 19:25:02 mail policyd-spf[14480]: None; identity=mailfrom;
client-ip=my.ip.add.ress; helo=nagios.localdomain;
envelope-from=root@nagios.localdomain; receiver=nico...@domain.es
Jun 20 19:25:03 mail postfix/smtpd[14475]: NOQUEUE: reject: RCPT from
my.ip.add.ress[my.ip.add.ress]: 450 4.7.1 <nagios.localdomain>: Helo
command rejected: Host not found; from=<root@nagios.localdomain>
to=<nico...@domain.es> proto=ESMTP helo=<nagios.localdomain>
Jun 20 19:25:03 mail postfix/smtpd[14475]: disconnect from
my.ip.add.ress[my.ip.add.ress]
I understand the client is identifying itself as root@nagios.localhost,
but what I want to achieve is to identify itself as nag...@domain.es
getting the data from hash:/etc/postfix/sasl/passwd instead. Is that
even possible?
Btw, the content of /etc/postfix/sasl/passwd is now:
domain.es nag...@domain.es:password
Thanks for your help!
Nicolás