Topic: Limit only specifed domain to send mail
==== Required information ====
- iRedMail version (check /etc/iredmail-release): v2.2.2
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx):Apache
- Linux/BSD distribution name and version: Redhat7
- Related log if you're reporting an issue:
====
Hi,
We have IT policy execution soon for our mail server by which mail going out of the server must be the sender within local network eg mydomain.com or *.mydomain.com. We don't want our internal user to mock up other "identity" to send mail out. I did googled search and so far changing the smtpd_sender_restriction could make thing happen
smtpd_sender_restriction = check_sender_access regexp:/etc/postfix/sender.access, reject_sender_login_mismatch, permit_mynetworks, permit_sasl_authenticated, reject_unknown_sender_domain
sender.access
!/mydomain.com/ REJECT <--- not allow all domain except mydomain.com
I know smtpd_sender_restriction will check against "MAIL FROM" I found it is not feasible as it is not only blocking our senders' outgoing mail not using mydomain.com but also blocking ALL incoming email not from mydomain.com which is not what we want. We want to control outgoing email's identity (MAIL FROM).
I have tried to use whitelist/backlist in iRedAdmin-PRO, it look like it is just only checking incoming mail? Do you have any resolution for this?
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.