| Red Hat This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
02-14-2012, 10:23 AM
|
#1
|
|
LQ Newbie
Registered: Feb 2012
Posts: 6
Rep: 
|
Can't change default MTA - Centos 6
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 ?
|
|
|
|
02-14-2012, 03:37 PM
|
#2
|
|
Senior Member
Registered: Aug 2009
Posts: 3,497
|
As your output suggests, postfix is already your default mta. Did you 'chkconfig postfix on' ?
|
|
|
1 members found this post helpful.
|
02-15-2012, 12:10 AM
|
#3
|
|
LQ Newbie
Registered: Jun 2010
Location: Colombo
Posts: 3
Rep:
|
Try to install "system-switch-mail" package.
After as root run "system-switch-mail" Select default mail client you need to set.
|
|
|
|
02-15-2012, 06:25 AM
|
#4
|
|
LQ Newbie
Registered: Feb 2012
Posts: 6
Original Poster
Rep: 
|
Quote:
|
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.
|
|
|
|
02-15-2012, 06:45 AM
|
#5
|
|
Senior Member
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,159
|
check whether this package is already installed
Code:
#rpm -q system-switch-mail
or you can manually download the package from here
ftp://ftp.redhat.com/redhat/linux/en...r/en/os/SRPMS/
once you install this simply run this command
Code:
#system-switch-mail
and you will be asked for your default MTA
|
|
|
|
02-16-2012, 03:45 PM
|
#6
|
|
Senior Member
Registered: Aug 2009
Posts: 3,497
|
You don't have to use alternatives unless you have multiple mta's installed and want to switch between them, if you just want postfix then:
Code:
yum erase sendmail
chkconfig postfix on
service postfix start
|
|
|
|
09-12-2012, 01:44 AM
|
#7
|
|
LQ Newbie
Registered: Sep 2009
Location: Alabama, USA
Distribution: Slackware
Posts: 9
Rep:
|
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.)
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:50 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|