Avatar of mw-expert
mw-expert
 asked on

Setting up Postfix to EXCLUSIVELY use a remote SMTP server, for sending mail ... on Redhat 9


Hi guys,

I'm using Redhat Linux 9.0 - with POSTFIX. I'm certainly not a Linux GURU.

My system is correctly setup and I can send and receive emails (from/to outside world)

I would like to set up my postfix to EXCLUSIVELY use an outside server for sending mail (SMTP)
All client applications would send mails to my server, just as usual,  and Postfix would relay them
using the outside SMTP server ...

My EXTERNAL smtp server requires authentication with user/pass.

Which config files do I need to update?  Please, provide max details, if required.

Thanks!

Linux

Avatar of undefined
Last Comment
collins23

8/22/2022 - Mon
collins23

put this line in /etc/postfix/main.cf                    

> relayhost = [external_host]
> smtp_sasl_auth_enable = yes
> smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
> smtp_sasl_security_options = noanonymous
>smtp_sasl_security_options =

relayhost is the host to which you are forwading all mail

sasl_password should contain

dom.ain        username:password
ASKER CERTIFIED SOLUTION
collins23

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck