We are currently running RT 4.4.6 on Ubuntu 14.04.6 LTS. We recently got complaints that we were not responding to user updates. Upon investigating, wsgetmail appears to have broken on our system with no real indication of when. The error message I’m getting, regardless of the queue/message processed is:
failed to run command "/opt/rt4/bin/rt-mailgate " for file /tmp/MjEy65WqGT.mime : 19200 at /usr/local/share/perl/5.18.2/App/wsgetmail/MDA.pm line 204.
What happened, and more importantly how do I fix it?
The only change I know of we made was to deploy a web cert to enable HTTPS. I discovered our wsgetmail files still reference the the http:// URL so going to change those, reboot and see if that is it.
And that’s the issue… Turning on HTTPS completely breaks wsgetmail. I’ve checked out configuration files and they all are supposed to go to https:// for the server name. Is it possible that wsgetmail can’t figure out the certificate is valid and that is why it’s crashing?
It sounds to me like the issue is the handoff to rt-mailgate, not wsgetmail. What is your command_args in the wsgetmail conf? Is there anything useful in the rt.log?
Another thought. Some time ago we had SSL issues as well, and got around them by adding “–no-verify-ssl” to the rt-mailgate options. I don’t know what changed or when, but some time after, that became not necessary again.
I’m afraid I don’t have version numbers for when it worked, didn’t work, or started working again, except rt was version 4 for that whole time. But currently, rt 5.0.5 on ubuntu 22.04.4, wsgetmail is working with https.
For configuration options, we have none. The update happens in two parts. A cron job calls this script: /usr/bin/setlock -n /opt/setlock/wsgetmail.lck /root/wsgetmail.sh >> /var/log/wsgetmail.log 2>&1
Inside that script, we call wsgetmail for each queue we want. Each line reads: /usr/local/bin/wsgetmail --config=/root/.wsgetmail/CONFIG_FILE
Each file should be identical to the others with the exception being the mailbox in question (we currently use one mailbox per queue). The files look like this:
Yup, tried that first. When I went and reviewed all the files I noticed we missed all of the wsgetmail JSON files. Switching over to https there didn’t fix anything.
We’ve been receiving reports from users regarding delayed responses to their updates, prompting me to investigative journey. I’ve an enigmatic error that seems to defy logic. Regardless of the queue or message being processed, the cryptic message persists: “failed to run command “/opt/rt4/bin/rt-mailgate” for file /tmp/MjEy65WqGT.mime : 19200 at /usr/local/share/perl/5.18.2/App/wsgetmail/MDA.pm line 204.”
I was having this issue when switching to a newly deployed server. The issue ended up being with the virtual host config file in /etc/apache2/sites-available
Solution was to add this block of code to the virtual host configuration:
<Location /REST/1.0/NoAuth/mail-gateway>
Require local
</Location>