Topic: Limiting From: to user aliases
============ Required information ====
- iRedMail version: 0.9.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Ubuntu 14.04
- Related log if you're reporting an issue:
====
Hi,
i want my users to be able to send emails for their associated aliases. Therefore i digged into the forum and found a lot (as it seems to me) obsolete information.
The essence I got out of this is to use iredapd for checking aliases and remove reject_sender_login_mismatch from postfix config.
Here is what I did (important parts):
in /etc/postfix/main.cf
smtpd_reject_unlisted_sender = yes
smtpd_sender_restrictions = check_policy_service inet:127.0.0.1:7777, permit_mynetworks, permit_sasl_authenticated
in /opt/iredapd/settings.py
backend = "mysql"
plugins = ["reject_null_sender", "reject_sender_login_mismatch", "sql_alias_access_policy", "sql_user_restrictions"]
sql_server = "127.0.0.1"
sql_port = "3306"
sql_db = "vmail"
sql_user = "vmail"
alias_table = "alias"
sql_password = "supers3cret"
SQL Structure in alias table
| address | accesspolicy | goto | moderators |
+-------------------------+--------------+--------------------+------------+
| mail@tld1 | | mail@tld1 | |
| wordpress@tld1 | | mail@tld1 | |
| @tld1 | | mail@tld1 | | (/*Catchall*/)
| mail@tld2 | | mail@tld2 | |
+-------------------------+--------------+--------------------+------------+
Unfortunaltely I'm still able to send email as whatever I want in "From:". If I put reject_sender_login_mismatch back in postfix config, only mail@tld is possible as from.
What did I miss in my config?
iredapd log:
mail@tld2 -> mail@tld1, DUNNO
wordpress@tld1 -> mail@tld1, DUNNO
mail@tld1 -> mail@tld1, DUNNO
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.