Not receiving certain admin e-mails


(David P) #1

NethServer Version: 7.6

It seems like when I upgraded to 7.6 I have not receiving backup e-mails, cron job e-mails, etc… Basically all the e-mails that used to go to root I have not been receiving, I do get fail2ban e-mails and I have not changed anything am I missing something? I tried searching on line and I have not seen anything regarding the issue.

The last of the admin e-mail aside from fail2ban was 1/6/19 for cron daemon.


(Michael Träumner) #2

You could check the following.
Login as root at the servermanager and click at root@YourFQDN at the upper right corner and select Profile. By external email address has to be your mail address where the root mail should be redirected to.


(Eddie Atherton) #3

These are sent to root, regardless of the setting that @m.traeumner pointed out.

Cheers.


(David P) #4

Right I’m just curious why the emails aren’t being generated except for fail2ban.


(David P) #5

Any thoughts?


(Markus Neuberger) #6

Please check /var/log/maillog to see if there are errors when the system is sending mails.


(David P) #7

I didn’t recall see anything, but I will double check now. Also I am not having the e-mails redirected they are just go to the default root box.


(Markus Neuberger) #8

For sending root mails to another recipient see Not receiving certain admin e-mails


(David P) #9

I didn’t want to send them to another recipient, but the last e-mail was a cronjob alert at 5:06am on 1/6 and nothing after that aside from the fail2ban e-mails.


(Markus Neuberger) #10

You may try to send a test mail to root and check if it works:

echo 'Testmail' | mail -sTest root@yourdomain.tld

Is crond running?

systemctl status crond -l


(David P) #11

Yes, crond is running because backups and stuff are being done and the test mail command worked just fine.


(Markus Neuberger) #12

Are there no sent mail entries in /var/log/maillog? What about the testmail? Does the log show the other mails before 1/6/19?


(David P) #13

I see log entries for root@ but then there is a gap from the 6 to the 13th then I continue to see those, but those are fail2ban e-mails. No cron e-mails, backup reports, etc…

When I said I didn’t recall seeing anything I meant I didn’t see any errors.


(Markus Neuberger) #14

I assume you already tried reboot or restarting services.

Just to compare, my /etc/crontab:

[root@testserver ~]# cat  /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root

# For details see man 4 crontabs

# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name  command to be executed

Check backup config:

config show backup-data

There should be a line:

NotifyTo=root@localhost


(David P) #15

Yes I have restarted the services, rebooted the server, applied all the updates. I did confirm that the entry exists in backup config.


(Markus Neuberger) #16

And /etc/crontab has MAILTO=root?


(David P) #17

Yes it does, I haven’t changed any configs.


(Markus Neuberger) #18

Does /var/log/cron show some relevant errors?


(David P) #19

Negative that log seems fine, no errors what so ever.


(Markus Neuberger) #20

Are there cron jobs listed that would normally send mails? Or are there no cron jobs since 1/6/19?