Move mail to Delivery Queue with retry

Use this forum if you have problems with a hMailServer script, such as hMailServer WebAdmin or code in an event handler.
Post Reply
LanderV
New user
New user
Posts: 1
Joined: 2020-04-30 13:08

Move mail to Delivery Queue with retry

Post by LanderV » 2020-04-30 13:20

I have a script limiting mails per minute of user accounts triggering on OnDeliveryStart. When limit is reached it sets Result.Value to 1.

Code: Select all

Sub OnDeliveryStart(oMessage)
    Result.Value = 0
    If oMessage.From = "ThrottleTest@domain.tld" Then
	write_log("HoldUp!")
        If check_limit_reached(oMessage) Then
            write_log("Stop! ThrottleTime!")
            Result.Value = 1
        End If
    End If
End Sub

This causes the message to be deleted afterwards. Is there a way to move the message back to the queue to be retried later?

palinka
Senior user
Senior user
Posts: 2475
Joined: 2017-09-12 17:57

Re: Move mail to Delivery Queue with retry

Post by palinka » 2020-04-30 17:22

LanderV wrote:
2020-04-30 13:20

Code: Select all

            write_log("Stop! ThrottleTime!")
Sorry, I don't have an answer for you - but that's funny. :lol:

Post Reply