Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have just installed fresh CentOS 6 on my VPS and having trouble to change default MTA from Sendmail to Postfix.
Here is what I did
Code:
sudo alternatives --set mta /usr/sbin/postfix
/usr/sbin/postfix has not been configured as an alternative for mta
I even removed sendmail from the system and tried couple of times but nothing changed.Here is some more output
Code:
sudo alternatives --display mta
mta - status is auto.
link currently points to /usr/sbin/sendmail.postfix
/usr/sbin/sendmail.postfix - priority 30
slave mta-pam: /etc/pam.d/smtp.postfix
slave mta-mailq: /usr/bin/mailq.postfix
slave mta-newaliases: /usr/bin/newaliases.postfix
slave mta-rmail: /usr/bin/rmail.postfix
slave mta-sendmail: /usr/lib/sendmail.postfix
slave mta-mailqman: /usr/share/man/man1/mailq.postfix.1.gz
slave mta-newaliasesman: /usr/share/man/man1/newaliases.postfix.1.gz
slave mta-aliasesman: /usr/share/man/man5/aliases.postfix.5.gz
slave mta-sendmailman: /usr/share/man/man1/sendmail.postfix.1.gz
Current `best' version is /usr/sbin/sendmail.postfix.
As your output suggests, postfix is already your default mta. Did you 'chkconfig postfix on' ?
Apparently postfix is now default mta, but that have to do with removing sendmail package.If sendmail package present, I get
Code:
/usr/sbin/postfix has not been configured as an alternative for mta
when try to change.
Quote:
Try to install "system-switch-mail" package.
After as root run "system-switch-mail" Select default mail client you need to set.
Well, I can't install that package from CentOS6 default repos, simply yum can't find it, I've read somewhere that atlernatives command is preffered in CentOS6, not sure if the only way to change mta.
Yes, I know this reply is not relevant nor timely, but this came up in my Google search, and it did NOT have the answer to the question. Now it does.
Quote:
Originally Posted by greatdictator
Hello,
I have just installed fresh CentOS 6 on my VPS and having trouble to change default MTA from Sendmail to Postfix.
Here is what I did
Code:
sudo alternatives --set mta /usr/sbin/postfix
/usr/sbin/postfix has not been configured as an alternative for mta
I even removed sendmail from the system and tried couple of times but nothing changed.Here is some more output
Code:
sudo alternatives --display mta
mta - status is auto.
link currently points to /usr/sbin/sendmail.postfix
/usr/sbin/sendmail.postfix - priority 30
slave mta-pam: /etc/pam.d/smtp.postfix
slave mta-mailq: /usr/bin/mailq.postfix
slave mta-newaliases: /usr/bin/newaliases.postfix
slave mta-rmail: /usr/bin/rmail.postfix
slave mta-sendmail: /usr/lib/sendmail.postfix
slave mta-mailqman: /usr/share/man/man1/mailq.postfix.1.gz
slave mta-newaliasesman: /usr/share/man/man1/newaliases.postfix.1.gz
slave mta-aliasesman: /usr/share/man/man5/aliases.postfix.5.gz
slave mta-sendmailman: /usr/share/man/man1/sendmail.postfix.1.gz
Current `best' version is /usr/sbin/sendmail.postfix.
Anyone have suggestion what to do next ?
Reread the output you got. Yes, some of the advice upthread is valid, you don't need alternatives with only one MTA. But look again at what it said:
Current `best' version is /usr/sbin/sendmail.postfix.
You typed:
sudo alternatives --set mta /usr/sbin/postfix
and the error was:
/usr/sbin/postfix has not been configured as an alternative for mta
However, /usr/sbin/sendmail.postfix is indeed a choice if you do need to use alternatives. The right answer:
Code:
alternatives --set mta /usr/sbin/sendmail.postfix
(Use sudo(1) or other means of gaining root privilege as needed.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.