Posted: Fri Nov 30, 2007 11:18 pm Post subject: Changing Default MTA between Postfix and Sendmail
As from SMS 1.3 Postfix is the default MTA.
Sendmail is still available if someone want to use it.
There aren't much things to do for changing between them,
but I have created a script for changing between those two in a second.
The Script
Code:
#!/bin/bash
if [ -x /etc/rc.d/rc.sendmail ]; then
echo Current MTA: Sendmail
else
echo Current MTA: Postfix
fi
PS3="Please Select MTA:"
LIST="Sendmail Postfix Exit"
select i in $LIST
do
if [ $i = "Sendmail" ]
then
chmod -x /etc/rc.d/rc.postfix-milter
chmod +x /etc/rc.d/rc.sendmail
cp /usr/sbin/sendmail /usr/sbin/sendmail.postfix
cp /usr/sbin/sendmail.original /usr/sbin/sendmail
postfix stop
/etc/rc.d/rc.sendmail start
echo Sendmail is now the default MTA
elif [ $i = "Postfix" ]
then
/etc/rc.d/rc.sendmail stop
chmod +x /etc/rc.d/rc.postfix-milter
chmod -x /etc/rc.d/rc.sendmail
cp /usr/sbin/sendmail /usr/sbin/sendmail.original
cp /usr/sbin/sendmail.postfix /usr/sbin/sendmail
postfix start
echo Postfix is now the default MTA
elif [ $i = "Exit" ]
then
exit;
fi
break
done
If you run the script you will get a prompt and which MTA is default at present.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum