Cronjob keep making email requests

denmark11

New Member
Oct 12, 2019
1
0
0
30
Hello forum

Excuse me for my poor English since it's not my primary language.

So I've been working with PVE 6 on my home server; Dell PowerEdge R710.

And since I wanted it to stay quieter, I made a custom script to control fan speed.

To monitor CPU temperature every 10 second, I registered my script in crontab.

It worked find but after about 3 days, I have noticed that /var/log directory was getting really big(about 13GB)

Apon research, I found that same log was being generated every second.

Like this below:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Oct 13 00:05:20 prox1 postfix/local[12713]: 5873CC7694: to=<root@prox1>, relay=local, delay=253236, delays=250813/2422/0/0.63, dsn=2.0.0, status=sent (delivered to command: /usr/bin/pvemailforward)
Oct 13 00:05:20 prox1 postfix/qmgr[1825]: 5873CC7694: removed
Oct 13 00:05:20 prox1 postfix/qmgr[1825]: 1DC85C2069: from=<root@hostname.com>, size=2935, nrcpt=1 (queue active)
Oct 13 00:05:20 prox1 postfix/qmgr[1825]: 78447C1F8C: removed
Oct 13 00:05:20 prox1 postfix/cleanup[13584]: 2D82FC0BBA: message-id=<20191012150520.2D82FC0BBA@prox1>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

It is just a part of a huge log but rest of the log contains pretty much the same thing.

After some more research, I found that it was crontab that was keep sending email.

So I edited my crontab like below:
* * * * * /bin/sh /root/tempControl/temp_control.sh >/dev/null 2/&1
* * * * * ( sleep 10 ; /bin/sh /root/tempControl/temp_control.sh >/dev/null 2/&1 )
* * * * * ( sleep 20 ; /bin/sh /root/tempControl/temp_control.sh >/dev/null 2/&1 )
* * * * * ( sleep 30 ; /bin/sh /root/tempControl/temp_control.sh >/dev/null 2/&1 )
* * * * * ( sleep 40 ; /bin/sh /root/tempControl/temp_control.sh >/dev/null 2/&1 )
* * * * * ( sleep 50 ; /bin/sh /root/tempControl/temp_control.sh >/dev/null 2/&1 )
to ignore output and error data

but still I'm getting the same log as above and log files like mail.info, mail.warn under /var/log are growing about 1MB per 30 second.

Is there any way to mitigate this issue or to disable email service on proxmox? since I don't need it.

Thank you
 
Hi,

add at the end of the crontab line ' MAILTO=““ ' to deactivate the mail notification.
Or you can use systemd-timer instead.
 
  • Like
Reactions: lixaotec

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!