2016-05-19 06:51:20 -05:00
<!DOCTYPE html>
2014-09-30 10:13:21 -05:00
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" / >
2015-08-19 08:11:02 -05:00
< title > Allow user to send email without smtp authentication< / title >
2015-07-31 23:14:52 -05:00
< link rel = "stylesheet" type = "text/css" href = "./css/markdown.css" / >
2014-09-30 10:13:21 -05:00
< / head >
< body >
< div id = "navigation" >
2017-11-16 21:48:44 -06:00
< a href = "https://www.iredmail.org" target = "_blank" >
2016-04-19 12:48:51 -05:00
< img alt = "iRedMail web site"
src="./images/logo-iredmail.png"
style="vertical-align: middle; height: 30px;"
/>
< span > iRedMail< / span >
< / a >
2016-04-21 23:33:25 -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-25 04:50:06 -05:00
< p > < a href = "./allow.user.to.send.email.without.authentication-it_IT.html" > Italiano< / a > / < a href = "./allow.user.to.send.email.without.authentication-zh_CN.html" > 简体中文< / a > /< / p >
2016-04-21 23:33:25 -05:00
< / div >
< h1 id = "allow-user-to-send-email-without-smtp-authentication" > Allow user to send email without smtp authentication< / h1 >
2016-12-14 06:10:23 -06:00
< h2 id = "postfix" > Postfix< / h2 >
2015-08-19 08:11:02 -05:00
< p > Create a plain text file: < code > /etc/postfix/accepted_unauth_senders< / code > , list all
users' email addresses which are allowed to send email without smtp
authentication. We use user email address < code > user@example.com< / code > for example:< / p >
< pre > < code > user@example.com OK
2014-09-30 10:13:21 -05:00
< / code > < / pre >
2016-10-31 10:47:55 -06:00
< p > It's ok to use IP address instead like below:< / p >
< blockquote >
< p > For more allowed sender format, please check Postfix manual page: < a href = "http://www.postfix.org/access.5.html" > access(5)< / a > .< / p >
< / blockquote >
< pre > < code > 192.168.1.1 OK
192.168.2 OK
172.16 OK
< / code > < / pre >
2015-08-19 08:11:02 -05:00
< p > Create hash db file with < code > postmap< / code > command:< / p >
2014-09-30 10:13:21 -05:00
< pre > < code > # postmap hash:/etc/postfix/accepted_unauth_senders
< / code > < / pre >
2015-08-19 08:11:02 -05:00
< p > Modify Postfix config file < code > /etc/postfix/main.cf< / code > to use this text file:< / p >
2014-09-30 10:13:21 -05:00
< pre > < code > smtpd_sender_restrictions =
check_sender_access hash:/etc/postfix/accepted_unauth_senders,
[...OTHER RESTRICTIONS HERE...]
< / code > < / pre >
< p > Restart/reload postfix to make it work:< / p >
< pre > < code > # /etc/init.d/postfix restart
2016-12-14 06:10:23 -06:00
< / code > < / pre >
< h2 id = "iredapd" > iRedAPD< / h2 >
< p > iRedAPD plugin < code > reject_sender_login_mismatch< / code > will check forged sender address.
If sender domain is hosted on your server, but no smtp auth, it will be
considered as a forged email. In this case, iRedAPD will reject this email
(with rejection message: < code > Policy rejection not logged in< / code > ), so we need to
bypass either sender email address. If email is sent by an internal network
device like printer, fax, we can also its IP address directly.< / p >
< ul >
< li > To bypass sender email address < code > user@example.com< / code > , please add setting in
< code > /opt/iredapd/settings.py< / code > like below:< / li >
< / ul >
< pre > < code > ALLOWED_FORGED_SENDERS = ['user@example.com']
< / code > < / pre >
< ul >
2017-04-12 05:11:20 -05:00
< li > To bypass sender IP address or network, for example, < code > 192.168.0.1< / code > and
2017-04-20 11:00:54 -05:00
< code > 192.168.1.0/24< / code > , please add setting in < code > /opt/iredapd/settings.py< / code > like below:< / li >
2016-12-14 06:10:23 -06:00
< / ul >
2017-04-12 05:11:20 -05:00
< pre > < code > MYNETWORKS = ['192.168.0.1', '192.168.1.0/24']
2016-12-14 06:10:23 -06:00
< / code > < / pre >
< p > Restarting iRedAPD service is required if you updated < code > /opt/iredapd/settings.py< / code > .< / p > < div class = "footer" >
2017-11-16 21:48:44 -06:00
< 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 = "https://www.iredmail.org/contact.html" > contact us< / a > to fix it.< / p >
2016-05-19 06:51:20 -05:00
< / div >
2017-11-05 02:33:58 -06:00
<!-- Global site tag (gtag.js) - Google Analytics -->
< script async src = "https://www.googletagmanager.com/gtag/js?id=UA-3293801-21" > < / script >
< script >
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
2015-02-05 07:02:53 -06:00
2017-11-05 02:33:58 -06:00
gtag('config', 'UA-3293801-21');
2014-10-13 19:28:43 -05:00
< / script >
< / body > < / html >