• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 508
  • Last Modified:

Converting Sendmail to Postfix on RHEL 4

Im running a RHEL4 server with Sendmail. I want to convert it to Postfix but the easy way which is with the system-switch-mail-nox command doesnt exist because i dont have the redhat-switch RPM and can seem to find it.

Can someone let me know where i can find this RPM for 32-Bit or how i would go about doing the switch over.

Thanks!
0
linuxpig
Asked:
linuxpig
  • 2
  • 2
1 Solution
 
bevhostCommented:
Should be in your CD's that came with your RHEL4.
You can download the src rpm frm here and rebuild it for your system

wget ftp://ftp.redhat.com/pub/redhat/linux/enterprise/4/en/os/i386/SRPMS/system-switch-mail-0.5.25-3.src.rpm
rpm -i system-switch-mail-0.5.25-3.src.rpm
cd /usr/src/redhat/SPECS
rpmbuild -ba system-switch-mail
0
 
linuxpigAuthor Commented:
ok so i did what you suggested, i ran rpmbuild -ba system-switch-mail.spec and it ran through its steps. But when i do a rpm -qa|grep system-switch-mail, nothing comes up. What am i missing?
0
 
linuxpigAuthor Commented:
D'OH! I answered my own question. So anyway, can you break down what changes system-switch-mail actually does when changing from sendmail to postfix? It would be great to know. Thanks for all your help!
0
 
bevhostCommented:
See
/usr/share/system-switch-mail/functions.py

def switch(i):
    if i == SENDMAIL:
        os.system('/usr/sbin/alternatives --set mta /usr/sbin/sendmail.sendmail')
        os.system('/sbin/service postfix stop 2>/dev/null >/dev/null')
        os.system('/sbin/service exim stop 2>/dev/null >/dev/null')
        os.system('/sbin/service sendmail start 2>/dev/null >/dev/null')
    elif i == POSTFIX:
        os.system('/usr/sbin/alternatives --set mta /usr/sbin/sendmail.postfix')
        os.system('/sbin/service sendmail stop 2>/dev/null >/dev/null')
        os.system('/sbin/service exim stop 2>/dev/null >/dev/null')
        os.system('/sbin/service postfix start 2>/dev/null >/dev/null')
    elif i == EXIM:
        os.system('/usr/sbin/alternatives --set mta /usr/sbin/sendmail.exim')
        os.system('/sbin/service postfix stop 2>/dev/null >/dev/null')
        os.system('/sbin/service sendmail stop 2>/dev/null >/dev/null')
        os.system('/sbin/service exim start 2>/dev/null >/dev/null')

Open in new window

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now