1 (edited by kmihalj 2015-02-03 20:29:57)

Topic: SMTP Error (554)

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

When someone is asking "Return receipt" and in Roundcube try to send that receipt, then error is produced.
Also "Return receipt" is not displayed in Thunderbird, Outlook etc....

maillog has this

Feb  3 13:01:17 iredmail postfix/smtpd[13352]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 554 5.7.1 <kmihalj@xxx.hr>: Recipient address rejected: Access denied; from=<> to=<kmihalj@xxxx.hr> proto=ESMTP helo=<iredmail.xxxx.hr>
Feb  3 13:01:17 iredmail roundcube: SMTP Error: SMTP error: Failed to add recipient 'kmihalj@xxxx.hr' in /var/www/roundcubemail-1.0.4/program/lib/Roundcube/rcube.php on line 1505 (POST /mail/?_task=mail&_framed=1&_action=sendmdn?_task=&_action=)
Post's attachments

Screenshot from 2015-02-03 13:01:17.png
Screenshot from 2015-02-03 13:01:17.png 47.7 kb, 4 downloads since 2015-02-03 

You don't have the permssions to download the attachments of this post.

----

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

2

Re: SMTP Error (554)

kmihalj wrote:

Feb  3 13:01:17 iredmail postfix/smtpd[13352]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 554 5.7.1 <kmihalj@xxx.hr>: Recipient address rejected: Access denied; from=<> to=<kmihalj@xxxx.hr> proto=ESMTP helo=<iredmail.xxxx.hr>

Do you have iRedAPD plugin 'reject_null_sender' enabled? does it work if you disable this plugin?

3

Re: SMTP Error (554)

ZhangHuangbin wrote:

Do you have iRedAPD plugin 'reject_null_sender' enabled? does it work if you disable this plugin?

I disabled this plugin and now all is working smile

Thanx !!!

4

Re: SMTP Error (554)

kmihalj wrote:

I disabled this plugin and now all is working

Could you please do me a favor?

1) Enable 'reject_null_sender' plugin in iRedAPD again, enable debug mode in iRedAPD too, restart iRedAPD service.
2) Reproduce this issue again.

Paste me full log related to this reproduced issue in /var/log/iredapd.log.

Just want to know how i can solve it.

5

Re: SMTP Error (554)

Here it is, domain name is replaced with xXxXx and since I have cca 10000 users i put here only part where I recreated SMTP error 554

2015-02-03 15:25:41 DEBUG smtp session: request=smtpd_access_policy
2015-02-03 15:25:41 DEBUG smtp session: protocol_state=RCPT
2015-02-03 15:25:41 DEBUG smtp session: protocol_name=ESMTP
2015-02-03 15:25:41 DEBUG smtp session: client_address=127.0.0.1
2015-02-03 15:25:41 DEBUG smtp session: client_name=iredmail.xXxXx.hr
2015-02-03 15:25:41 DEBUG smtp session: reverse_client_name=iredmail.xXxXx.hr
2015-02-03 15:25:41 DEBUG smtp session: helo_name=iredmail.xXxXx.hr
2015-02-03 15:25:41 DEBUG smtp session: sender=kmihalj@xXxXx.hr
2015-02-03 15:25:41 DEBUG smtp session: recipient=kmihalj@xXxXx.hr
2015-02-03 15:25:41 DEBUG smtp session: recipient_count=0
2015-02-03 15:25:41 DEBUG smtp session: queue_id=
2015-02-03 15:25:41 DEBUG smtp session: instance=2759.54d0da65.ddb1d.0
2015-02-03 15:25:41 DEBUG smtp session: size=0
2015-02-03 15:25:41 DEBUG smtp session: etrn_domain=
2015-02-03 15:25:41 DEBUG smtp session: stress=
2015-02-03 15:25:41 DEBUG smtp session: sasl_method=LOGIN
2015-02-03 15:25:41 DEBUG smtp session: sasl_username=kmihalj@xXxXx.hr
2015-02-03 15:25:41 DEBUG smtp session: sasl_sender=
2015-02-03 15:25:41 DEBUG smtp session: ccert_subject=
2015-02-03 15:25:41 DEBUG smtp session: ccert_issuer=
2015-02-03 15:25:41 DEBUG smtp session: ccert_fingerprint=
2015-02-03 15:25:41 DEBUG smtp session: ccert_pubkey_fingerprint=
2015-02-03 15:25:41 DEBUG smtp session: encryption_protocol=TLSv1
2015-02-03 15:25:41 DEBUG smtp session: encryption_cipher=ECDHE-RSA-AES256-SHA
2015-02-03 15:25:41 DEBUG smtp session: encryption_keysize=256
2015-02-03 15:25:41 DEBUG LDAP connection initialied success.
2015-02-03 15:25:41 DEBUG LDAP bind success.
2015-02-03 15:25:41 DEBUG --> Apply plugin: reject_null_sender
2015-02-03 15:25:41 DEBUG <-- Result: DUNNO
2015-02-03 15:25:41 DEBUG Skip plugin: amavisd_message_size_limit (protocol_state != RCPT)
2015-02-03 15:25:41 DEBUG Creating Amavisd database connection.
2015-02-03 15:25:41 DEBUG Got db cursor.
2015-02-03 15:25:41 DEBUG --> Apply plugin: amavisd_wblist
2015-02-03 15:25:41 DEBUG Sender is same as recipient, bypassed.
2015-02-03 15:25:41 DEBUG <-- Result: DUNNO
2015-02-03 15:25:41 DEBUG [+] Getting LDIF data of account: kmihalj@xXxXx.hr
2015-02-03 15:25:41 DEBUG search base dn: o=domains,dc=xXxXx,dc=hr
2015-02-03 15:25:41 DEBUG search filter: (&(|(mail=kmihalj@xXxXx.hr)(shadowAddress=kmihalj@xXxXx.hr))(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))
2015-02-03 15:25:41 DEBUG search attributes: ['objectClass', 'listAllowedUser', 'accessPolicy']
2015-02-03 15:25:41 DEBUG result: [('mail=kmihalj@xXxXx.hr,ou=Users,domainName=xXxXx.hr,o=domains,dc=xXxXx,dc=hr', {'objectClass': ['inetOrgPerson', 'shadowAccount', 'amavisAccount', 'mailUser', 'top']})]
2015-02-03 15:25:41 DEBUG --> Apply plugin: ldap_maillist_access_policy
2015-02-03 15:25:41 DEBUG <-- Result: DUNNO (Not a mail list account)
2015-02-03 15:25:41 DEBUG Closed Amavisd database connection.
2015-02-03 15:25:41 DEBUG Session ended
2015-02-03 15:25:41 DEBUG Close LDAP connection.
2015-02-03 15:25:41 DEBUG smtp session: request=smtpd_access_policy
2015-02-03 15:25:41 DEBUG smtp session: protocol_state=END-OF-MESSAGE
2015-02-03 15:25:41 DEBUG smtp session: protocol_name=ESMTP
2015-02-03 15:25:41 DEBUG smtp session: client_address=127.0.0.1
2015-02-03 15:25:41 DEBUG smtp session: client_name=iredmail.xXxXx.hr
2015-02-03 15:25:41 DEBUG smtp session: reverse_client_name=iredmail.xXxXx.hr
2015-02-03 15:25:41 DEBUG smtp session: helo_name=iredmail.xXxXx.hr
2015-02-03 15:25:41 DEBUG smtp session: sender=kmihalj@xXxXx.hr
2015-02-03 15:25:41 DEBUG smtp session: recipient=kmihalj@xXxXx.hr
2015-02-03 15:25:41 DEBUG smtp session: recipient_count=1
2015-02-03 15:25:41 DEBUG smtp session: queue_id=E751F20090D71A
2015-02-03 15:25:41 DEBUG smtp session: instance=2759.54d0da65.ddb1d.0
2015-02-03 15:25:41 DEBUG smtp session: size=876
2015-02-03 15:25:41 DEBUG smtp session: etrn_domain=
2015-02-03 15:25:41 DEBUG smtp session: stress=
2015-02-03 15:25:41 DEBUG smtp session: sasl_method=LOGIN
2015-02-03 15:25:41 DEBUG smtp session: sasl_username=kmihalj@xXxXx.hr
2015-02-03 15:25:41 DEBUG smtp session: sasl_sender=
2015-02-03 15:25:41 DEBUG smtp session: ccert_subject=
2015-02-03 15:25:41 DEBUG smtp session: ccert_issuer=
2015-02-03 15:25:41 DEBUG smtp session: ccert_fingerprint=
2015-02-03 15:25:41 DEBUG smtp session: ccert_pubkey_fingerprint=
2015-02-03 15:25:41 DEBUG smtp session: encryption_protocol=TLSv1
2015-02-03 15:25:41 DEBUG smtp session: encryption_cipher=ECDHE-RSA-AES256-SHA
2015-02-03 15:25:41 DEBUG smtp session: encryption_keysize=256
2015-02-03 15:25:41 DEBUG LDAP connection initialied success.
2015-02-03 15:25:41 DEBUG LDAP bind success.
2015-02-03 15:25:41 DEBUG Skip plugin: reject_null_sender (protocol_state != END-OF-MESSAGE)
2015-02-03 15:25:41 DEBUG Creating Amavisd database connection.
2015-02-03 15:25:41 DEBUG Got db cursor.
2015-02-03 15:25:41 DEBUG --> Apply plugin: amavisd_message_size_limit
2015-02-03 15:25:41 DEBUG Message size: 876
2015-02-03 15:25:41 DEBUG Getting applicable policies
2015-02-03 15:25:41 DEBUG Valid policy accounts for recipient kmihalj@xXxXx.hr: 'kmihalj@xXxXx.hr', '@xXxXx.hr', '@.xXxXx.hr', '@.'
2015-02-03 15:25:41 DEBUG SELECT policy_name,message_size_limit
2015-02-03 15:25:41 DEBUG SKIP: policy_name @., no valid message_size_limit: None
2015-02-03 15:25:41 DEBUG <-- Result: DUNNO
2015-02-03 15:25:41 DEBUG Skip plugin: amavisd_wblist (protocol_state != END-OF-MESSAGE)
2015-02-03 15:25:41 DEBUG Skip plugin: ldap_maillist_access_policy (protocol_state != END-OF-MESSAGE)
2015-02-03 15:25:41 DEBUG Closed Amavisd database connection.
2015-02-03 15:25:41 DEBUG Session ended
2015-02-03 15:25:41 DEBUG Close LDAP connection.
2015-02-03 15:25:48 DEBUG smtp session: request=smtpd_access_policy
2015-02-03 15:25:48 DEBUG smtp session: protocol_state=RCPT
2015-02-03 15:25:48 DEBUG smtp session: protocol_name=ESMTP
2015-02-03 15:25:48 DEBUG smtp session: client_address=127.0.0.1
2015-02-03 15:25:48 DEBUG smtp session: client_name=iredmail.xXxXx.hr
2015-02-03 15:25:48 DEBUG smtp session: reverse_client_name=iredmail.xXxXx.hr
2015-02-03 15:25:48 DEBUG smtp session: helo_name=iredmail.xXxXx.hr
2015-02-03 15:25:48 DEBUG smtp session: sender=
2015-02-03 15:25:48 DEBUG smtp session: recipient=kmihalj@xXxXx.hr
2015-02-03 15:25:48 DEBUG smtp session: recipient_count=0
2015-02-03 15:25:48 DEBUG smtp session: queue_id=
2015-02-03 15:25:48 DEBUG smtp session: instance=25de.54d0da6c.76d3c.0
2015-02-03 15:25:48 DEBUG smtp session: size=0
2015-02-03 15:25:48 DEBUG smtp session: etrn_domain=
2015-02-03 15:25:48 DEBUG smtp session: stress=
2015-02-03 15:25:48 DEBUG smtp session: sasl_method=LOGIN
2015-02-03 15:25:48 DEBUG smtp session: sasl_username=kmihalj@xXxXx.hr
2015-02-03 15:25:48 DEBUG smtp session: sasl_sender=
2015-02-03 15:25:48 DEBUG smtp session: ccert_subject=
2015-02-03 15:25:48 DEBUG smtp session: ccert_issuer=
2015-02-03 15:25:48 DEBUG smtp session: ccert_fingerprint=
2015-02-03 15:25:48 DEBUG smtp session: ccert_pubkey_fingerprint=
2015-02-03 15:25:48 DEBUG smtp session: encryption_protocol=TLSv1
2015-02-03 15:25:48 DEBUG smtp session: encryption_cipher=ECDHE-RSA-AES256-SHA
2015-02-03 15:25:48 DEBUG smtp session: encryption_keysize=256
2015-02-03 15:25:48 DEBUG LDAP connection initialied success.
2015-02-03 15:25:48 DEBUG LDAP bind success.
2015-02-03 15:25:48 DEBUG --> Apply plugin: reject_null_sender
2015-02-03 15:25:48 DEBUG Spam (sasl authenticated but null sender).
2015-02-03 15:25:48 DEBUG <-- Result: REJECT
2015-02-03 15:25:48 DEBUG Session ended
2015-02-03 15:25:48 DEBUG Close LDAP connection.

6

Re: SMTP Error (554)

Here's solution to keep iRedAPD plugin 'reject_null_sender', and send return receipt:

Add below setting in Roundcube config file (/var/www/roundcubemail/config/config.inc.php on RHEL/CentOS):

// According to RFC2298, return receipt envelope sender address must be empty.  
// If this option is true, Roundcube will use user's identity as envelope sender for MDN responses.
$config['mdn_use_from'] = true;

Tested and works for me. Would you like to give it a try?

Note, if other mail client applications don't set envelope sender, same issue will occurs.

7

Re: SMTP Error (554)

It works that way also. And works on other mail clients.

8

Re: SMTP Error (554)

kmihalj wrote:

It works that way also. And works on other mail clients.

Does it really work on other mail clients? This is just Roundcube settings.

Could you please help me again? Steps:

1) Enable 'reject_null_sender' plugin in iRedAPD, enable debug mode in iRedAPD too, restart iRedAPD service.
2) Try to send return receipt in other mail clients, e.g. Outlook, Thunderbird.

Paste me full log related to this reproduced issue in /var/log/iredapd.log. Just want to make sure it works.