Two Sendmails installed on Ubuntu 8.0.4LTS?

8 posts / 0 new
Last post
#1 Tue, 11/04/2008 - 01:31
VyouFinder

Two Sendmails installed on Ubuntu 8.0.4LTS?

Ok, so I have been trying to get my sendmail to send mail from my server and there is much more in detail about this here:

http://www.virtualmin.com/forums/virtualmin/sendmail--receiving-ok-not-s...

However, after much trial and error, it seems I've got two versions of sendmail installed. I can "sudo apt-get --purge remove sendmail" and watch sendmail get removed. I can try it again, and it will tell me that sendmail is not installed. I then reboot the machine, and watch sendmail start. When I go into Webmin, I can start and stop, configure, etc. sendmail as if there's no problem at all. If I try to uninstall again, it tells me it's not installed.... but there it is, running.

This I think started on a default install of Ubuntu server and Webmin. When I installed Sendmail from the Ubuntu server install disk, Webmin didn't recognize it as being installed. I think what I did was to install it using Webmin, and that's probably how I got the two installs.

So my question is, how do I uninstall the version of sendmail that was installed through Webmin? Then which method of install should I use?

Tue, 11/04/2008 - 17:45
Joe
Joe's picture

Webmin uses apt-get to install any software on Ubuntu. There is nothing mysterious or different about it. When you say "installed through Webmin", you're just saying "installed through apt-get".

I have no idea how things got to the way they are. Hopefully someone else will have some idea on how to get your package manager straightened out, as I'm not an expert on apt-get/dpkg. I think Eric has good knowledge in the area, though...

And, using your native package manager (apt-get/dpkg, in this case) is always how I'm going to recommend installing any software, including sendmail. (Though I like Postfix, we also support Sendmail.)

--

Check out the forum guidelines!

Thu, 11/06/2008 - 01:35 (Reply to #2)
VyouFinder

Ok, thanks for the info..

I decided to do a clean install of Ubuntu 8.04lts, Webmin, and Virtualmin. This time I used the install.sh method of installing and I've got to say, that is slick guys. Wow. Piece of cake. Last time I used the standard (non debian) webmin, usermin, and virtualmin packages and doing it that way's kind of a bear.

Some questions though...

Postfix installed as the default MTA. The answer to any problem with configuring sendmail seems to be "install postfix instead" all over the net, so my question is, all my domains use php to access sendmail, can postfix somehow take-over the role of sendmail and fulfill my sendmail needs? If so, how? I can sedn or receive mail through the Webmin interface "read user mail" but my php scripts that use sendmail are not working. Is there a way to do this or do I just need to get sendmail working?

Then there's the new update packages or update all packages Virtualmin feature. When I use sudo-apt-get upgrade, I am told that two packages, linux kernel and linux kernel server have been held back from upgrading. In Virtualmin, I can update these but should I? If Ubuntu doesn't want to upgrade for some reason, should I do this via Virtualmin?

Next an observation: When I did a default Ubuntu install and Virtualmin, sendmail is still located in both /usr/sbin/sendmail and /usr/lib/sendmail.. I think it's part of Ubuntu that does that so my previous post definitely makes no sense now. You're right, I was reading the signs wrong.

Fri, 11/07/2008 - 08:09 (Reply to #3)
Joe
Joe's picture

<div class='quote'>Postfix installed as the default MTA. The answer to any problem with configuring sendmail seems to be &quot;install postfix instead&quot; all over the net, so my question is, all my domains use php to access sendmail, can postfix somehow take-over the role of sendmail and fulfill my sendmail needs? If so, how? I can sedn or receive mail through the Webmin interface &quot;read user mail&quot; but my php scripts that use sendmail are not working. Is there a way to do this or do I just need to get sendmail working?</div>

OK, so &quot;sendmail&quot; has two meanings. It means &quot;the MTA known as Sendmail&quot; and it also means &quot;the generic sendmail SMTP injection command on a UNIX system&quot;. Postfix provides a &quot;sendmail&quot; binary that is completely compatible with the &quot;sendmail&quot; provided by &quot;Sendmail&quot;. Confused yet? Yeah, that's OK. Just know that Postfix and Sendmail are identical as far as your PHP scripts are concerned. Do not fret over whether you're running Postfix or Sendmail from the perspective of the &quot;sendmail&quot; command.

<div class='quote'>In Virtualmin, I can update these but should I? If Ubuntu doesn't want to upgrade for some reason, should I do this via Virtualmin?</div>

You're asking the wrong people. We don't have any knowledge of the Ubuntu kernels. ;-)

<div class='quote'>Next an observation: When I did a default Ubuntu install and Virtualmin, sendmail is still located in both /usr/sbin/sendmail and /usr/lib/sendmail.. I think it's part of Ubuntu that does that so my previous post definitely makes no sense now. You're right, I was reading the signs wrong.</div>

Yes, it's almost impossible to <i>not</i> have a sendmail binary on a Linux system that has any MTA on it. This is the UNIX standard command for injecting mail into an SMTP server. Postfix has one, Sendmail has one, and I guess qmail and exim have one (though I'm less familiar with them).

<div class='quote'>but my php scripts that use sendmail are not working</div>

But, they were never working! We can't blame Postfix for that. ;-)

What's in the mail.log now when you try to send from one of your scripts?

--

Check out the forum guidelines!

Fri, 11/07/2008 - 08:31 (Reply to #4)
VyouFinder

Ya, I figured out the sendmail injection vs the program sendmail.. finally!

Thanks. I'm running a complete new installation with Postfix. As soon as I figured out I could use Postfix, the answer was obvious.

Wed, 11/05/2008 - 05:13
VyouFinder

Ok, that gives me a lot more information anyway and leads me to believe that I might have sendmail configured wrong in Webmin only now. Are there two programs, one as /usr/lib/sendmail and the other as /usr/sbin/sendmail ? Because that's what I have and starting either from the command line using either:

/usr/lib/sendmail -bd -q1h

/usr/sbin/sendmail -bd -q1h

works and starts something... not sure what is going on yet but maybe the first thing I should do is make sure my sendmail configuration is right.. Here's what I've got in Webmin's sendmail module configuration:

<b>Full path to sendmail.cf:</b> /etc/mail/sendmail.cf
<b>Sendmail M4 base directory:</b> /usr/share/sendmail/cf
<b>Full path to M4 config file:</b> /etc/mail/sendmail.mc
<b>Full path to sendmail pid files:</b> /var/run/sendmail/mta/sendmail.pid
<b>Command to start sendmail in server mode:</b> /usr/lib/sendmail -bd -q1h
<b>Sendmail command:</b> /usr/lib/sendmail

So, I am thinking I have at least one of my paths set incorrectly. When I install sendmail using apt-get the file, /usr/sbin/sendmail is the one that gets installed so I am thinking I should change my command to start sendmail and my path to sendmail to these.. correct? What about the others? What paths should I set for my Ubuntu 8.04lts installation? I want ot make sure these are right because I suspect they're not. Anyone have an Ubuntu machine they can tell me the correct paths I should be using?

Wed, 11/05/2008 - 23:28 (Reply to #6)
Joe
Joe's picture

Now that I've read a bit more about what's going on, I strongly suspect you're reading all the signals wrong here. ;-)

Ubuntu may be simply refusing to uninstall sendmail...it <i>is</i> an extremely important part of a UNIX system (having some sort of sendmail program...it doesn't necessarily have to be the traditional sendmail...Postfix provides a compatible sendmail executable, as well).

If Webmin is able to stop and start sendmail, then your paths are not incorrect.

Any reason why you didn't just use our automated install script, and avoid having a bunch of confusion over mail servers? It'd install and configure Postfix for virtual hosting use. (Ubuntu 8.04LTS is one of our supported systems in the installer.)

Manual installations can be challenging even for very experienced users.

--

Check out the forum guidelines!

Thu, 07/02/2009 - 17:43
VyouFinder

You said:

Any reason why you didn't just use our automated install script, and avoid having a bunch of confusion over mail servers?

The reason I did it manually was basically to learn more about it and gain a better understanding. Solving issues like this I suppose, and now I know about 100x more than I did a few months ago regarding mail server configurations. If you mess with something long enough, you're bound to learn something out of it right?

Topic locked