[rt-users] RT Email temp fail with ExternalAuth and Auth::MailFrom

Shawn Plummer plummer at geneseo.edu
Wed Aug 3 10:54:55 EDT 2011


Ah yes now I see the logs:

[Wed Aug  3 14:54:15 2011] [debug]: Running CommandByMail as  (/opt/rt4devel/local/plugins/RT-Extension-CommandByMail/lib/RT/Interface/Email/Filter/TakeAction.pm:184)
[Wed Aug  3 14:54:15 2011] [error]: Couldn't get principal for an empty user (/opt/rt4devel/sbin/../lib/RT/User.pm:1104)

Will apply the patch and let you know.

Thanks!

- Shawn

On Aug 3, 2011, at 10:17 AM, Kevin Falcone wrote:

> On Tue, Aug 02, 2011 at 07:35:10PM -0400, Shawn Plummer wrote:
>> I don't see anything specific about what user it is going to run as. I do see a warning about use of an uninitialized value. 
> 
> Your log is only catching warnings, not the debug logging lines that
> are causing the warnings.
> 
> You need to configure your logging system to capture the debugging, or
> log to something that doesn't strip debug messages.
> 
> -kevin
> 
>> rt4devel_error_log:[Tue Aug 02 16:02:39 2011] [warn] [client 137.238.2.10] mod_fcgid: stderr: [Tue 
>> Aug  2 20:02:39 2011] [error]: Filter::TakeAction executed when CurrentUser (actor) is not authoriz
>> ed. Most probably you want to add Auth::MailFrom plugin before Filter::TakeAction in the @MailPlugi
>> ns config. (/opt/rt4devel/local/plugins/RT-Extension-CommandByMail/lib/RT/Interface/Email/Filter/Ta
>> keAction.pm:152)
>> rt4devel_error_log:[Tue Aug 02 16:05:17 2011] [warn] [client 137.238.2.10] mod_fcgid: stderr: [Tue 
>> Aug  2 20:05:17 2011] [warning]: Use of uninitialized value $1 in concatenation (.) or string at /o
>> pt/rt4devel/local/plugins/RT-Extension-CommandByMail/lib/RT/Interface/Email/Filter/TakeAction.pm li
>> ne 206. (/opt/rt4devel/local/plugins/RT-Extension-CommandByMail/lib/RT/Interface/Email/Filter/TakeA
>> ction.pm:206)
>> rt4devel_error_log:[Tue Aug 02 16:05:17 2011] [warn] [client 137.238.2.10] mod_fcgid: stderr: [Tue 
>> Aug  2 20:05:17 2011] [warning]: Use of uninitialized value $2 in concatenation (.) or string at /o
>> pt/rt4devel/local/plugins/RT-Extension-CommandByMail/lib/RT/Interface/Email/Filter/T
>> rt4devel_error_log:[Tue Aug 02 16:05:19 2011] [warn] [client 137.238.2.10] mod_fcgid: stderr: akeAc
>> tion.pm line 206. (/opt/rt4devel/local/plugins/RT-Extension-CommandByMail/lib/RT/Interface/Email/Fi
>> lter/TakeAction.pm:206)
>> rt4devel_error_log:[Tue Aug 02 16:18:08 2011] [warn] [client 137.238.2.10] mod_fcgid: stderr: [Tue 
>> Aug  2 20:18:08 2011] [warning]: Use of uninitialized value in concatenation (.) or string at /opt/
>> rt4devel/local/plugins/RT-Extension-CommandByMail/lib/RT/Interface/Email/Filter/TakeAction.pm l
>> rt4devel_error_log:[Tue Aug 02 16:18:08 2011] [warn] [client 137.238.2.10] mod_fcgid: stderr: ine 1
>> 84. (/opt/rt4devel/local/plugins/RT-Extension-CommandByMail/lib/RT/Interface/Email/Filter/TakeActio
>> n.pm:184)
>> 
>> - Shawn
>> 
>> On Aug 2, 2011, at 5:01 PM, Kevin Falcone <falcone at bestpractical.com> wrote:
>> 
>>> On Tue, Aug 02, 2011 at 04:23:50PM -0400, Shawn Plummer wrote:
>>>> I am pretty certain I have something configured incorrectly regarding commandbyemail 0.9 ExternalAuth 0.9 and RT 4.0.1 (though its a problem for me with our 3.8 installation)
>>>> 
>>>> Our externalauth plugin is configured to not create users that do not exist in our AD server. We don't want a user to end up with multiple rt accounts if they send from their campus email then from their home account then from a different account etc. Sending with a valid AD account works fine and commandbyemail processes emails just fine.
>>>> 
>>>> However this causes a problem with email when sending an email as a non valid AD user. I get this error.
>>>> 
>>>> Aug  2 16:18:08 rtdevel postfix/local[3050]: B534D5A57E: to=<rt at rtdevel.geneseo.edu>, relay=local, delay=2.2, delays=1.6/0.02/0/0.62, dsn=4.3.0, status=deferred (temporary failure. Command output: RT server error.  The RT server which handled your email did not behave as expected. It said:  Can't call method "HasRight" on an undefined value at /opt/rt4devel/sbin/../lib/RT/User.pm line 1206.  Stack:   [/opt/rt4devel/sbin/../lib/RT/User.pm:1206]   [/opt/rt4devel/sbin/../lib/RT/Queue.pm:1262]   [/opt/rt4devel/sbin/../lib/RT/Queue.pm:1229]   [/opt/rt4devel/sbin/../lib/RT/Queue.pm:657]   [/opt/rt4devel/local/plugins/RT-Extension-CommandByMail/lib/RT/Interface/Email/Filter/TakeAction.pm:496]   [/opt/rt4devel/sbin/../lib/RT/Interface/Email.pm:1612]   [/opt/rt4devel/sbin/../lib/RT/Interface/Email.pm:1429]   [/opt/rt4devel/share/html/REST/1.0/NoAuth/mail-gateway:61]  )
>>>> 
>>>> The problem is because its status is deferred the user gets spammed with failure messages every time the queue runs till the deferred message is out of the queue. It only seems to set it to deferred when I have the mail plugins Auth::MailFrom Filter::TakeAction enabled. if I disable them it just fails, sends one bounce message and moves on as I want it to do.
>>>> 
>>>> Am I missing some critical config line for Auth::MailFrom or Filter::TakeAction that would make it not defer?
>>> 
>>> Does RT::Extension::CommandByMail log about who it is going to run as?
>>> 
>>> If it gives a weird result on that log message, the attached patch might fix it
>>> 
>>> -kevin
>>> <0001-Make-sure-we-actually-got-a-valid-user-before-trying.patch>
>>> 
>>> --------
>>> 2011 Training: http://bestpractical.com/services/training.html
>> 
>> --------
>> 2011 Training: http://bestpractical.com/services/training.html
> 
> --------
> 2011 Training: http://bestpractical.com/services/training.html




More information about the rt-users mailing list