set_scheduling

I would like to use the set_scheduling function. It is configured in init.lua but does not seem to take effect. My expectation, I am injecting emails prior to start time, the emails should be held in queue and then released at the start time.

see github repo for config files

https://github.com/mrmagpie33/kumo_source

Hey there @ingenious-echidna, thanks for posting. Please read the “Troubleshooting” and “How to Ask for Help” buttons below. If you would like a 1:1 support session from the KumoMTA team, details are at the “Book a Support Session” button below.

Log files

https://gist.github.com/mrmagpie33/126d1dc86b2cd1dbf5edd296eda0720d

kcli queue-summary output

https://gist.github.com/mrmagpie33/fc59ae7f3b9aed28f71b5fec3380986d

FYI, I am setting up a “man in the middle” test for Kumo in AWS. The “kumo_source1” will be the MTA to hold the email payload that is then released at a specific time. the target via smart host is “kumo-mta1”

kumo_source1
172.31.41.143

kumo-mta1
172.31.40.168

kumo-sink1
172.31.35.225

The timestamp in the logs translates to “Tue, 09 Apr 2024 17:21:26 GMT”
The time you set for scheduled delivery is

  tz = 'Etc/UTC',
  start = '17:00:00',
  ['end'] = '19:00:00',```
My expectation under those circumstances would be immediate delivery.

Am I reading that incorrectly?

let me re-run the test. I’ve updating as a go :slightly_smiling_face:

I’ll get a clean run.

re-ran test at Tue Apr 9 18:39:05 UTC 2024

schedule updated to 20:00

https://gist.github.com/mrmagpie33/b8d4bdb199ff0a44b8e5e0a87e6bd5bf

msg:set_scheduling {
dow = ‘Mon,Tue,Wed,Thu,Fri’,
tz = ‘Etc/UTC’,
start = ‘20:00:00’,
[‘end’] = ‘23:00:00’,

I did try the x-header method but ran into errors. but I could go that route if it is perferred.

msg:import_scheduling_header ‘X-Schedule’

… and did it deliver?

yes, i posted the logs to the gist

Any error in the journal?

or debug info in the journal? I’m a little embarrased to say that I just saw that there’s some stray debug printing in the scheduling logic that I apparently forgot to remove. The good news is that it may help us understand what’s happening here.

Reran the test setting the day to Monday (yesterday) to avoid any possibility of making a testing error. Still immeditate delivery

https://gist.github.com/mrmagpie33/27501a9f44cfb6b2e21f92ed7c536869

And the Journal?

here is the journal

https://gist.github.com/mrmagpie33/11170c80e4b6d7b8b225ba90bc582c30

hmm, can you try adding msg:set_due(nil) after your call to msg:set_scheduling?

getting an error now. would this be the correct syntax?

-- set_scheduling msg:set_scheduling { dow = 'Mon', tz = 'Etc/UTC', start = '02:00:00', ['end'] = '03:00:00', } msg:set_due(nil)

what’s the error? It might be that you can use msg:set_due() instead of nil