[SOLVED] pmgqm send doesn`t work as expected

spoollka

New Member
Nov 23, 2022
10
0
1
Hey there!
It`s couple of days, as we implement PMG.
A lot of effort was spent, but it looks like we leave ESET and almost without loss :)

One question, that i have:

When i disabled User Spam Report once, to send it via Cron only, it was like a charm.
If u`ve got new spam, u`ll get the mail, if u dont, and you have only reported spam messages early, you`ll get no report:

root@proxmox:~# pmgqm send --receiver user@mydomain.com [Here, i`ve received my Report] root@proxmox:~# pmgqm send --receiver user@mydomain.com [B]no mails for 'user@mydomain.com'[/B]

Same thing, with pmgqm send

Here, we`ve got many spam:

pmgqm status
...
...
...


Now we run pmgqm send and pmgqm status again

root@proxmox:~# pmgqm status Count Spamlevel Mail root@proxmox:~#

But today, something went wrong!

pmgqm send has stopped working, only with --Receiver option
After few hours, i found that if option User Spam Report disabled, you can not send mass report with pmgqm send (it works yesterday, i`ve test it many times)
Ok, i turn that option on, and try again - OK!

But...
For now, report arrived any time, after this cmd, no matter if there any new, or old messages (pmgqm status shows same messages all the time), and this is very bad.

What should i check? It that a bug? I just want to disabled Auto-report, and send it via Cron, or send it only one time per same spam-message

Thanks for any hints!
 
just to clarify:

'pmgqm send' sends mass emails only when the report style is not 'none' (this is the case since 2017)
'pmgqm send --receiver' always sends a report, regardless of the report style (this is also the case since 2017)

'pmgqm send' and 'pmgqm status' always have the default timespan of 'today' so it always lists/includes the mails from the current calendar day,
where the timezone is that of the pmg server
(this also has never changed)

i guess whatever you experienced was either due to different report style settings, or because of the time/date
 
  • Like
Reactions: spoollka
Hi dcsapak!
Thank you for answer. That`s really strange, because as you can see my actual log at 6PM.
I`ve send SPAM-mail to my address, and its quarantined. I`ve run commands one by one, and i get my desired output - No more reports but only first time. pmgqm status is empty, but i can see all mails in my quarantine.

Well, so that is the action from the box? If you have spam-mail in your quarantine, even if you`re have checked it already, you will get another report each time?
 
only the mails in the quarantine that is in the defined timespan will be considered. this timespan by default on the commandline is todya, the automatic spam report is 'yesterday' so if you don't get new mails in the quarantine you don't get a notification

I`ve send SPAM-mail to my address, and its quarantined. I`ve run commands one by one, and i get my desired output - No more reports but only first time. pmgqm status is empty, but i can see all mails in my quarantine.
that's very weird and not at all what should happen, can you post the output of 'pmgversion -v' ?
 
that's very weird and not at all what should happen, can you post the output of 'pmgversion -v' ?
Sure, but its not working now, and we have update today:

Code:
proxmox-mailgateway: 7.1-2 (API: 7.1-9/e0c0be55, running kernel: 5.15.74-1-pve)
pmg-api: 7.1-9
pmg-gui: 3.1-6
pve-kernel-5.15: 7.2-14
pve-kernel-helper: 7.2-14
pve-kernel-5.13: 7.1-9
pve-kernel-5.15.74-1-pve: 5.15.74-1
pve-kernel-5.13.19-6-pve: 5.13.19-15
pve-kernel-5.13.19-1-pve: 5.13.19-3
clamav-daemon: 0.103.7+dfsg-0+deb11u1
ifupdown2: 3.1.0-1+pmx3
libarchive-perl: 3.4.0-1
libjs-extjs: 7.0.0-1
libjs-framework7: 4.4.7-1
libproxmox-acme-perl: 1.4.2
libproxmox-acme-plugins: 1.4.2
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.2-6
libpve-http-server-perl: 4.1-5
libxdgmime-perl: 1.0-1
lvm2: 2.03.11-2.1
pmg-docs: 7.1-2
pmg-i18n: 2.7-2
pmg-log-tracker: 2.3.1-1
postgresql-13: 13.8-0+deb11u1
proxmox-mini-journalreader: 1.3-1
proxmox-offline-mirror-helper: 0.5.0-1
proxmox-spamassassin: 3.4.6-4
proxmox-widget-toolkit: 3.5.1
pve-firmware: 3.5-6
pve-xtermjs: 4.16.0-1
zfsutils-linux: 2.1.6-pve1

That's so bad, that users will get same report 3 times per day, until we fill up White-List base.
 
ok the version looks alright, would you mind posting the journal of the host from the time where you executed the 'pmgqm send/status' ?
maybe there is some hint what happened...
 
ok the version looks alright, would you mind posting the journal of the host from the time where you executed the 'pmgqm send/status' ?
Sure thing, can you guide me, what should i GREP, from journalctl?
I`m an windows admin :)
 
i'd not grep anything, just limit to a suitable timeframe with:

Code:
journalctl --since 'date+time' --until ''date+time'

date+time should be in this format: '2022-01-01 00:00'

you can redirect that with '>' to a file and upload here.

for example a complete line (with made up dates)

Code:
journalctl --since '2022-01-01 00:00' --until '2022-01-02 01:00' > /tmp/journal.log

then the file will be in /tmp/journal.log
 
I can`t see anything may helps, but here some log
 

Attachments

  • journal1.log
    31.9 KB · Views: 3
ok and when did you execute the commands? i see 2 instances of cron triggering a 'pmgqm send --receiver j.doe@mydomain.com' (i guess anonymized) and both are followed with the logs of a sent e-mail, so both should have resulted in a quarantine notification?
(that'ts the intended behaviour when the quarantine wasn't cleared in between)
 
There is no outputs for my commands in journalctl. for example, here:

1669369606080.png

First pmgqm send, bring me my spam, second came with NO MAILS output (screen).
I`ve tested it many times earlier, i thought that was by design, and was very surprised, when it starts to spam same reports till the day.

Anyway, thank you dcsapak for your attention, i cant get more evidence, and even if i could, it changes nothing! :)
 
i believe you, but it doesn't behave that way here and looking at the code it doesn't reflect that

can you do both calls again, but with the '--debug' option and post the output here?
 
It works now as you provide, i can`t reply my actions with same result.
Perhaps it was a time, when i`ve changed my option Spamreport style, and i`ve got some time to send it, before its gone?!
Cheers! :)
 
Perhaps it was a time, when i`ve changed my option Spamreport style, and i`ve got some time to send it, before its gone?!
possible, but good to know it works as expected
 
possible, but good to know it works as expected
Well...

Expected (and works sometime and somehow): Users don`t get same report for the same spam-messages.
Not expected: They do.

But, if it`s how the developers intended, there is nothing to investigate.
Not really good for me, but it`s free, and i`m very appreciated! :)
 
just to clarify: we don't track for which mails we already sent a report thus it would be currently impossible to do what you wanted, unless we start tracking that

in the default setup this should not be an issue though, since the users get one spam report per day for the previous one, so if they got a new spam message, they'll receive exactly one report
with that new spam the next day

edit: also there is an open issue for adding more fine grained timespans for the spam report: https://bugzilla.proxmox.com/show_bug.cgi?id=2452
with that, one could e.g. send one every hour and only include the spams from that hour
 
Last edited:
  • Like
Reactions: itechniker
just to clarify: we don't track for which mails we already sent a report thus it would be currently impossible to do what you wanted, unless we start tracking that

in the default setup this should not be an issue though, since the users get one spam report per day for the previous one, so if they got a new spam message, they'll receive exactly one report
with that new spam the next day

edit: also there is an open issue for adding more fine grained timespans for the spam report: https://bugzilla.proxmox.com/show_bug.cgi?id=2452
with that, one could e.g. send one every hour and only include the spams from that hour
Also discovered that too lately, that the default timespan is only for today and not since the last report.
These finer grained timespans or a possibility to set "since"-parameters is essential if you would ask me, especially if you want to inform your customers (only) at 14:00 and, there is no possibility to inform about mails from 15:00-0:00, only if you inform about the yesterday spam mails.

This bugzilla entry was created 3 years ago, looks like it has no priority. Isn't there a feature request thread or page?
 
Last edited:

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!