1

Topic: Mail from disabled domain - "Sender address rejected: not logged in"

==== Required information ====
- iRedMail version: 0.8.1
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: Centos 5
- Related log if you're reporting an issue:
====

I've recently moved a domain to another server, but instead of deleting the accounts, just disabled "domain.com" (not the accounts) on iRedAdmin.
After the change, when trying to send mail from user@domain.com, postfix replies with

NOQUEUE: reject: RCPT from new-server[1.2.3.4]: 553 5.7.1 <user@domain.com>: Sender address rejected: not logged in; from=<user@domain.com> to=<otheruser@another-local-domain.com> proto=ESMTP helo=<new-server.com>


While investigating further, I found that /etc/postfix/ldap_sender_login_maps.cf use the following filter, which really doesn't check if the *domain* is enabled or not.

query_filter    = (&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=smtp)(|(mail=%s)(&(enabledService=shadowaddress)(shadowAddress=%s))))

Not sure if it's possible to check if the domain is enabled or not here, but I've managed to temporarily fix the issue removing "reject_sender_login_mismatch" from the smtpd_sender_restrictions on /etc/postfix/main.cf

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Mail from disabled domain - "Sender address rejected: not logged in"

guigouz wrote:

Not sure if it's possible to check if the domain is enabled or not here

I'm afraid not. Except we store domain status in each mail accounts.