Software center - mail on updates available has stopped

NethServer Version: 7.9.2009
Module: Antivirus, Bandwidth monitor, Collectd Charts, Email, Fail2ban, Firewall, VPN, Web Proxy & Filter, Web server, Webmail

Hello to all,

since Feb 2021 we have updated NS to 7.9.2009 & we had a subscription (Crostino). But from then I don’t get any mails from Software center, if there are updates available…
The checkbox in Software center configuration “Mail to System Admin” is checked. Other Mails to root/ admin are working, so I think the mail system is ready and works… We have also about 50 mail users. All mails from/ to users are working too - no errors.
What can I do? Can anyone give me some suggestions/ hints?
Thanks in advance

Messages stopped being received since subscription?

Yes, this is how it looks to me… but only from modul Software updates… Mails from Fail2bon or Anacron are working

As my perspective is something to expect. Updates are automated -> no email about “software updates available”.

Unless you want some…

Hmm, there are 2 options at “Software center configuration”: 1) Download 2) Download and install.
My selection ist 1) (only download). I have had bad experiences with full automatic updates…

I can understand, it happened with me also. But don’t forget that you’re paying for delayed updates, after the community also used it and reported eventual issues.

1 Like

So what is the result? I can’t change anything, it is what it is. I won’t get any mails from Software center?
I don’t really like this behaviour… :thinking:

Only if you set them to be. Automatic updates don’t come with the subscription.

Some additional information:
Last mail from NS regarding updates I’ve received on 09. Feb 21 from user ‘root’ with subject line “Yum: Updates Available on mail@xxx.de”. After that day we buyed & installed a subscritption und made update to NS 7.9.
Is there a way to reactivate this behaviour? Possibly configuration via the console (not from the cockpit menu)? Are cron or yum involved here?

The subscription doesn’t suppress any mail and yes, it’s something with yum-cron.
When yum-cron cron generates some output, cron will send the mail: I have plenty of them on my inbox from machines with subscriptions.

Take a look at yum-cron config, what’s the output of grep email /etc/yum/yum-cron.conf?

Hi @giacomo,
the output of your command is

# How to send messages.  Valid options are stdio and email.  If
# to have cron send the messages.  If emit_via includes email, this
# program will send email itself according to the configured options.
emit_via = email
[email]
# The address to send email messages from.
email_from = root@xxx-yyy.de
email_to = root@xxx-yyy.de m.matyssek@xxx-yyy.de
# Name of the host to connect to to send email messages.
email_host = localhost

Inside the folder /etc/yum/ I see two config files, yum-cron.conf and yum-cron-hourly.conf.
I have edited the file yum-cron-hourly.conf to to this:


#update_messages = no
update_messages = yes

#emit_via = stdio
emit_via = email

Don’t know about the purpose of the second file… I am waiting for the next updates to see, if anything has changed in behaviour. :slightly_smiling_face:

So everything is in place to send mails.

In case you will not receive notifications, you should inspect the mail server log.

OK, I will report results here…

1 Like

Good morning to all!
New results from me: I did not receive mail from new updates, which are available on my NS.
I wonder if the cron job for yum updates is active… I should check this.
My log files are quite large, what should i look for to find failures in cron or yum regarding not sending mails if updates available?

Assuming updates are involved daily I’ve looked into folder /etc/cron.daily. There exists the file 0yum-daily.cron. Inside this file exec /usr/sbin/yum-cron is called. So far so good, but which config file is used for this call? In the web I have seen something like this:

exec /usr/sbin/yum-cron /etc/yum/yum-cron-hourly.conf

Does NethServer need a parameter (config file) for calling yum-cron?
If so, which config file?

  1. /etc/yum/yum-cron.conf
  2. /etc/yum/yum-cron-hourly.conf
    or
  3. /etc/yum.conf

In the other hand- which is the default configuration?

Hi @giacomo,

may be this is the problem:
https://mensmaximus.de/blog/yum-cron-sendet-keine-emails-mehr/

It is something with coding in US-ASCII / UTF8…
What do you think?

This one: /etc/yum/yum-cron.conf

No.

yum-cron-hourly is disabled, yum-cron (daily) is enabled.

I dot not think so: If yum-cron crashes, the output is catched by cron an sent by mail.

Search for mail sent by root:

grep root@$(hostname -d) /var/log/maillog

I’ve got it!! Here is the solution:

First I have edited the file /etc/yum/yum-cron.conf to change parameter "random_sleep = 360" into "random_sleep = 0" (for test purposes only!).
After that I called yum-cron manually in a console with result:

Failed to send an email to localhost: {‘root@xxx-yyy.de’: (504, ‘5.5.2 : Sender address rejected: need fully-qualified address’)}

So the fact is yum-cron needs a fully-qualified address with myhost.mydomain.TLD!

After changing…
email_from = root@xxx-yyy.de to email_from = root@mail.xxx-yyy.de
and
email_to = root@xxx-yyy.de to email_to = root@mail.xxx-yyy.de

… I receive mails from yum-cron.

Last thing I would like to do is making scripts / templates for automation…
Any hints for me which templates I have to add…?

@giacomo
thank you for your effort!

You should configure a correct domain name.

Eventually you can create a template-custom for /etc/e-smith/templates/etc/yum/yum-cron.conf/30email