Can we set queue based on Subject like OTP, as I need to deliver those mail on priority.
Hey there @youthful-zorse, 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.
Sure.
In the server_received process (SMTP or HTTP), evaluate the subject header, then assign with a set_meta.
EG: local subj = msg:get_all_named_header_values(“subject”)
if subj == “OTP” then
msg:set_meta(“queue”,“null”)
end
thank you Tom for the help
ok, so, I thought it might have been obvious, but maybe not…
please replace “null” with whatever your priority queue name is
yes, I am doing that, just wanted to know which method needed to be called
You can typically do that anywhere that can access the message object, but remember that subsequent processes can alter the queue unless you “return” right after it. I woudl notmally handle something like that in the smtp_server_message_received event. smtp_server_message_received - KumoMTA Docs
so in the basis of subject i can set routing domain as well?
yup