Topic: Mail group with members-only access policy doesn't accept mail
==== Required information ====
- iRedMail version (check /etc/iredmail-release): v0.9.6
- Linux/BSD distribution name and version: Ubuntu 16.04 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx): Nginx
- Related log if you're reporting an issue: See below
====
I've created a mail group with an access policy 'members only'. One of the recipients is a mail forward to Gmail and sends mail for the same address via a SMTP Relay (using Sendgrid) to reply. The mail should be allowed as the e-mail address where the message is sent from is a legit member of the mail group. All other members work ok. But the mail gets rejected, here is the log part:
May 10 00:46:09 mx postfix/smtpd[31209]: connect from o1.7nn.fsharedserv.sendgrid.net[167.89.00.00]
May 10 00:46:10 mx postfix/smtpd[31209]: Anonymous TLS connection established from o1.7nn.fsharedserv.sendgrid.net[167.89.00.00]: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
May 10 00:46:10 mx postfix/smtpd[31209]: NOQUEUE: reject: RCPT from o1.7nn.fsharedserv.sendgrid.net[167.89.00.00]: 554 5.7.1 <myteam@domain.com>: Recipient address rejected: Not authorized; from=<bounces+1429439-103a-myteam=domain.com@sendgrid.net> to=<myteam@domain.com> proto=ESMTP helo=<o1.7nn.fsharedserv.sendgrid.net>
May 10 00:46:11 mx postfix/smtpd[31209]: lost connection after RCPT from o1.7nn.fsharedserv.sendgrid.net[167.89.00.00]
May 10 00:46:11 mx postfix/smtpd[31209]: disconnect from o1.7nn.fsharedserv.sendgrid.net[167.89.00.00] ehlo=2 starttls=1 mail=1 rcpt=0/1 commands=4/5
It seems that the SMTP relay swapped the original 'from' address with a bounce e-mail address from them. I asked Sendgrid what the possible issue and best solution would be and there answer was:
The reason for this bounce is that the recipient inbox is looking at the Return-Path instead of the From address. Change a setting on the filtering to look at the from address instead of the return path address.
Can anyone clarify which root cause is correct and how to possibly fix this issue?
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.