How to configure Postfix mail on Red Hat Linux?

5,479

First of all, if your system has a network connection and a local installed mailserver (e.g. Postfix, Sendmail or qmail), you can already send mail without a smart relay.

If for some reason you need a smart relay, you must set it up as it should be. In your situtation your relay server demands SMTP auth with TLS. This means that you should set up your mail server (Postfix) to authenticate correctly with this relay.

To sum up:

  1. Ensure that you provided the right "hostname user:password" in this command:

    echo "smtp.gmail.com smtp_user:smtp_passwd" > /etc/postfix/sasl_passwd
    
  2. Ensure that you have the crt key required and set the smtp_tls_CAfile parameter to its location, e.g.:

    smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
    
Share:
5,479

Related videos on Youtube

Carl B
Author by

Carl B

Updated on September 18, 2022

Comments

  • Carl B
    Carl B over 1 year

    I am trying to configure Postfix on Red Hat Linux to send email with the following command:

    mail -s "test" [email protected]
    

    I have followed all the steps mentioned in this tutorial and have changed relay host configuration as follows:

    relayhost = 10.16.47.22
    

    where 10.16.47.22 is my mail server's IP address.

    But it doesn't work. The log file says:

    Mar 13 18:14:31 localhost postfix/smtp[3322]: warning:
    10.16.47.22[10.16.47.22]:25 offered null AUTH mechanism list
    Mar 13 18:14:31 localhost postfix/smtp[3322]: certificate verification failed for 10.16.47.2210.16.47.22]:25: untrusted issuer
    Mar 13 18:14:31 localhost postfix/smtp[3322]: 599C44A1AE9: to=, relay=10.16.47.22[10.16.47.22]:25,
    delay=9001, delays=9001/0.11/0.03/0, dsn=4.7.5, status=deferred
    (Server certificate not trusted)

    What could be the problem and how can I fix it?