Topic: How to Change smtpd_sender_restrictions to work with multiple domains
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer? Yes
- Linux/BSD distribution name and version: Ubuntu 18.0.4
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes 3.9 (MySQL)
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
We are mostly a Mac and iOS users and so has been getting much more difficult to operate multiple domains because the certificate only relates to the main domain and so keep having to delete the mail account and add it again because of certificate issues, so wanting to use the main domain name for users of other domains as well.
So we wish to use the main domain as the incoming and outgoing server address for all accounts rather than the domain on which the email address uses. Example: firstname.lastname@example.org will use outgoing server address of mail.maindomain.com The problem with this setup is that the smtpd_sender_restrictions prevent emails from sending. Incoming is ok.
How do we change the smtpd_sender_restrictions to allow mail to be sent from user email@example.com when the server address is mail.maindomain.com
Currently we have the default installation which is:
All users are authenticating when connecting, so I would have thought that the permit_sasl_authenticated would override the reject_unlisted_sender but it does not seem to.
Can I add the following into the above list and does the order matter?
Enforces the reject_sender_login_mismatch restriction for unauthenticated clients only. This feature is available in Postfix version 2.1 and later.
By adding the above line should I take out the reject_unlisted_sender
Would appreciate advice as to what is the correct way to do this properly.