rt4 package built incorrectly
The patch file 0001-email-allow-envelope-from-overriding-from-templates.patch applies successfully, but results in RT being unable to function.
The root cause is that the $envelope_from variable is created in one function and referenced in another. Somewhere between 4.2 and 4.4, RT split the original function (SendEmail) into two functions, causing the reference to be out of scope.
I’ve checked a few other distributions (ubuntu, debian, arch) and none of them seem to have a similar patch, so it might be safe to just remove it altogether.
To replicate:
$ docker run --rm -it alpine:3.7 sh -c "apk add --no-cache rt4 && rt-server"
Error message:
--snip--
[19] [Thu Mar 22 14:47:40 2018] [critical]: Global symbol "$envelope_from" requires explicit package name (did you forget to declare "my $envelope_from"?) at /usr/lib/rt4/RT/Interface/Email.pm line 758.
Type of arg 1 to RT::Util::safe_run_child must be block or sub {} (not reference constructor) at /usr/lib/rt4/RT/Interface/Email.pm line 1529, near "};"
--snip--
(from redmine: issue id 8712, created on 2018-03-22, closed on 2019-05-03)
- Changesets:
- Revision 8a968286 by Kory Prince on 2018-03-26T07:26:06Z:
community/rt4: fix email patch for v4.4.2
Fixes #8712
- Revision f210d0d2 by Kory Prince on 2018-03-26T11:57:28Z:
community/rt4: fix email patch for v4.4.2
Fixes #8712
- Revision 9f80be07 by Kory Prince on 2018-04-02T14:19:27Z:
community/rt4: quiet chomp warnings
Fixes #8712 #8738