{"id":184,"date":"2015-01-03T22:58:38","date_gmt":"2015-01-03T22:58:38","guid":{"rendered":"http:\/\/adriangrigoras.com\/blog\/?p=184"},"modified":"2015-01-03T22:58:38","modified_gmt":"2015-01-03T22:58:38","slug":"smtp-relay","status":"publish","type":"post","link":"https:\/\/adriangrigoras.com\/blog\/smtp-relay\/","title":{"rendered":"SMTP Relay"},"content":{"rendered":"<p>Normally,\u00a0<code>mail<\/code>\u00a0and derivatives (and almost any other Unix MUA) use the traditional\u00a0<code>sendmail\u00a0<\/code>interface \u2013\u00a0<code>\/usr\/bin\/sendmail<\/code>, provided by almost all MTAs (postfix, exim, sendmail, courier). This is the traditional Unix way.<\/p>\n<p>Once a message is submitted through\u00a0<code>sendmail<\/code>, your MTA handles message transmission. Depending on configuration, it may either connect directly to the destination MTA (if on a server), or relay mail through another host (also called a smarthost) \u2013 the latter is more common on personal computers, where relaying through your Gmail or ISP\/work email account is essential.<\/p>\n<p>(Some MTAs such as\u00a0<code>esmtp<\/code>\u00a0or\u00a0<code>nullmailer<\/code>\u00a0are built specifically for home users and always use a relayhost. These don\u2019t support receiving mail and are a lot lighter on resources.)<\/p>\n<pre>mailx \u2192 \/usr\/bin\/sendmail \u2192 local MTA \u2192 recipient MTA \u2192 recipient inbox<\/pre>\n<pre>mailx \u2192 \/usr\/bin\/sendmail \u2192 local MTA \u2192 Gmail or ISP\/work servers \u2192 recipient MTA \u2192 recipient inbox<\/pre>\n<p>Other programs (mostly the user-friendly graphical clients such as Thunderbird or Outlook) connect directly to a relay SMTP server (again, usually Gmail or ISP\/work SMTP server), which transmits the message further.<\/p>\n<p>SMTP support is present in\u00a0<strong><code>heirloom-mailx<\/code><\/strong>, but not in the traditional\u00a0<code>bsd-mailx<\/code>.<\/p>\n<pre>app \u2192 Gmail or ISP\/work servers \u2192 recipient MTA \u2192 recipient inbox<\/pre>\n<p>The third method \u2013 directly to recipient\u2019s server \u2013 is almost\u00a0<strong>never<\/strong>\u00a0used, and no MUA supports it. On personal computers, using it would cause your message to get rejected (a lot of spam is sent from infected home user IP addresses).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Normally,\u00a0mail\u00a0and derivatives (and almost any other Unix MUA) use the traditional\u00a0sendmail\u00a0interface \u2013\u00a0\/usr\/bin\/sendmail, provided by almost all MTAs (postfix, exim, sendmail, courier). This is the traditional Unix way. Once a message is submitted through\u00a0sendmail, your MTA handles message transmission. Depending on configuration, it may either connect directly to the destination MTA (if on a server), or\u2026 <span class=\"read-more\"><a href=\"https:\/\/adriangrigoras.com\/blog\/smtp-relay\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-184","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/posts\/184","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/comments?post=184"}],"version-history":[{"count":1,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/posts\/184\/revisions"}],"predecessor-version":[{"id":185,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/posts\/184\/revisions\/185"}],"wp:attachment":[{"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/media?parent=184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/categories?post=184"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adriangrigoras.com\/blog\/wp-json\/wp\/v2\/tags?post=184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}