Problems with Send Daily Report

My users have not received the report emails, as I programmed in:
don't overwrite systemd units as shipped with a package (pmg-api) - use systemd's override option:
Code:
systemctl edit pmgspamreport.timer
(there you only need to add your changes - in that case:
Code:
[Timer]
OnCalendar = 6,9,12,15,18:00
Persistent = true

check how the timer is scheduled and if anything related to it is written to the journal:
Code:
systemctl list-timers
journalctl -u pmgspamreport.timer

I hope this helps!
 
  • Like
Reactions: SCM and thiagotgc
Try reinstalling pmg-api to get a clean state of the timer file
and then - `systemctl edit pmgspamreport.timer`

also make sure to copy the contents as I pasted them (yours had a space between the ':' and the minute)

then check the journal again

I hope this helps!
 
  • Like
Reactions: thiagotgc
apt-get reinstall pmg-api

This seems to have reinstalled, and now it seems to have pmgspamreport.timer to run in the next hour

A.PNG

The space after the ":" was an error copying here on the forum.
The file was correct.

But now it looks like it will work!

Thank you!
 
Glad that helped - please mark the thread as 'SOLVED' if it works as you want it :)
Thanks!
 
  • Like
Reactions: thiagotgc
@Stoiko Ivanov

A doubt:

I configured to send during the day, the report every 3 hours.

Will users always receive every 3 hours only if new emails arrive, or will they always receive the report with new ones and those that have already been alerted?
 
Try it :)

but the mail only gets sent if the mailbox has some mails in the quarantine
 
I'm asking, why is the schedule for the report showing up correctly, but users are not receiving this email.

Only receive, when I manually send with pmgqm send
 
Thanks for these details. However, it seems updating the timer does not provide newly added quarantine emails, just repeats/resends the previously sent default from midnight. Can anyone else confirm this?

EDIT: I see the timer is set with "yesterday" from the default settings. Adding a cron job for pmgqm was actually much easier than managing timers.
 
Last edited:
Thanks for these details. However, it seems updating the timer does not provide newly added quarantine emails, just repeats/resends the previously sent default from midnight. Can anyone else confirm this?

EDIT: I see the timer is set with "yesterday" from the default settings. Adding a cron job for pmgqm was actually much easier than managing timers.
As previously stated (and in documentation) it will send as long as there are mails in quarantine.
So if you receive a mail now in quarantine, which you don't deliver (because it's spam), it will still be in quarantine in 3 hours when your pmg-send is run next time, and 3 hours after that.
Default time is 7 days.
So if you send quarantine-mail every 3 hours, the mail will show the same mails from -7 days, as well as new ones since last email.
 
As previously stated (and in documentation) it will send as long as there are mails in quarantine.
So if you receive a mail now in quarantine, which you don't deliver (because it's spam), it will still be in quarantine in 3 hours when your pmg-send is run next time, and 3 hours after that.
Default time is 7 days.
So if you send quarantine-mail every 3 hours, the mail will show the same mails from -7 days, as well as new ones since last email.
Not according to
Code:
systemctl edit pmgspamreport.service
and its settings, which has "yesterday" set in our install. However, this install has been rolled from version 6 to the current v8, so I'm not sure how the latest timer settings are configured.
 
Hi all. I have a very large volume of incoming messages. And after one unpleasant incident, I was forced to add a whole series of domains to quarantine. I have 2 rules. One quarantines all emails that have archives in their attachments, and the second quarantines all emails from the domains I have designated.

As you understand, my quarantine measures are very large. So I have a question: What date formats does pmgspamreport accept? Ideally I would like this report to be sent every 20 or 30 minutes. Regardless of the day of the week.
 
Hi all. I have a very large volume of incoming messages. And after one unpleasant incident, I was forced to add a whole series of domains to quarantine. I have 2 rules. One quarantines all emails that have archives in their attachments, and the second quarantines all emails from the domains I have designated.

As you understand, my quarantine measures are very large. So I have a question: What date formats does pmgspamreport accept? Ideally I would like this report to be sent every 20 or 30 minutes. Regardless of the day of the week.
I found using a cronjob is much easier than adjusting the timers.

Just type crontab -e at the command line and type this for every 20 minutes:

Code:
*/20 * * * *  /usr/bin/pmgqm send
 
I found using a cronjob is much easier than adjusting the timers.

Just type crontab -e at the command line and type this for every 20 minutes:

Code:
*/20 * * * *  /usr/bin/pmgqm send
Unfortunately, I need automation of this process. At this point I was able to set it to send every hour. But you need it more often
 

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!