email notification setting in ubuntu using postfix

Usage example: 
mail -s 'Error Report' username@example.com < /tmp/message.txt

First, on a system have no mail cmd. "mailutils" needs to be installed.
sudo apt-get install mailutils

I use the postfic-mailx solution. 

Install process:
sudo apt-get install postfix
After the installation is started, some windows will pop up and you need to select options as below:
1. Internet Site
2. Modify the server name when sending an email. You can of course use the default value.

Configuration process:
sudo dpkg-reconfigure postfix
then need to select options as below for the configuration: 
detail guideline here:

And if postfix is already installed by other installation in the system, then it may be lack of /etc/postfix/main.cfconfig file, then you still need to run cmd below to complete the configuration for email (you can also manually add the config file, but seems still need to run the cmd below to select the 1st option: internet Site ) :
sudo dpkg-reconfigure postfix
and select the options as listed above.

After the configuration, you may need to reload the config by using:
sudo /etc/init.d/postfix reload
Or the reload may be auto started after the configuration by itself. 

Comments

  1. https://www.digitalbrolly.com/doubleclick-for-publishers-training/#aboutCourse

    ReplyDelete

Post a Comment

Popular posts from this blog

install postgreSQL in ubuntu 16.04

timestamp with 16, 13 and 10 digits to Qlik date

install ipython in Cloudera VM using pip