2016-05-19 06:51:20 -05:00
<!DOCTYPE html>
2014-10-21 10:28:41 -05:00
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" / >
2014-10-21 20:46:53 -05:00
< title > Allow certain users to send email as another user< / title >
2015-07-31 23:14:52 -05:00
< link rel = "stylesheet" type = "text/css" href = "./css/markdown.css" / >
2014-10-21 10:28:41 -05:00
< / head >
< body >
< div id = "navigation" >
2016-04-19 12:48:51 -05:00
< a href = "/index.html" target = "_blank" >
< img alt = "iRedMail web site"
src="./images/logo-iredmail.png"
style="vertical-align: middle; height: 30px;"
/>
< span > iRedMail< / span >
< / a >
2016-05-11 08:45:55 -05:00
// < a href = "./index.html" > Document Index< / a > < / div > < div class = "admonition note" >
2016-11-11 02:56:08 -06:00
< p class = "admonition-title" > This tutorial is available in other languages. < a href = "https://bitbucket.org/zhb/iredmail-docs/src" > Help translate more< / a > < / p >
2016-05-11 08:45:55 -05:00
< p > < a href = "./allow.certain.users.to.send.email.as.different.user-it_IT.html" > Italiano< / a > /< / p >
< / div >
< h1 id = "allow-certain-users-to-send-email-as-another-user" > Allow certain users to send email as another user< / h1 >
2014-10-21 10:28:41 -05:00
< p > iRedMail configures Postfix to
reject the request when sender specifies an owner for the MAIL FROM address
(< code > From:< / code > 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.< / p >
< p > Sometimes we do need to send email as another user, this tutorial describes
how to allow certain users to do this with iRedAPD plugin
< code > reject_sender_login_mismatch< / code > .< / p >
< ul >
< li >
< p > Remove < code > reject_sender_login_mismatch< / code > restriction rule in Postfix
setting < code > smtpd_sender_restrictions< / code > (< code > /etc/postfix/main.cf< / code > ). Out iRedAPD
plugin will do the same restriction for you.< / p >
< p > After removed < code > reject_sender_login_mismatch< / code > , Postfix setting looks like
below:< / p >
< / li >
< / ul >
< pre > < code > smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated
< / code > < / pre >
< ul >
< li > Enable plugin < code > reject_sender_login_mismatch< / code > in iRedAPD config file
< code > /opt/iredapd/settings.py< / code > :< / li >
< / ul >
< pre > < code class = "python" > plugins = ['reject_sender_login_mismatch', ...]
< / code > < / pre >
< ul >
< li > List senders who are allowed to send email as different users in iRedAPD
config file < code > /opt/iredapd/settings.py< / code > , in parameter
< code > ALLOWED_LOGIN_MISMATCH_SENDERS< / code > . For example:< / li >
< / ul >
< pre > < code class = "python" > ALLOWED_LOGIN_MISMATCH_SENDERS = ['user1@here.com', 'user2@here.com']
< / code > < / pre >
< pre > < code > NOTE: this parameter does not present by default, please add it manually.
< / code > < / pre >
2016-05-19 06:51:20 -05:00
< p > Restart iRedAPD service. That's all.< / p > < div class = "footer" >
< p style = "text-align: center; color: grey;" > All documents are available in < a href = "https://bitbucket.org/zhb/iredmail-docs/src" > BitBucket repository< / a > , and published under < a href = "http://creativecommons.org/licenses/by-nd/3.0/us/" target = "_blank" > Creative Commons< / a > license. You can < a href = "https://bitbucket.org/zhb/iredmail-docs/get/tip.tar.bz2" > download the latest version< / a > for offline reading. If you found something wrong, please do < a href = "http://www.iredmail.org/contact.html" > contact us< / a > to fix it.< / p >
< / div >
< script type = "text/javascript" >
2015-02-05 07:02:53 -06:00
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-3293801-21', 'auto');
ga('send', 'pageview');
2014-10-21 10:28:41 -05:00
< / script >
< / body > < / html >