Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
SMS Forum Index » Tips, Tricks & Tutorials

Post new topic   This topic is locked: you cannot edit posts or make replies.
Changing Default MTA between Postfix and Sendmail
View previous topic :: View next topic  
Author Message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1743
Location: Greece

PostPosted: Fri Nov 30, 2007 11:18 pm    Post subject: Changing Default MTA between Postfix and Sendmail Reply with quote

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.

Code:
Current MTA: Postfix
1) Sendmail
2) Postfix
3) Exit
Please Select MTA:


gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    SMS Forum Index » Tips, Tricks & Tutorials All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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

SMS - Superb! Mini Server Project © 2016
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional