- Open terminal and type command
$ sudo apt get update
- To install Postfix type command
$ sudo apt-get install postfix
Press TAB and press ENTER
Choose 3rd option i.e Internet with smarthost. Press TAB than press ENTER.
- After that new screen appear
In this there is option called System mail name. Choose any name as i choose Ubuntu. Press TAB than press ENTER.
- Next screen which appear looks like this
Change SMTP relay host (blank for none): i.e where smtp.localdomain wriiten. Change that to “[smtp.gmail.com]:587” (without quotes). Press TAB and than press ENTER.
- When it run completely type command
$ sudo dpkg-reconfigure postfix
After pressing ENTER screen appear. Press TAB and than ENTER.
- After this new screen appears
Choose third step i.e Internet with smarthost. Press TAB and than ENTER.
- After this in next two new screens DO NOTHING. Keep these screens as it is, no change in this screens. Press TAB and than ENTER.
- No change in this screen too. Press TAB and than press ENTER.
- Choose ” NO ” option.
- In this after [::1]/128 type your IP address. If you want to use postfix default leave it as it is. Press TAB and then press ENTER.
- In this he asking you to MAILBOX SIZE LIMIT. Remain as it is i.e 0. Zero means no limit. Press TAB and than press ENTER.
- No change in this screen. Press TAB and than press ENTER.
- Choose ” ALL ” option. Press TAB and than press ENTER.
- After this go to
file system > etc > postfix
OPEN main.cf file and add following linessmtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/ssl/certs/Equifax_Secure_CA.pem
smtp_use_tls = yes
- In postfix folder add new empty file and type[smtp.gmail.com]:587 firstname.lastname@example.org:yourpasswordand save file as “sasl_passwd”