Use this forum if you have problems with a hMailServer script, such as hMailServer WebAdmin or code in an event handler.
-
palinka
- Senior user
- Posts: 4455
- Joined: 2017-09-12 17:57
Post
by palinka » 2023-01-31 20:21
I was thinking about how to simplify these limit outgoing messages scripts. They all rely on secondary databases or files for counting the number of outgoing messages. This is unnecessary as the data is already contained in hmailserver database:
Code: Select all
SELECT messagefrom, COUNT(messagefrom) AS count FROM hm_messages
INNER JOIN hm_accounts ON hm_messages.messagefrom = hm_accounts.accountaddress
WHERE hm_messages.messagecreatetime > NOW() - INTERVAL 24 HOUR
GROUP BY messagefrom
HAVING count > 100;
I haven't done anything about scripting the process for letting the user know, etc. I was just noodling around, but I'm going to park this here for future reference.
-
palinka
- Senior user
- Posts: 4455
- Joined: 2017-09-12 17:57
Post
by palinka » 2023-02-04 22:49
Unfortunately, this only works if the sent message exists (saved in sent folder), so its not actually useful for tracking outgoing messages. Too bad.