Hi, I want to build a spam gateway for my mail server using postfix. I issued an rpm -e sendmail and got the following output:
# rpm -e sendmail error: Failed dependencies: /usr/sbin/sendmail is needed by (installed) redhat-lsb-3.1-12.2.EL.el5.centos.i386 smtpdaemon is needed by (installed) mutt-1.4.2.2-3.el5.i386 smtpdaemon is needed by (installed) fetchmail-6.3.6-1.el5.i386 smtpdaemon is needed by (installed) mdadm-2.5.4-3.el5.i386
How does one replace sendmail with postfix (I am hoping to install from source using the latest version)?
Thanks! jlc
Hi, I want to build a spam gateway for my mail server using postfix. I issued an rpm -e sendmail and got the following output:
# rpm -e sendmail
error: Failed dependencies:
/usr/sbin/sendmail is needed by (installed) redhat-lsb-3.1-12.2.EL.el5.centos.i386
smtpdaemon is needed by (installed) mutt-1.4.2.2-3.el5.i386
smtpdaemon is needed by (installed) fetchmail-6.3.6-1.el5.i386
smtpdaemon is needed by (installed) mdadm-2.5.4-3.el5.i386
How does one replace sendmail with postfix (I am hoping to install from source using the latest version)?
Thanks! jlc
You could
yum remove sendmail
then you could
yum install ********whatever****
- rh
On Sat, 2007-12-01 at 20:43 -0800, Robert - elists wrote:
Hi, I want to build a spam gateway for my mail server using postfix. I issued an rpm -e sendmail and got the following output:
# rpm -e sendmail
error: Failed dependencies:
/usr/sbin/sendmail is needed by (installed)
redhat-lsb-3.1-12.2.EL.el5.centos.i386
smtpdaemon is needed by (installed) mutt-1.4.2.2-3.el5.i386 smtpdaemon is needed by (installed) fetchmail-6.3.6-1.el5.i386 smtpdaemon is needed by (installed) mdadm-2.5.4-3.el5.i386
How does one replace sendmail with postfix (I am hoping to install from source using the latest version)?
Thanks! jlc
You could
yum remove sendmail
then you could
yum install ********whatever****
---- yum install postfix switch-mail switch-mail #change to postfix then you could probably remove sendmail (never tried)
Craig
yum install postfix switch-mail switch-mail #change to postfix then you could probably remove sendmail (never tried)
Craig
Am I correct in assuming the latest version of sendmail from the repo is 2.3.3-2? I was hoping to use 2.5 and wanted to install it via source. Is it safe to install that way and run switch-mail after?
The other posts never mentioned switch-mail, is it ran by the system under certain scenarios?
Thanks! jlc
On Sat, 2007-12-01 at 22:58 -0700, Joseph L. Casale wrote:
yum install postfix switch-mail switch-mail #change to postfix then you could probably remove sendmail (never tried)
Craig
Am I correct in assuming the latest version of sendmail from the repo is 2.3.3-2? I was hoping to use 2.5 and wanted to install it via source. Is it safe to install that way and run switch-mail after?
The other posts never mentioned switch-mail, is it ran by the system under certain scenarios?
---- I doubt that there would be much purpose for installing/using switch-mail if you are going to use source instead of standard packages since the point of switch-mail is to enable the postfix package itself.
That said, I don't know why one would use CentOS and then compile postfix from source packages and then have to assume all responsibility for updates.
Craig
That said, I don't know why one would use CentOS and then compile postfix from source packages and then have to assume all responsibility for updates.
Craig
Well, mainly because CentOS is the distro I have decided to use while learning Linux and that version of Postfix is the one I need to experiment with :) During compilation, it stated it handles switching over to postfix on its own! Maybe life is just that easy sometimes, heh...
Thanks! jlc
--On Sunday, December 02, 2007 10:06 AM -0700 "Joseph L. Casale" jcasale@ActiveNetwerx.com wrote:
That said, I don't know why one would use CentOS and then compile postfix from source packages and then have to assume all responsibility for updates.
Craig
Well, mainly because CentOS is the distro I have decided to use while learning Linux and that version of Postfix is the one I need to experiment with :)
Then take the version of Postfix that's required, the Postfix SRPM from CentOS, and adapt the SRPM to use the later Postfix tarball. You might check Fedora, as it may have this already done. (An SRPM is a source package, so you'd be "building from source" while still using the distro package manager.)
Then take the version of Postfix that's required, the Postfix SRPM from CentOS, and adapt the SRPM to use the later Postfix tarball. You might check Fedora, as it may have this already done. (An SRPM is a source package, so you'd be "building from source" while still using the distro package manager.)
Kenneth, I appreciate the pointer, but that's all way over my level of experience at the moment! Hopefully you can clarify a few extra questions for me :)
I assume when you use the package manager to install an application it takes care of creating users for services and all other related requirements, or is just a matter of tracking the installed programs files for later removal or interference with another installed program? A quick search on the net suggested yum was a better tool to use as it handled downloading and additional dependencies? I assume yum can't be used for this scenario?
Looking around, I found the following file: http://mirror.centos.org/centos/5.0/os/SRPMS/postfix-2.3.3-2.src.rpm which I assume is what you referred to, I don't mind reading on my own but can you nudge me in the right direction to learn how to adapt this srpm to use the tarball I am interested in? I read that building the rpm from source as a mortal user is advised as the forum suggested "so processes are unnecessarily running as root from the newly created binary, its more secure"? Does the newly built rpm actually change behavior once installed depending on who built it, or was that merely related to process for the build only while compiling?
Thanks for your help! jlc
--On Sunday, December 02, 2007 3:11 PM -0700 "Joseph L. Casale" jcasale@ActiveNetwerx.com wrote:
I assume when you use the package manager to install an application it takes care of creating users for services and all other related requirements, or is just a matter of tracking the installed programs files for later removal or interference with another installed program? A quick search on the net suggested yum was a better tool to use as it handled downloading and additional dependencies? I assume yum can't be used for this scenario?
A package is built using a "spec" file, which can be thought of as a meta-Makefile. It has the RPM header info (author, URL, description, etc.) and describes the sequence of operations to unpack the tarball, apply any patches, configure and make, install to a (user-owned) directory tree mirroring the final installation location, and then archive the whole mess up into a binary RPM. It also optionally includes scripts to run before and after install/uninstall. You can add logic here to add users and start/stop services. All of this is done as non-root, and file ownership information (eg. special user or root) is written in the binary RPM.
Later, root installs the binary RPM and the files are installed to their final location, with the requested ownership and access rights. The scripts are run to perform any special setup/takedown and the file list and header is written to the host's RPM database.
Looking around, I found the following file: http://mirror.centos.org/centos/5.0/os/SRPMS/postfix-2.3.3-2.src.rpm which I assume is what you referred to, I don't mind reading on my own but can you nudge me in the right direction to learn how to adapt this srpm to use the tarball I am interested in? I read that building the rpm from source as a mortal user is advised as the forum suggested "so processes are unnecessarily running as root from the newly created binary, its more secure"? Does the newly built rpm actually change behavior once installed depending on who built it, or was that merely related to process for the build only while compiling?
It's not real difficult. This seems to be a good starting place:
http://fedoraproject.org/wiki/Docs/Drafts/BuildingPackagesGuide
Check that out and start a new thread on the centos-devel list with any questions.
On Monday, December 03, 2007 11:22 AM -0800 Kenneth Porter shiva@sewingwitch.com wrote:
It's not real difficult. This seems to be a good starting place:
http://fedoraproject.org/wiki/Docs/Drafts/BuildingPackagesGuide
Check that out and start a new thread on the centos-devel list with any questions.
Better link (just updated to include the above link):
On Sat, 2007-12-01 at 21:32 -0700, Joseph L. Casale wrote:
[...] How does one replace sendmail with postfix (I am hoping to install from source using the latest version)?
first install postfix using yum, then remove sendmail.
# rpm -e sendmail
error: Failed dependencies:
/usr/sbin/sendmail is needed by (installed)
redhat-lsb-3.1-12.2.EL.el5.centos.i386
smtpdaemon is needed by (installed) mutt-1.4.2.2-3.el5.i386 smtpdaemon is needed by (installed) fetchmail-6.3.6-1.el5.i386 smtpdaemon is needed by (installed) mdadm-2.5.4-3.el5.i386
pls try
rpm -e sendmail --nodeps
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Mon, 2007-12-03 at 07:59 +0530, Indunil Jayasooriya wrote:
# rpm -e sendmail error: Failed dependencies: /usr/sbin/sendmail is needed by (installed) redhat-lsb-3.1-12.2.EL.el5.centos.i386 smtpdaemon is needed by (installed) mutt-1.4.2.2-3.el5.i386 smtpdaemon is needed by (installed) fetchmail-6.3.6-1.el5.i386 smtpdaemon is needed by (installed) mdadm-2.5.4-3.el5.i386
pls try
rpm -e sendmail --nodeps
---- sounds like an easy way to kill a perfectly good running server
Craig
On Sun, 2 Dec 2007, Joseph L. Casale wrote:
pls try
rpm -e sendmail --nodeps
sounds like an easy way to kill a perfectly good running server
Craig
Lol, boy oh boy, am I in for long journey ;)
What is it you are trying to accomplish?
--nodeps is almost always the WRONG answer.
Regards,
What is it you are trying to accomplish?
--nodeps is almost always the WRONG answer.
Well, just starting my adventure in learning Linux. My immediate need is a spam gateway, and all the how-to's I find are for distributions I either don't want to use or are very old, not to mention just copying commands isn't an effective way to learn. I have decided to stick with CentOS and learn using it, that being said I have loosely decided on a few apps to use for this server: postfix, amavisd-new, clamav and spam assassin. I was hoping to setup a minimal install and start from there, which brought up an interesting scenario. When installing basically nothing except text internet, editors and base, I unchecked sendmail and noticed exim was automatically installed (even though it's not even an option)! Fortunately I am using esx and creating vm's and snapping them to test stuff makes learning very easy! I wonder if base is not even selected if any MTA is installed?
Thanks for the pointer on --nodeps (I can see why that logically can be a problem).
jlc
On Sun, 2007-12-02 at 20:33 -0700, Joseph L. Casale wrote:
What is it you are trying to accomplish?
--nodeps is almost always the WRONG answer.
Well, just starting my adventure in learning Linux. My immediate need is a spam gateway, and all the how-to's I find are for distributions I either don't want to use or are very old, not to mention just copying commands isn't an effective way to learn. I have decided to stick with CentOS and learn using it, that being said I have loosely decided on a few apps to use for this server: postfix, amavisd-new, clamav and spam assassin. I was hoping to setup a minimal install and start from there, which brought up an interesting scenario. When installing basically nothing except text internet, editors and base, I unchecked sendmail and noticed exim was automatically installed (even though it's not even an option)! Fortunately I am using esx and creating vm's and snapping them to test stuff makes learning very easy! I wonder if base is not even selected if any MTA is installed?
Thanks for the pointer on --nodeps (I can see why that logically can be a problem).
---- There really isn't a problem having sendmail installed when you run postfix...it's just that some packages depend upon some sendmail bits...mostly for local delivery.
If you're just starting out on Linux, there doesn't seem to be much of a reason to install postfix or anything else from source.
Enable rpmforge repo...
yum install clamav clamav-db amavisd-new postfix switch-mail
and start configuring...easy, done.
yum update (gets updated versions as they come out)
if you install from source, you lose all of the goodness of automatic updates
Craig
Joseph L. Casale wrote:
What is it you are trying to accomplish?
--nodeps is almost always the WRONG answer.
Well, just starting my adventure in learning Linux. My immediate need is a spam gateway, and all the how-to's I find are for distributions I either don't want to use or are very old, not to mention just copying commands isn't an effective way to learn. I have decided to stick with CentOS and learn using it, that being said I have loosely decided on a few apps to use for this server: postfix, amavisd-new, clamav and spam assassin. I was hoping to setup a minimal install and start from there, which brought up an interesting scenario. When installing basically nothing except text internet, editors and base, I unchecked sendmail and noticed exim was automatically installed (even though it's not even an option)! Fortunately I am using esx and creating vm's and snapping them to test stuff makes learning very easy! I wonder if base is not even selected if any MTA is installed?
Thanks for the pointer on --nodeps (I can see why that logically can be a problem).
I think the underlying problem here is that you're using rpm rather than the yum package management system (which is what CentOS "wants"). Installing/removing things willy nilly with rpm is going to get you into trouble unless you really know what you're doing (and you've indicated that you don't...hehe).
Removing sendwhale is as simple as "yum remove sendmail". It will warn you if there are any dependencies and you can go from there. I generally remove sendmail first thing and then do "yum install postfix". Once postfix is installed you can season it to taste by visiting the config files in /etc/postfix. There are numerous guides out there on how to configure postfix to filter spam and/or work with outside applications to do the deed. You might want to start off by skimming through Johnny Hughes' instructions for installing various mail bits here:
http://www.hughesjr.com/content/category/4/15/29/
and then try reading through stuff like this:
http://www.howtoforge.com/linux_spam_filter_mail_gateway
Once you've gotten things up and working you can spend some "quality time" delving into the minutiae. Personally, I like to avoid hand compiling anything these days (to the extent possible), as it really simplifies upgrades and potential conflicts down the road. Between the base install and the extras repository, you should have most, if not all, of what you need to build a reasonably effective spam trap.
Good luck!
on 12/2/2007 6:29 PM Indunil Jayasooriya spake the following:
# rpm -e sendmail error: Failed dependencies: /usr/sbin/sendmail is needed by (installed) redhat-lsb-3.1-12.2.EL.el5.centos.i386 smtpdaemon is needed by (installed) mutt-1.4.2.2-3.el5.i386 smtpdaemon is needed by (installed) fetchmail-6.3.6-1.el5.i386 smtpdaemon is needed by (installed) mdadm-2.5.4-3.el5.i386
pls try
rpm -e sendmail --nodeps
No --- Don't --- Install another MTA before you try to remove sendmail. Warned you have been!
Yohoo!
# rpm -e sendmail error: Failed dependencies:
rpm -e sendmail --nodeps
No --- Don't --- Install another MTA before you try to remove sendmail.
Where's the difference?
Christian Volker Technical Support Engineer
---------------------------------------- Ballincollig, Co. Cork Ireland
Christian Volker wrote:
Yohoo!
# rpm -e sendmail error: Failed dependencies:
rpm -e sendmail --nodeps
No --- Don't --- Install another MTA before you try to remove sendmail.
Where's the difference?
Using --nodeps can break stuff.
Instead to:
yum install postfix
then,
yum remove sendmail (if necessary)
On Dec 3, 2007 11:50 AM, Christian Volker cvolker@vmware.com wrote:
Yohoo!
# rpm -e sendmail error: Failed dependencies:
rpm -e sendmail --nodeps
No --- Don't --- Install another MTA before you try to remove sendmail.
Where's the difference?
Christian Volker Technical Support Engineer
Because using nodeps is a bad habit to get into, and can easily break things. If you install postfix first, then remove sendmail, everything will be happy and you don't have to worry about it. You won't be introducing possible unknowns into the system.
No --- Don't --- Install another MTA before you try to remove sendmail. Warned you have been!
Well, unless you install postfix first, then system-switch-mail, then execute switch-mail, how does the stuff that needs sendmail know what to use? If you take out sendmail first, it removes other dependent stuff, but if you install postfix and the switch-mail util, when you remove sendmail it goes away without complaint.
Thanks! jlc
Joseph L. Casale wrote:
No --- Don't --- Install another MTA before you try to remove sendmail. Warned you have been!
Well, unless you install postfix first, then system-switch-mail, then execute switch-mail, how does the stuff that needs sendmail know what to use? If you take out sendmail first, it removes other dependent stuff, but if you install postfix and the switch-mail util, when you remove sendmail it goes away without complaint.
'Stuff that needs sendmail' normally executes a command named sendmail, usually as /usr/sbin/sendmail. Installing postfix will supply one, and system-switch-mail manipulates which one is active if you have both through a symlink scheme. If you try to run something that needs sendmail without a working /usr/bin/sendmail program, it will fail to deliver anything but your system won't crash and burn.
On Mon, Dec 03, 2007 at 10:04:30AM -0700, Joseph L. Casale wrote:
Well, unless you install postfix first, then system-switch-mail, then execute switch-mail, how does the stuff that needs sendmail know what to use?
This is the "alternatives" system at work. /usr/sbin/sendmail is a symlink to /etc/alternatives/sendmail. The "alternatives" system will manage the /etc/alternatives/sendmail symlink, so that if your mail system is configured as "sendmail" then it points to /usr/sbin/sendmail.sendmail which is the _actual_ sendmail command provided by the sendmail RPM package. If your mail system is postfix then it points to /usr/sbin/sendmail.postfix instead.
On Mon, 03 Dec 2007 10:04:30 -0700, Joseph wrote:
No --- Don't --- Install another MTA before you try to remove sendmail. Warned you have been!
Well, unless you install postfix first, then system-switch-mail, then execute switch-mail, how does the stuff that needs sendmail know what to use?
But you only need switch-mail if you have both Sendmail and Postfix, right? IOW, if you want to use Postfix exclusively, you could just install Postfix and remove Sendmail. That's what I did, and my mail system is working just fine.
Miark