Postfix can not send to some mailservers: 'not logged in'

user207564 asked:

I have setup a Postfix stack (with Dovecot and Spamassassin, ClamAV + Amavis) which is working pretty good, actually.

It relays my emails (I am using Thunderbrid as client) to other mailservers. I tried different ones like gmx or gmail.

I have an old mailserver (default iredmail, no customizations) which will be migrated as soon as the new server is working.

Whatsoever, the only mailserver which makes problem is this one. When I send an email to this iredmail machine, my new postfix server gives me a “Undelivered Mail Returned to Sender” notice with the following content:

<receiver@otherhost.com>: host mail.otherhost.com[OTHER_HOST_IP] said: 553 5.7.1
    <sender@host.com>: Sender address rejected: not logged in (in reply to RCPT TO
    command)

In addition to this, I have the maillog of the new postfix server (masked as host.com):

Feb  1 15:34:19 mail postfix/submission/smtpd[7090]: connect from p11e11b3f.dip0.t-ipconnect.de[MY_HOME_IP]
Feb  1 15:34:19 mail postfix/submission/smtpd[7090]: Anonymous TLS connection established from p11e11b3f.dip0.t-ipconnect.de[MY_HOME_IP]: TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)
Feb  1 15:34:19 mail postfix/submission/smtpd[7090]: 7E92928C0DAE: client=p11e11B3F.dip0.t-ipconnect.de[MY_HOME_IP], sasl_method=PLAIN, sasl_username=sender@host.com
Feb  1 15:34:19 mail postfix/cleanup[7096]: 7E92928C0DAE: message-id=<52ED05EA.5040401@host.com>
Feb  1 15:34:19 mail postfix/qmgr[4363]: 7E92928C0DAE: from=<sender@host.com>, size=673, nrcpt=1 (queue active)
Feb  1 15:34:19 mail postfix/submission/smtpd[7090]: disconnect from p11e11B3F.dip0.t-ipconnect.de[MY_HOME_IP]
Feb  1 15:34:20 mail postfix/smtpd[7101]: connect from localhost.localdomain[127.0.0.1]
Feb  1 15:34:20 mail postfix/smtpd[7101]: 9C3BC28C0DCA: client=localhost.localdomain[127.0.0.1]
Feb  1 15:34:20 mail postfix/cleanup[7096]: 9C3BC28C0DCA: message-id=<52ED05EA.5040401@host.com>
Feb  1 15:34:20 mail postfix/smtpd[7101]: disconnect from localhost.localdomain[127.0.0.1]
Feb  1 15:34:20 mail postfix/qmgr[4363]: 9C3BC28C0DCA: from=<sender@host.com>, size=1108, nrcpt=1 (queue active)
Feb  1 15:34:20 mail amavis[5722]: (05722-04) Passed CLEAN {RelayedOpenRelay}, [MY_HOME_IP]:59846 [MY_HOME_IP] <sender@host.com> -> <receiver@otherhost.com>, Queue-ID: 7E92928C0DAE, Message-ID: <52ED05EA.5040401@host.com>, mail_id: gSTyaLhv6ZgI, Hits: -1, size: 673, queued_as: 9C3BC28C0DCA, 1061 ms
Feb  1 15:34:20 mail postfix/lmtp[7098]: 7E92928C0DAE: to=<receiver@otherhost.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.2, delays=0.16/0/0/1.1, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 9C3BC28C0DCA)
Feb  1 15:34:20 mail postfix/qmgr[4363]: 7E92928C0DAE: removed
Feb  1 15:34:20 mail postfix/smtp[7102]: Untrusted TLS connection established to mail.otherhost.com[OTHER_HOST_IP]:25: TLSv1 with cipher ADH-AES256-SHA (256/256 bits)
Feb  1 15:34:20 mail postfix/smtp[7102]: 9C3BC28C0DCA: to=<receiver@otherhost.com>, relay=mail.otherhost.com[OTHER_HOST_IP]:25, delay=0.15, delays=0.05/0/0.05/0.05, dsn=5.7.1, status=bounced (host mail.otherhost.com[OTHER_HOST_IP] said: 553 5.7.1 <sender@host.com>: Sender address rejected: not logged in (in reply to RCPT TO command))
Feb  1 15:34:20 mail postfix/cleanup[7096]: C20F928C0DCB: message-id=<20140201143420.C20F928C0DCB@mail.host.com>
Feb  1 15:34:20 mail postfix/bounce[7103]: 9C3BC28C0DCA: sender non-delivery notification: C20F928C0DCB
Feb  1 15:34:20 mail postfix/qmgr[4363]: C20F928C0DCB: from=<>, size=3112, nrcpt=1 (queue active)
Feb  1 15:34:20 mail postfix/qmgr[4363]: 9C3BC28C0DCA: removed
Feb  1 15:34:20 mail postfix/virtual[7104]: C20F928C0DCB: to=<sender@host.com>, relay=virtual, delay=0.08, delays=0.04/0/0/0.03, dsn=2.0.0, status=sent (delivered to maildir)
Feb  1 15:34:20 mail postfix/qmgr[4363]: C20F928C0DCB: removed

In addition to this elaborate log, I have the related snippet from the iredmail machine”

Feb  1 17:44:48 mail postfix/smtpd[15073]: connect from unknown[HOST_IP]
Feb  1 17:44:48 mail postfix/smtpd[15073]: NOQUEUE: reject: RCPT from unknown[HOST_IP]: 553 5.7.1 <sender@host.com>: Sender address rejected: not logged in; from=<sender@host.com> to=<receiver@otherhost.com> proto=ESMTP helo=<mail.host.com>
Feb  1 17:44:48 mail postfix/smtpd[15073]: disconnect from unknown[HOST_IP]

The question I am asking myself now: Is there a misconfiguration in the default iredmail server I am not aware of or is there a misconfiguration in my new postfix server which should be fixed.

And in general, what exactly means this error, I am a bit new to this entire mailserver segment of system administration, but very eager to learn new stuff.

Thanks in advance.

(The new postfix machine is masked as HOST_IP, mail.host.com and sender@host.com, the old iredmail machine is masked as: OTHER_HOST_IP, mail.otherhost.com and receiver@otherhost.com)

My answer:


Your iredmail machine which you named mail.otherhost.com is misconfigured. It appears to be wanting users connecting on port 25 to authenticate before sending mail, which is not appropriate for incoming connections on this port. Port 25 is intended for receiving mail from other domains on the Internet. Authentication should be required only for incoming connections on port 587, the submission port, which users of your domain use to send outgoing mail.

I’m not familiar enough with iredmail to tell you the exact setting to change, though this shouldn’t be too hard to find.

However, if you’re decommissioning the box anyway, and its replacement is working, you could just ignore it and swap in the new server.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.