Hi there,
On a pristine, default, configuration when the mail-gateway
rejects a message it won’t propagate to the MTA, so the sender won’t get any errors; but the mail-gateway
just dropped the message.
For example, on a pristine configuration where Everyone
does not have Create Ticket
rights, if you submit an e-mail to RT you will get:
[72652] [Mon Jan 1 11:45:30 2024] [error]: mail-gateway error: Permission Denied: xxxxxxx@gmail.com has no right to create tickets in queue General (/opt/rt5/share/html/REST/1.0/NoAuth/mail-gateway:89)
But at the same time, it will reply with HTTP status 200,
127.0.0.1 - - [01/Jan/2024:12:45:30 +0100] "POST /rt/REST/1.0/NoAuth/mail-gateway HTTP/1.1" 200 43 "-" "rt-mailgate/5.0.5 libwww-perl/6.68"
So the MTA thinks the delivery was successful:
2024-01-01 12:45:30 1rKGjZ-000JUw-2i => |/opt/rt5/bin/rt-mailgate --queue "General" --action correspond --url https://rt.XXxXxx.cloud/rt <hola@rt.Xxxxx.cloud> R=system_aliases T=address_pipe
2024-01-01 12:45:30 1rKGjZ-000JUw-2i Completed
With the result of the e-mail being lost.
Shouldn’t the REST endpoint be returning some error code (like 403?) and this become an error exit from rt-mailgate
so that the MTA can reject the message with some meaningul error?
marc
PS: I’m new to RT (had a simple deployment years ago, now starting from scratch)