1 (edited by aarango 2017-04-27 20:39:40)

Topic: Recipient address rejected: Policy rejection not logged in

Hi, I am trying to send emails using PHP but I get that error in logs:

This are my policies in SERVER:

# Sender restrictions
smtpd_sender_restrictions =
    check_sender_access hash:/etc/postfix/sender_whitelist
    #reject_sender_login_mismatch
    reject_unknown_sender_domain
    reject_non_fqdn_sender
    reject_unlisted_sender
    permit_mynetworks
    permit_sasl_authenticated
    check_sender_access pcre:/etc/postfix/sender_access.pcre

In sender_whitelist I have the account root@mydomain.com and in my_network I have IP agent accepted

Policies in AGENT:

relayhost = 192.168.1.XX:XX
smtp_use_tls=yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl/passwd

And in file passwd I have details login correctly.

But when I try to send an email using php I get this:


Apr 27 14:34:11 suricata postfix/qmgr[652]: 53B6A9B99: from=<root@mydomain>, size=391, nrcpt=1 (queue active)
Apr 27 14:34:11 suricata postfix/smtp[801]: 53B6A9B99: to=<me@mydomain.com>, relay=192.168.1.XX[192.168.1.XX]:XX, delay=0.05, delays=0.01/0.02/0.01/0.01, dsn=5.7.1, status=bounced (host 192.168.1.XX[192.168.1.XX] said: 554 5.7.1 <me@mydomain.com>: Recipient address rejected: Policy rejection not logged in (in reply to RCPT TO command))

And in inbox:


This is the mail system at host mydomain.com

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<me@mydomain.com>: host 192.168.1.XX[192.168.1.XX] said: 554 5.7.1
    <me@mydomain.com>: Recipient address rejected: Policy rejection
    not logged in (in reply to RCPT TO command)

Any idea? Thanks.

----

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

2

Re: Recipient address rejected: Policy rejection not logged in

Add IP address of the server you're sending email from in iRedAPD config file, /opt/iredapd/settings.py, like this:

MYNETWORKS = ['11.22.33.44', '22.33.44.55']

Restarting iredapd is required.

3

Re: Recipient address rejected: Policy rejection not logged in

It works, thanks!

Note: Do I need in agent add in postfix file sasl_passwd and relay? Or with that value on MYNETWORK isn't need?

4

Re: Recipient address rejected: Policy rejection not logged in

I would like to know how could I send emails authenticated through postfix. Are there any manual please?

Thanks.

5

Re: Recipient address rejected: Policy rejection not logged in

aarango wrote:

I would like to know how could I send emails authenticated through postfix. Are there any manual please?

http://www.iredmail.org/docs/#mua

6

Re: Recipient address rejected: Policy rejection not logged in

This particular problem has been driving me nuts. I suppose the correct way to do this is to check SPF record before rejecting email based on a relay list. (relay list? Is this 1990?) So here is a real world example:

I use Zendesk for support ticketing , and when zendesk sends email notification to my customer from my support email (both hosted on same mail server) I get:

Recipient address rejected: Policy rejection not logged in

My SPF record clearly indicates this mail server has authority to send mail on my  behalf, but this don’t work, and from what I can tell, there is no way to fix it.

7

Re: Recipient address rejected: Policy rejection not logged in

nullmem wrote:

I use Zendesk for support ticketing , and when zendesk sends email notification to my customer from my support email (both hosted on same mail server) I get:

Your issue can be solved in either ways:

*) Update your zendesk setting to send as different user (not one of your mail domains), for example, someone@zendesk.com.
*) Update your zendesk setting to send as your mail user with SMTP AUTH.