Amazon Linux AMI: How to replace sendmail with postifx?

3

Apologies in advance for my nub question.

Been using the Amazon EC2 Linux AMI and enjoying it.

It comes configured with sendmail. I think I'd rather use postfix.

I hoped replacing sendmail with postfix might be as simple as what I found searching online:

$ rpm -e sendmail
$ yum install postfix.

However rpm complains:

$ rpm -e sendmail
error: Failed dependencies:
        smtpdaemon is needed by (installed) mdadm-2.6.9-3.7.amzn1.i386

I'd be grateful for any guidance how to proceed.

Thank you.

Greg Hendershott

Posted 2011-03-09T02:36:42.840

Reputation: 277

Answers

3

Install postfix first, then remove sendmail. Or use yum shell to do both at once.

sudo yum install postfix
sudo yum erase sendmail

This will replace sendmail with postfix in your EC2 instance and will not remove other important dependencies when removing sendmail.

Ignacio Vazquez-Abrams

Posted 2011-03-09T02:36:42.840

Reputation: 100 516

Or rpm -e --nodeps sendmail. – user1686 – 2011-03-09T09:45:36.103

1

Use this to change default mail transfer agent, if you dont want to remove sendmail package and switch between sendmail and postfix.

"alternatives --config mta"

xs2rashid

Posted 2011-03-09T02:36:42.840

Reputation: 161