New: html/relayhost.html.

This commit is contained in:
Zhang Huangbin 2016-04-20 11:13:47 +08:00
parent be1a8579d3
commit 0386df0901
3 changed files with 96 additions and 0 deletions

38
en_US/howto/relayhost.md Normal file
View File

@ -0,0 +1,38 @@
# Setup relayhost
Relay host is a server which can accept your email and sent it out to the final
destination for you.
To setup a global relay host in iRedMail, please append below settings in
Postfix config file `/etc/postfix/main.cf` (Linux/OpenBSD) or
`/usr/local/etc/postfix/main.cf` (FreeBSD):
```cfg
relayhost = [relay_server]:25
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
smtp_sasl_auth_enable = yes
smtp_sasl_mechanism_filter = login
smtp_sasl_security_options = noanonymous
```
!!! note
* You should relace `relay_server` above by the real server address. for
example, `relayhost = [37.61.54.158]:25`, `relayhost = [smtp.gmail.com]:25`.
* For more possible values/formats, please check Postfix document:
[Postfix transport table format (transport)](http://www.postfix.org/transport.5.html).
Then write the username and password in `/etc/postfix/sasl_password`:
```cfg
relay.server user:password
```
Run `postmap` and restart Postfix service:
```cmd
postmap hash:/etc/postfix/sasl_password
service postfix restart
```
That's it.

View File

@ -119,6 +119,7 @@
<li><a href="pipe.incoming.email.for.certain.user.to.external.script.html">Pipe incoming email for certain user to external script </a></li>
<li><a href="public.folder.html">How to create and manage public folder</a></li>
<li><a href="recalculate.mailbox.quota.html">Force Dovecot to recalculate mailbox quota</a></li>
<li><a href="relayhost.html">Setup relayhost</a></li>
<li><a href="reset.user.password.html">Reset user password</a></li>
<li><a href="restrict.mail.user.to.login.from.specified.ip.or.networks.html">Restrict mail user to login from specified IP addresses or networks</a></li>
<li><a href="send.out.email.from.specified.ip.addresses.html">Send out email from specified IP address</a></li>

57
html/relayhost.html Normal file
View File

@ -0,0 +1,57 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Setup relayhost</title>
<link rel="stylesheet" type="text/css" href="./css/markdown.css" />
</head>
<body>
<div id="navigation">
<a href="/index.html" target="_blank">
<img alt="iRedMail web site"
src="./images/logo-iredmail.png"
style="vertical-align: middle; height: 30px;"
/>&nbsp;
<span>iRedMail</span>
</a>
&nbsp;&nbsp;//&nbsp;&nbsp;<a href="./index.html">Document Index</a></div><h1 id="setup-relayhost">Setup relayhost</h1>
<p>Relay host is a server which can accept your email and sent it out to the final
destination for you.</p>
<p>To setup a global relay host in iRedMail, please append below settings in
Postfix config file <code>/etc/postfix/main.cf</code> (Linux/OpenBSD) or
<code>/usr/local/etc/postfix/main.cf</code> (FreeBSD):</p>
<pre><code class="cfg">relayhost = [relay_server]:25
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
smtp_sasl_auth_enable = yes
smtp_sasl_mechanism_filter = login
smtp_sasl_security_options = noanonymous
</code></pre>
<div class="admonition note">
<p class="admonition-title">Note</p>
<ul>
<li>You should relace <code>relay_server</code> above by the real server address. for
example, <code>relayhost = [37.61.54.158]:25</code>, <code>relayhost = [smtp.gmail.com]:25</code>.</li>
<li>For more possible values/formats, please check Postfix document:
<a href="http://www.postfix.org/transport.5.html">Postfix transport table format (transport)</a>.</li>
</ul>
</div>
<p>Then write the username and password in <code>/etc/postfix/sasl_password</code>:</p>
<pre><code class="cfg">relay.server user:password
</code></pre>
<p>Run <code>postmap</code> and restart Postfix service:</p>
<pre><code class="cmd">postmap hash:/etc/postfix/sasl_password
service postfix restart
</code></pre>
<p>That's it.</p><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. If you found something wrong, please do <a href="http://www.iredmail.org/contact.html">contact us</a> to fix it.<script>
(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');
</script>
</body></html>