<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>IT notes - postfix</title>
    <subtitle>DBRE, AWS platform engineering, PostgreSQL, Linux, FreeBSD, and Rust reference notes.</subtitle>
    <link rel="self" type="application/atom+xml" href="https://nbari.com/tags/postfix/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://nbari.com"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2019-11-23T17:19:02+01:00</updated>
    <id>https://nbari.com/tags/postfix/atom.xml</id>
    <entry xml:lang="en">
        <title>postfix version</title>
        <published>2019-11-23T17:19:02+01:00</published>
        <updated>2019-11-23T17:19:02+01:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://nbari.com/postfix-version/"/>
        <id>https://nbari.com/postfix-version/</id>
        
        <content type="html" xml:base="https://nbari.com/postfix-version/">&lt;p&gt;In &lt;code&gt;Postfix&lt;/code&gt; there is no &lt;code&gt;-v&lt;/code&gt; or &lt;code&gt;--vesion&lt;/code&gt;, to find the version run:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;$ postconf mail_version&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>sasl_username</title>
        <published>2018-02-24T09:32:04+01:00</published>
        <updated>2018-02-24T09:32:04+01:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://nbari.com/sasl-username/"/>
        <id>https://nbari.com/sasl-username/</id>
        
        <content type="html" xml:base="https://nbari.com/sasl-username/">&lt;p&gt;Find users sending email:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;tail -F /var/log/all.log | grep -i sasl_username&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
        
    </entry>
    <entry xml:lang="en">
        <title>smarthost</title>
        <published>2017-04-26T10:38:23+02:00</published>
        <updated>2017-04-26T10:38:23+02:00</updated>
        
        <author>
          <name>Unknown</name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://nbari.com/smarthost/"/>
        <id>https://nbari.com/smarthost/</id>
        
        <content type="html" xml:base="https://nbari.com/smarthost/">&lt;h1 id=&quot;smarthost-with-postfix&quot;&gt;&lt;a class=&quot;zola-anchor&quot; href=&quot;#smarthost-with-postfix&quot; aria-label=&quot;Anchor link for: smarthost-with-postfix&quot;&gt;🔗&lt;/a&gt;Smarthost with postfix&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;A smart host is a type of email message transfer agent that allows a Simple
Mail Transfer Protocol (SMTP) server to route email to an intermediate
mailserver rather than directly to the recipient&#39;s server&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;https://en.wikipedia.org/wiki/Smart_host&lt;/p&gt;
&lt;p&gt;Setup postfix to forward all emails using an external SMTP server, for example
sendgrid.net, &lt;code&gt;main.cf&lt;/code&gt;:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;smtp_sasl_auth_enable = yes&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;smtp_sasl_password_maps = static:username:password&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;smtp_sasl_security_options = noanonymous&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;smtp_tls_security_level = encrypt&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;header_size_limit = 4096000&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;relayhost = [smtp.sendgrid.net]:587&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Within a VPC or private network you can open relay to all your class:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;mynetworks_style = class&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Some tunings:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;smtp_connect_timeout = 5&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;smtp_helo_timeout = 5&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;disable_dns_lookups = yes&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To check list of queued mail:&lt;/p&gt;
&lt;pre class=&quot;giallo z-code&quot; &gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;postqueue -p&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content>
        
    </entry>
</feed>
