[CentOS] setting up postfix

Larry Martell larry.martell at gmail.com
Wed Oct 17 02:43:32 UTC 2012


On Tue, Oct 16, 2012 at 12:03 PM, Benjamin Hackl <b.hackl at focusmr.com> wrote:
> On Tue, 16 Oct 2012 11:19:09 -0600
> Larry Martell <larry.martell at gmail.com> wrote:
>
>> I really don't know the answer to that question. The scenario is that
>> they run a django based web app, and they wanted me to add a password
>> recovery feature to it. When I did that, and it tried to send the
>> recovery link to the user, it failed with 'SMTPServerDisconnected.' I
>> thought, of course, there is no SMTP server running, so I set upon
>> getting postfix running. As I said in my initial post, I've never done
>> that before. I'm a developer, not an admin ;-)
>
> Ok. You might try to use a smarthost, that's the outgoing smtp
> server of your company.
>
> /etc/postfix/main.cf should look like this
> myorigin=yourdomain.com
> relayhost=smtp.of.yourdomain.com
> #inet_interfaces=loopback-only
> local_transport=error: disabled
>
> And then
> service postfix reload
>
>
> If you need authentification (e.g. username + password) append the
> following additional lines into main.cf
>
> smtp_sasl_auth_enable=yes
> smtp_sasl_security_options=noanonymous
> # see
> #smtp_sasl_mechanism_filter=plain
> #debug_peer_list=smtp.of.yourdomain.com
> #debug_peer_level=3
> #smtp_use_tls=yes
> smtp_sasl_password_maps=hash:/etc/postfix/relay_password
>
> Write the following line in /etc/postfix/relay_password
> smtp.of.yourdomain.com  username:password
>
> Create the database with
>
> postmap /etc/postfix/relay_password
>
> the debug options might help you if there is some trouble sending mail
> (log file). Always check the postfix queue with
>
> postqueue -p
>
> and your mailserver log
>
> /var/log/maillog
>
> Note: For authentication you probably need the cyrus-sasl and
> cyrus-sasl-* packages.

Thanks for the info everyone. I am going out of town for 3 weeks. My
client is going to try this on their client's system. I'll revisit
this and post when I get back.



More information about the CentOS mailing list