Subject: | CommandByMail reads wrong headers |
Date: | Fri, 27 Jun 2014 07:36:20 +0200 |
To: | bug-RT-Extension-CommandByMail [...] rt.cpan.org |
From: | Martin Gollowitzer <mgollowitzer [...] sipwise.com> |
The CommandByMail extension sometimes reads headers as commands, which
are "normal" headers like Received: or Return-Path:. The attached
message produced the following extended mailgate error:
--8<------------------------------------------------------
Failed command 'return-path: <martin@gollo.at>'
Error message: Command 'return-path' is unknown
Failed command 'delivered-to: todo@rt.gollo.at'
Error message: Command 'delivered-to' is unknown
Failed command 'received: from zimbra.sipwise.com (zimbra.sipwise.com
[::ffff:92.42.136.235])'
Error message: Command 'received' is unknown
--8<------------------------------------------------------
I have set the logging to debug level and in
/var/log/request-tracker4/rt.log I find the following:
[Thu Jun 26 13:39:29 2014] [debug]: Found pseudoheader: Return-Path => <martin@gollo.at> (/usr/local/share/request-tracker4/plugins/RT-Extension-CommandByMail/lib/RT/Interface/Email/Filter/TakeAction.pm:234)
[Thu Jun 26 13:39:29 2014] [debug]: Found pseudoheader: Delivered-To => todo@rt.gollo.at (/usr/local/share/request-tracker4/plugins/RT-Extension-CommandByMail/lib/RT/Interface/Email/Filter/TakeAction.pm:234)
[Thu Jun 26 13:39:29 2014] [debug]: Found pseudoheader: Received => from zimbra.sipwise.com (zimbra.sipwise.com [::ffff:92.42.136.235]) (/usr/local/share/request-tracker4/plugins/RT-Extension-CommandByMail/lib/RT/Interface/Email/Filter/TakeAction.pm:234)
[Thu Jun 26 13:39:29 2014] [debug]: Got command return-path => <martin@gollo.at> (/usr/local/share/request-tracker4/plugins/RT-Extension-CommandByMail/lib/RT/Interface/Email/Filter/TakeAction.pm:241)
[Thu Jun 26 13:39:29 2014] [debug]: Got command delivered-to => todo@rt.gollo.at (/usr/local/share/request-tracker4/plugins/RT-Extension-CommandByMail/lib/RT/Interface/Email/Filter/TakeAction.pm:241)
[Thu Jun 26 13:39:29 2014] [debug]: Got command received => from zimbra.sipwise.com (zimbra.sipwise.com [::ffff:92.42.136.235]) (/usr/local/share/request-tracker4/plugins/RT-Extension-CommandByMail/lib/RT/Interface/Email/Filter/TakeAction.pm:241)
and then
[Thu Jun 26 13:39:31 2014] [warning]: Failed command 'return-path: <martin@gollo.at>'
Error message: Command 'return-path' is unknown
Failed command 'delivered-to: todo@rt.gollo.at'
Error message: Command 'delivered-to' is unknown
Failed command 'received: from zimbra.sipwise.com (zimbra.sipwise.com [::ffff:92.42.136.235])'
Error message: Command 'received' is unknown (/usr/local/share/request-tracker4/plugins/RT-Extension-CommandByMail/lib/RT/Interface/Email/Filter/TakeAction.pm:756)
[Thu Jun 26 13:39:31 2014] [crit]: Failed command 'return-path: <martin@gollo.at>'
Error message: Command 'return-path' is unknown
Failed command 'delivered-to: todo@rt.gollo.at'
Error message: Command 'delivered-to' is unknown
Failed command 'received: from zimbra.sipwise.com (zimbra.sipwise.com [::ffff:92.42.136.235])'
Error message: Command 'received' is unknown (/usr/share/request-tracker4/lib/RT/Interface/Email.pm:245)
So it seems that the RegEx that headers are matched against does not
work the way it should. I am running RT 4.0.7 from the Debian Wheezy
repositories with the lates CommandByMail extension. In RT_SiteConfig.pm
I have the following:
Set(@MailPlugins, qw(Auth::MailFrom Auth::GnuPG Filter::TakeAction));
Set(@Plugins, ( @Plugins, "RT::Extension::CommandByMail" ));
Set($CommandByMailHeader, "X-RT-Command");
Thanks,
Martin
Message body not shown because it is not plain text.