Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.

works perfect. BUT user (rule's user) gets a postmaster message after some minutes when downloading his/her messages by POP:
"The mail server could not deliver the message to you since the file C:\hMailServer\Data\domain.com\user\0B\{0BB87CB6-C481-4CA4-A483-4AD73CC40F31}.eml does not exist on the server."

file is gone as desired, but what happens with the reference claiming that file?
a simple account rule like "if message size > x delete it" doesn't produce this error. why this?

A while back I spent some time tracking (debug and application log) when rules are applied as a pre-study to my SPAM handling. I ended up loading everything into "global rules".
I found that actions like "Forward" and "Move to IMAP.." was actually performed at "account rule" level although it was defined in a "global rule".

So, I now have 2 (global) rules handling SPAM, first one check "X-hMailServer-Reason-Score" and if > 6 it is forwarded to "spam@acme.inc", mail is deleted and rule stop processing. Second one just forward to "spam@acme.inc" and move mail to IMAP folder.

Never had any issues about missing emails from postmaster.

Could it be something from the script that gets stuck in memory? I know VBScript is supposed to "clean up" when exiting but do you "nothing" all your objects when you are done with them?

SørenR.

The quantum rule of insecurity which states that the act of observing how vulnerable a host or service is changes the insecurity level of the service.

you're right with global rules. i use also exclusively global rules to sort spam and change headers etc...
till last week i was using globals also for redirectings. due to multiple receipts by splitted mails issue i told about before, i changed this policy and dropped all redirectings by global rules and started to proceed with indexing, querying etc.. by functions called from account rules & evaluate the result again in account rules. you know the story. this runs perfectly.

now after that bad experience with public folders i told about yesterday, now i'm trying to forward discarded messages to a trash account & delete on account rule level. this runs also fine, but unexpectedly leaves behind this postmaster warning. users are upset and start asking what is happening. (according to my current observations we have about 500-600 discards daily)

you're right with global rules. i use also exclusively global rules to sort spam and change headers etc...
till last week i was using globals also for redirectings. due to multiple receipts by splitted mails issue i told about before, i changed this policy and dropped all redirectings by global rules and started to proceed with indexing, querying etc.. by functions called from account rules & evaluate the result again in account rules. you know the story. this runs perfectly.

now after that bad experience with public folders i told about yesterday, now i'm trying to forward discarded messages to a trash account & delete on account rule level. this runs also fine, but unexpectedly leaves behind this postmaster warning. users are upset and start asking what is happening. (according to my current observations we have about 500-600 discards daily)

i did some debug as seen below. scenario:
i send one mail to one external address + CC a distribution list where i'm also in it.
aim : discard the copy from distrolist to myself, forward it to trash account to be reviewed
once again, account rules in my account :account rule #1:
if message size > 0
run a function
(function does some checkings, adds an header according to the result, saves the message and returns.)account rule #2:
if x-header (which was added by above function) contains "Yes"
forward to trash@mydomain.com
delete message

From: Postmaster
Subject: Message undeliverable
Date: Sat, 13 Apr 2019 19:45:20 +0300
The mail server could not deliver the message to you since the file C:\hMailServer\Data\mydomain.com\myself\9C\{9C49A54E-798C-48EA-B8FC-B86F55CB799B}.eml does not exist on the server.
The file may have been deleted by anti virus software running on the server.
hMailServer

in short : don't touch the message's source on account rule level and then try to delete it from there.