sendmail not autostarting at boot time?

Somehow I did something to Sendmail so it doesn’t autostart any more.

It is a 12.3 server-only install (SSH access, no X, no GUI):

**snap:/etc/mail #** suse_version openSUSE 12.3 (x86_64)
VERSION = 12.3
CODENAME = Dartmouth

This is what autoconfig says as suggested at http://www.linuxforums.org/forum/applications/3324-how-disable-sendmail-so-wont-get-started-up.html when searching for https://www.google.com/search?q=opensuse+sendmail+disabled:

**snap:/etc/mail #** chkconfig --list sendmail

Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.


sendmail                  0:off  1:off  2:off  **3:on**   4:off  **5:on**   6:off

This is what rcsendmail status says:

**snap:/etc/mail #** rcsendmail statusChecking for service sendmail:                                                                                                                                                                                                     **running**
sendmail.service - Sendmail Mail Transport Agent
	  Loaded: loaded (/usr/lib/systemd/system/sendmail.service; disabled)
	  Active: **active (running)** since Sun, 2015-01-04 02:14:15 CET; 1 weeks and 0 days ago
	 Process: 3528 ExecStart=/usr/sbin/sendmail $SENDMAIL_PORT_OPTS $SENDMAIL_ARGS (code=exited, status=0/SUCCESS)
	 Process: 3522 ExecStartPre=/etc/mail/system/sm.pre (code=exited, status=0/SUCCESS)
	 Process: 3519 ExecStartPre=/bin/echo Initializing SMTP port (sendmail) (code=exited, status=0/SUCCESS)
	Main PID: 3529 (sendmail)
	  CGroup: name=systemd:/system/sendmail.service
  └ 3529 sendmail: accepting connections

Where did I go wrong?
How can I make Sendmail autostart again?

–jeroen

What does it say if you do;
systemctl enable sendmail
systemctl status sendmail

Thanks. That works, but

  1. where is that config stored? Is it it really just links in the directory /etc/systemd/system/multi-user.target.wants?
  2. where is that in YaST?

As chkconfig still returns the same info, it looks like chkconfig isn’t smart enough:

**snap:/etc/mail #** chkconfig --list sendmail

Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.


sendmail                  0:off  1:off  2:off  **3:on**   4:off  **5:on**   6:off

But a plain chkconfig now does show it is on:

**snap:/etc/mail #** chkconfig sendmail
sendmail  on

Note: this was the result of the commands you indicated (and showing chkconfig marked it as off when not using the --list mode):

**snap:/etc/mail #** chkconfig sendmail
sendmail  off
**snap:/etc/mail #** systemctl enable sendmail
ln -s '/usr/lib/systemd/system/sendmail.service' '/etc/systemd/system/multi-user.target.wants/sendmail.service'
**snap:/etc/mail #** systemctl status sendmail
sendmail.service - Sendmail Mail Transport Agent
      Loaded: loaded (/usr/lib/systemd/system/sendmail.service; enabled)
      Active: **active (running)** since Sun, 2015-01-04 02:14:15 CET; 1 weeks and 0 days ago
    Main PID: 3529 (sendmail)
      CGroup: name=systemd:/system/sendmail.service
  └ 3529 sendmail: accepting connections

–jeroen

It creates symlinks there for the services that need to be launched during the system startup, so if you just ls -l the directory, you’ll see the symlinks being created / removed if you use enable / disable.

The various directories and symlinks define what services need to be executed and how they depend on each other.

You need to install the yast2-services-manager if it isn’t installed yet and use that - it’ll have a GUI and an ncurses interface for ssh management. 12.3 is a touch old so you might want to see upgrading to 13.1 or 13.2 if it’s feasible.

The old sysv/chkconfig is being phased out in favour of systemd.

Thanks a lot.
Replacement by the newest opensuse release is planned at the end of the quarter.
I wanted to get some other things done first (:

On 2015-01-11 22:16, jpluimers wrote:

> As chkconfig still returns the same info, it looks like chkconfig isn’t
> smart enough:
>
>
> Code:
> --------------------
> snap:/etc/mail # chkconfig --list sendmail
>
> Note: This output shows SysV services only and does not include native
> systemd services. SysV configuration data might be overridden by native
> systemd configuration.
>
>
> sendmail 0:off 1:off 2:off 3:on 4:off 5:on 6:off
> --------------------

That output is absolutely correct and there is nothing wrong with it.
Sendmail is prepared to run at the correct places.

> But a plain chkconfig now does show it is on:
>
> Code:
> --------------------
> snap:/etc/mail # chkconfig sendmail
> sendmail on
> --------------------

And the output is also correct and matches the previous one. Same as in
the first post.

Notice that the purpose of chkconfig is not to check if a service is
actually running, but to find out whether it should run at certain levels.

The command “rcsendmail status” on your first post showed that sendmail
was indeed running.

So, what is the problem? Why do you say that sendmail is not autostarting?

However, chkconfig, although it still works, is not the correct tool to
use in openSUSE 12.3. You can use “rcsendmail status” or “service
postfix status” or “systemctl status sendmail”.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

That is the thing: after a fresh runlevel 5 boot, sendmail was not running, and chkconfig --list indicates it should. So in my book, chkconfig is wrong.

That’s why I included this little piece in my previous mail to show the difference with chkconfig --list and chkconfig plain:

snap:/etc/mail # chkconfig sendmail
sendmail off

Thanks for those.
I’m going to try them later when I get back from holiday. For now the system works and boots fine.

Cheers,

–jeroen

PS: I wish the forum software would support markdown, I had to get rid of some text to even make it like my post.

On 2015-01-13 12:56, jpluimers wrote:
>
> robin_listas;2688599 Wrote:

>> Notice that the purpose of chkconfig is not to check if a service is
>> actually running, but to find out whether it should run at certain
>> levels.
>>
>
> That is the thing: after a fresh runlevel 5 boot, sendmail was not
> running, and chkconfig --list indicates it should. So in my book,
> chkconfig is wrong.

Your book is wrong :slight_smile:

What it means is that it failed. Why it failed, well, that’s something
to find out.

> That’s why I included this little piece in my previous mail to show the
> difference with chkconfig --list and chkconfig plain:

Wrong tool.
However, both tools display the same thing: “on” for levels 3 and 5,
“off” for the rest. “plain” indicates that it is on (enabled) for the
current level.

But neither indicates if the daemon is actually running or why it
failed. Systemd native commands do display it all.

> SNAP:/ETC/MAIL # CHKCONFIG SENDMAIL
> SENDMAIL OFFrobin_listas;2688599 Wrote:

A comment: When pasting here computer commands and such, please use a
CODE BLOCK, so that the forum software doesn’t do silly things like
converting URLS to tiny urls, wrap lines, or otherwise hide or alter the
commands you entered. You get them by clicking on the ‘#’ button in the
forum editor. http://susepaste.org/images/15093674.jpg

And please do not bold commands. They come to me in uppercase, as you
see above.

> Thanks for those.
> I’m going to try them later when I get back from holiday. For now the
> system works and boots fine.

Well, good. :slight_smile:

> PS: I wish the forum software would support markdown, I had to get rid
> of some text to even make it like my post.

I wouldn’t have any idea about that. I don’t even use the forum
software… :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

I did try to find why sendmail crashed, but couldn’t find it. It just appears sendmail never got started because the link wasn’t there. And I still think chkconfig should have noticed that in both parameter configurations.

Sorry for any formatting issues.

I did this:

  • paste from the Mac OS X terminal
  • surrounded all the code with the tags the # thing inserts

I didn’t expect terminal text to even get pasted with formatting, and there is no paste without formatting option.
In addition, I expect the forum editor to remove any formatting for code blocks. If it doesn’t too bad: time for a forum software update. Other forum software doesn’t exhibit this, and I’m not going to learn all the tiny peculiarities of the various kinds of forum software around that tries to outsmart the user. There are too many of them. My brain can’t handle them all.

After I get back from my holiday, I’ll go look into the systemd commands.

And maybe figure out a way to access the forum with other means than the forum webpages (the forum isn’t very clear if you can do this, but since you can, there should be a way).

On 2015-01-18 02:26, jpluimers wrote:
>
> I did try to find why sendmail crashed, but couldn’t find it. It just
> appears sendmail never got started because the link wasn’t there. And I
> still think chkconfig should have noticed that in both parameter
> configurations.

It was never designed for that. One tool, one simple goal :slight_smile:

> Sorry for any formatting issues.
>
> I did this:
>
> - paste from the Mac OS X terminal
> - surrounded all the code with the tags the # thing inserts
>
> I didn’t expect terminal text to even get pasted with formatting, and
> there is no paste without formatting option.

The text from the terminal got pasted as bold? Didn’t know that
happened. I thought you highlighted the text manually.

> In addition, I expect the forum editor to remove any formatting for code
> blocks.

Yes, true.

> And maybe figure out a way to access the forum with other means than the
> forum webpages (the forum isn’t very clear if you can do this, but since
> you can, there should be a way).

Oh, that one is easy: this forum has an nntp<—>http gateway. I access it
with Thunderbird, news interface. Any news client will do :slight_smile:

(and that gateway translates bold to uppercase)


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)