Cronjobs bombarding me with Emails

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
Zombievirus
Posts: 119
Joined: Sun Sep 20, 2015 2:07 am

Cronjobs bombarding me with Emails

Post by Zombievirus »

Hi,

I installed ssmtp on my RPi2 because i need it for the Web-Applicaion i am building (Final Year Project)

Since i installed and configured ssmtp, i have been bombarded with hourly Cron EMails.

Email Subject:

Code: Select all

Cron <root@pi> cd / && run-parts --report /etc/cron.hourly
Email Body:

Code: Select all

/etc/cron.hourly/dietpi:
/DietPi/dietpi/.installed: line 115: _: command not found
/DietPi/dietpi/.installed

Code: Select all

#DietPi External Drive
USBDRIVE=0

#DietPi Software
GRASSHOPPER=0
DESKTOP_LXDE=0

WEBSERVER_LAMP=0
WEBSERVER_LASP=0
WEBSERVER_LAAP=0

WEBSERVER_LEMP=0
WEBSERVER_LESP=0
WEBSERVER_LEAP=0

WEBSERVER_LLMP=2
WEBSERVER_LLSP=0
WEBSERVER_LLAP=0

WEBSERVER_APACHE=0
WEBSERVER_NGINX=0
WEBSERVER_LIGHTTPD=2
WEBSERVER_MYSQL=2
WEBSERVER_MARIADB=0
WEBSERVER_SQLITE=0
WEBSERVER_PHP=2
WEBSERVER_MYADMINPHP=0
WEBSERVER_REDIS=0

OWNCLOUD=0
TRANSMISSION=0
PHPBB=0
HIFI=0
KODI=0
MINIDLNA=0
NOIPDYNDNS=0
OPENTYRIAN=0
DIETPICAM=0
DELUGE=0
FILESERVER_SAMBA=2
FILESERVER_PROFTP=0
FILESERVER_VSFTPD=0
RASPCONTROL=0
LINUXDASH=0
PIHOLE=0
SUBSONIC=0
WEAVED=0
WEBIOPI=0
DIETPICLOUDSHELL=0
HAPROXY=0
SQUEEZEBOXSERVER=0
WORDPRESS=0
TIGHTVNCSERVER=0
FAIL2BAN=0
PHPSYSINFO=0
PHPIMAGEGALLERY=0
AMPACHE=0
OPENVPNSERVER=0
LETSENCRYPT=0
WIRINGPI=0
RPIGPIO=0
RPII2C=0
WIFIHOTSPOT=0
TORHOTSPOT=0
SHAIRPORTSYNC=0
BRUTEFIR=0
PYDIO=0
SQUEEZELITE=0
EMONHUB=0
EMONCMS=0
RPIMONITOR=0
NETDATA=0
BAIKAL=0
MUMBLESERVER=0


#Additional Linux Software
VIMFULL=0
SSHCLIENT=0
SMBCLIENT=0

GITCLIENT=0
BUILDESSENTIAL=0
ALSABASE=0
XSERVERXORG=0
CURLFTPFS=0
FFMPEG=0
ORACLEJAVA=0
NODEJS=0

SSHSERVER_DROPBEAR=2
SSHSERVER_OPENSSH=0
LOGGING_LOGROTATE=0
LOGGING_RAMLOG=2
LOGGING_RSYSLOG=0


#DietPi Choice System: SSH Server
INDEX_SSHSERVER_CURRENT=-1
INDEX_SSHSERVER_TARGET=-1

#DietPi Choice System: File Server
INDEX_FILESERVER_CURRENT=0
INDEX_FILESERVER_TARGET=0

#DietPi Choice System: Logging
INDEX_LOGGING_CURRENT=-1
INDEX_LOGGING_TARGET=-1

#DietPi Preference System: Webserver base
INDEX_WEBSERVER_CURRENT=-2
INDEX_WEBSERVER_TARGET=-2
The Web Application works perfectly and i can also send Emails via Command Line.

So, i do not want the Email functionality to change. I just want these hourly Emails to go to hell!

I googled for a solution. I need to delete the MAILTO line in /etc/crontab

But there is no such line there:

Code: Select all

root@pi:/etc/cron.hourly# cat /etc/crontab
#Please use dietpi-cron to change cron start times
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user  command
17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25 1    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 1    * * 7   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 1    1 * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
The Cronjobs can run hourly, i don't mind that. I just don't want them to send me Emails.

Please help!

Thank You
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Cronjobs bombarding me with Emails

Post by Fourdee »

Hi ZombieVirus,

Thanks for the info, and sorry for the mass emails :)

Code: Select all

/DietPi/dietpi/.installed: line 115: _: command not found
Theres a bug in v117 which adds _ to the end of the installed file each time you run dietpi-software: https://github.com/Fourdee/DietPi/blob/ ... tware#L329. I dont know how it got there, most likely my 2 year old decided to press some key when I had the sourcecode open lol.

This is fixed for v118.

If you remove the _ from /DietPi/dietpi/.installed the issue should disappear.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Zombievirus
Posts: 119
Joined: Sun Sep 20, 2015 2:07 am

Re: Cronjobs bombarding me with Emails

Post by Zombievirus »

Thanks Fourdee :D

Those Emails were driving me Nuts!
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: Cronjobs bombarding me with Emails

Post by Fourdee »

Zombievirus wrote:Thanks Fourdee :D

Those Emails were driving me Nuts!
lol, aye, sorry about that :)

Just be aware, if you run dietpi-software at any point before the v118 update, you will need to remove the _ again.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply