From e18b5d2fae6d77d59ccafbd2190e0b65c45df254 Mon Sep 17 00:00:00 2001 From: Zhang Huangbin Date: Tue, 21 Oct 2014 23:28:41 +0800 Subject: [PATCH] New: allow.certain.users.to.send.email.as.different.user.html. --- README.md | 1 + ...n.users.to.send.email.as.different.user.md | 41 ++++++++++++ ...users.to.send.email.as.different.user.html | 64 +++++++++++++++++++ html/index.html | 1 + 4 files changed, 107 insertions(+) create mode 100644 howto/0-allow.certain.users.to.send.email.as.different.user.md create mode 100644 html/allow.certain.users.to.send.email.as.different.user.html diff --git a/README.md b/README.md index 7224ac74..b44fa062 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ * [Setup DNS records for your iRedMail server](https://bitbucket.org/zhb/docs.iredmail.org/src/default/installation/setup_dns.md) * [Perform silent/unattended iRedMail installation](https://bitbucket.org/zhb/docs.iredmail.org/src/default/installation/unattended.iredmail.installation.md) # How to +* [Allow some users to send email as another user](https://bitbucket.org/zhb/docs.iredmail.org/src/default/howto/0-allow.certain.users.to.send.email.as.different.user.md) * [Change mail attachment size](https://bitbucket.org/zhb/docs.iredmail.org/src/default/howto/0-change.mail.attachment.size.md) * [Completely disable Amavisd + ClamAV + SpamAssassin](https://bitbucket.org/zhb/docs.iredmail.org/src/default/howto/0-completely.disable.amavisd.clamav.spamassassin.md) * [Enable SMTPS service (SMTP over SSL, port 465)](https://bitbucket.org/zhb/docs.iredmail.org/src/default/howto/0-enable.smtps.md) diff --git a/howto/0-allow.certain.users.to.send.email.as.different.user.md b/howto/0-allow.certain.users.to.send.email.as.different.user.md new file mode 100644 index 00000000..4912f7a4 --- /dev/null +++ b/howto/0-allow.certain.users.to.send.email.as.different.user.md @@ -0,0 +1,41 @@ +# Allow some users to send email as another user + +iRedMail configures Postfix to +reject the request when sender specifies an owner for the MAIL FROM address +(`From:` header), but the client is not (SASL) logged in as that MAIL FROM +address owner; or when the client is (SASL) logged in, but the client login +name doesn't own the MAIL FROM address. + +Sometimes we do need to send email as another user, this tutorial describes +how to allow certain users to do this with iRedAPD plugin +`reject_sender_login_mismatch`. + +* Remove `reject_sender_login_mismatch` restriction rule in Postfix + setting `smtpd_sender_restrictions` (`/etc/postfix/main.cf`). Out iRedAPD + plugin will do the same restriction for you. + + After removed `reject_sender_login_mismatch`, Postfix setting looks like + below: + +``` +smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated +``` + +* Enable plugin `reject_sender_login_mismatch` in iRedAPD config file + `/opt/iredapd/settings.py`: + +```python +plugins = ['reject_sender_login_mismatch', ...] +``` + +* List senders who are allowed to send email as different users in iRedAPD + config file `/opt/iredapd/settings.py`, in parameter + `ALLOWED_LOGIN_MISMATCH_SENDERS`. For example: + +```python +ALLOWED_LOGIN_MISMATCH_SENDERS = ['user1@here.com', 'user2@here.com'] +``` + + NOTE: this parameter does not present by default, please add it manually. + +Restart iRedAPD service. That's all. diff --git a/html/allow.certain.users.to.send.email.as.different.user.html b/html/allow.certain.users.to.send.email.as.different.user.html new file mode 100644 index 00000000..475631d8 --- /dev/null +++ b/html/allow.certain.users.to.send.email.as.different.user.html @@ -0,0 +1,64 @@ + + + + Allow some users to send email as another user + + + + +

Allow some users to send email as another user

+

iRedMail configures Postfix to +reject the request when sender specifies an owner for the MAIL FROM address +(From: header), but the client is not (SASL) logged in as that MAIL FROM +address owner; or when the client is (SASL) logged in, but the client login +name doesn't own the MAIL FROM address.

+

Sometimes we do need to send email as another user, this tutorial describes +how to allow certain users to do this with iRedAPD plugin +reject_sender_login_mismatch.

+ +
smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated
+
+ + +
plugins = ['reject_sender_login_mismatch', ...]
+
+ + +
ALLOWED_LOGIN_MISMATCH_SENDERS = ['user1@here.com', 'user2@here.com']
+
+ +
NOTE: this parameter does not present by default, please add it manually.
+
+

Restart iRedAPD service. That's all.


If you found something wrong +in this document, please do +contact us to fix it.

This tutorial is published under a CC BY-ND 3.0 license. + + + \ No newline at end of file diff --git a/html/index.html b/html/index.html index a5025515..5cfa5f8a 100644 --- a/html/index.html +++ b/html/index.html @@ -22,6 +22,7 @@

How to