Postfix – Relay via Gmail

Setting up Sendmail to relay public SMTP server such as Gmail is quite difficult. In the past, i just kept looking for the blog posts in Google and found that people have different ways to setup Sendmail, but not all of them could be repeated successfully in my setup. After so many trials and errors, i made the relay works but i couldn’t fully understand what’s going on in the setup.

So this time, no more Sendmail, i would like to use Postfix instead.
System:

OS: Ubuntu Lucid (Ubuntu 10.04)

1. Install the Postfix package. Select No configuration in the installation.

apt-get install postfix

2. Copy the config file to /etc/postfix

cp /usr/share/postfix/main.cf.debian /etc/postfix/main.cf

3. Install other required packages but they should be installed by default in Ubuntu Lucid.

Great tutorial. Only had one problem. I couldn’t complete the cat command. The error was: “/etc/postfix/cacert.pem: Permission denied”
I had to chmod the file to 666, and then I was able to complete the cat command. I did chmod it back to 644.

I am a library professional from India. I shared your post in Koha (koha-community.org) discussion forum. Many librarians made use your solution to send notices from Koha library management system. I express my thanks in favor of library professionals.

As many others have said, thank you so much for putting this up! Worked like a charm.

One question – right now when I get the email it shows that it’s from “root” (with the email address specified in sasl_passwd). What would I change to make that say something else like say, “Automated Server Message”?

Hello, on ubuntu 16.04 while configuring postfix for Koha Library management system, at this step,
cat /etc/ssl/certs/Equifax_Secure_CA.pem >> /etc/postfix/cacert.pem, it shows. cat: /etc/ssl/certs/Equifax_Secure_CA.pem: No such file or directory.
Is there anyway, to fix the issue and make postfix to send emails?