SOLVED: Attachment problem with rt-mailgate upon Ubuntu 20.04 upgrade

We’re having a severe problem with attachments in incoming e-mail messages, new with our upgrade last month to Ubuntu 20.04, and I’d be very grateful for any assistance with it. We were running request-tracker as it came with Ubuntu 18.04, which identifies itself as version 4.4.2-2. The new installation is running request-tracker as it came with Ubuntu 20.04, which identifies itself as version 4.4.3-2. We’d be willing to go to a non-Ubuntu-supplied version if someone identifies this as a bug specific to 4.4.3 or something like that.

The users report that NO incoming e-mail messages with attachments get accepted by RT, which might be an exaggeration. But I have a sample problematic e-mail message and I can experiment with it by running rt-mailgate manually from the command-line, and I see that it is accepted just fine by our old installation, but not by the new one. They are identically-configured as far as I can ascertain.

This problematic e-mail message has a PDF attachment. The base64-encoded PDF is 4402 lines long (in the base64 encoding in the e-mail message). When I chop this to 1000 lines, it gets accepted by RT. When I instead chop it to 2000 lines, it doesn’t (and, of course, it also doesn’t get accepted without any chopping). Any of these are well below the configured (default) MaxAttachmentSize of 10485760.

Does this sound familiar to anyone?

Do you have any errors shown in the RT logs?

I am not able to find anything which looks relevant in syslog. Is there somewhere else I should be looking? We might need to improve our configuration with respect to logs.

(Thanks very much for your interest in helping me here!)

Not sure where it would end up on Ubuntu (not a distribution we use), but try looking in the web server error log. On our machines (CentOS based) it would be in /var/log/httpd/error_log.

Also are you feeding the offending message to rt_mailgate directly by hand, or mailing it into the machine? If the latter case, maybe check your MTA (sendmail, postfix, exim or whatever) logs in case it is limiting attachment sizes.

Oh, the web server logs, of course! Hmmm… it says “client denied by server configuration”, which is very odd.

For testing purposes, yes, thus presumably ruling out any MTA issues.

Ok, I think I’ve got it. It’s Apache, not RT! There is a size limit for fcgi requests, which used to default to 1 GB but now defaults to 128 KB (!).
https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidmaxrequestlen

(The version number information there doesn’t quite pan out – maybe Ubuntu 18.04 had some non-default setting of this parameter, although I can’t find it in /etc/apache2, but maybe they compiled it funny. Anyway, Ubuntu 18.04 doesn’t need a FcgidMaxRequestLen setting to work with RT, but 20.04 does.)

Thanks for the assistance!

2 Likes