Thursday 8 November 2018

How to Change Default MTA in CentOS 7

If there is two or more programs (sendmail, postfix, SSMTP and exim etc) are installed for MTA and required to change default MTA. CentOS 7 provide alternatives command to select a default MTA.

Change Default MTA: Run the below command and follow instructions to change default MTA:

[root@linuxcnf ~]# alternatives --config mta

There is 1 program that provides 'mta'.

  Selection    Command
*+ 1           /usr/sbin/sendmail.postfix
   2           /usr/sbin/sendmail.ssmtp

Enter to keep the current selection[+], or type selection number: 2
[root@linuxcnf ~]#

There are 2 programs which provide 'MTA'. Enter number 2 and press enter for ssmtp selection as a default MTA. Also stop the postfix service and disable to start on boot up.


  1. what is an mta?

  2. MTA from Wikipedia:
    Mail Transfer Agent
    Message Transfer Agent