Postfix relayhost

If you want to use postfix to send email from your CentOS server, using an external smtp relay with authentication, these are few steps to do to your postfix base config.

1: INSTALL SASL MODULES AUTH

#yum install cyrus-sasl-sql cyrus-sasl-plain cyrus-sasl-lib

2: MODIFY /etc/postfix/main.cf FILE adding these lines (tested with aruba smtp server):

relayhost=smtp.server.com:25
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_mechanism_filter = plain,login
smtp_sasl_security_options =

3: CREATE /etc/postfix/sasl_passwd FILE WITH YOUR AUTH DATA:

smtp.server.com username:password

4: CREATE LOOKUP TABLE

postmap /etc/postfix/sasl_passwd

5: RESTART SERVICES

#service postfix restart

6: SEND YOUR EMAIL AND CHECK /var/log/maillog

Best regards 🙂

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *