<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Control WebPanel Wiki &#187; SMTP relay</title>
	<atom:link href="https://wiki.centos-webpanel.com/tag/smtp-relay/feed" rel="self" type="application/rss+xml" />
	<link>https://wiki.centos-webpanel.com</link>
	<description>CentOS WebPanel Wiki</description>
	<lastBuildDate>Wed, 12 Feb 2025 20:38:16 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.1</generator>
	<item>
		<title>How to Setup remote SMTP server as relay</title>
		<link>https://wiki.centos-webpanel.com/how-to-setup-remote-smtp-server-as-relay</link>
		<comments>https://wiki.centos-webpanel.com/how-to-setup-remote-smtp-server-as-relay#comments</comments>
		<pubDate>Fri, 12 Jul 2019 08:58:01 +0000</pubDate>
		<dc:creator><![CDATA[publisher]]></dc:creator>
				<category><![CDATA[Clusters]]></category>
		<category><![CDATA[E-Mail]]></category>
		<category><![CDATA[sendgrid]]></category>
		<category><![CDATA[SMTP relay]]></category>

		<guid isPermaLink="false">http://wiki.centos-webpanel.com/?p=1221</guid>
		<description><![CDATA[Sending an outgoing email through a 3rd party SMTP relay service is a quick and easy alternative to setting up a full-fledged local email server. Open /etc/postfix/main.cf and add the remote mail server hostname to end of the file: relayhost = [remote.server.com] If the remote system uses a different port number, please specify the port [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Sending an outgoing email through a 3rd party SMTP relay service is a quick and easy alternative to setting up a full-fledged local email server.</p>
<p><strong>Open /etc/postfix/main.cf</strong> and add the remote mail server hostname to end of the file:</p>
<pre>relayhost = [remote.server.com]</pre>
<p>If the remote system uses a different port number, please specify the port number:</p>
<pre>relayhost = [remote.server.com]:587</pre>
<p>In some situations, for redundancy, you may want to configure the relay via two or more remote SMTP server. In such instances, you may configure the following;</p>
<pre>relayhost = [remote1.server.com]
fallback_relay = [remote2.server.com]</pre>
<p>This gives us redundancy in a way so that if one of the SMTP relays is down, we can send emails out via the second one.</p>
<div class="st-alert st-alert- ">
If you need to use login username and password you can add this:</p>
<pre>smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = static:postmaster@mydomain.com:password
smtp_sasl_security_options = noanonymous</pre>
</div>
<p>Now, open /etc/postfix/mynetworks and the public IP of the remote mail server. For example,</p>
<pre>192.168.6.45/32
192.168.7.34/32</pre>
<p>This will let the mail server know exactly which networks are allowed to relay mail. This is a very important step</p>
<p>Restart postfix:</p>
<pre>service postfix restart</pre>
<p>* Don't forget that remote mail servers need to have a valid SPF record and to be properly configured.</p>
<p><strong>SendGrid instructions</strong><br />
<a href="https://docs.sendgrid.com/for-developers/sending-email/postfix" title="SendGrid Postfix instructions" target="_blank">https://docs.sendgrid.com/for-developers/sending-email/postfix</a></p>
]]></content:encoded>
			<wfw:commentRss>https://wiki.centos-webpanel.com/how-to-setup-remote-smtp-server-as-relay/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
