Problem with mail handler for incoming mail

Deleted user April 24, 2019

Hi,

We have a problem with mail handler. 

So, I was the default reporter defined in the incoming mail, mail handler. I needed to change this to my colleague. He has ALL the same rights on all the projects, as me.

The mail handler was working perfectly fine. 

When I changed the default reporter from myself to the colleague, nothing actually changed.

System is still sending e-mails with my e-mail as FROM, and the issues opened in the system still have me as a reporter.

When we look at the handler it self, it says that my colleague is default reporter, but he is actually not.

I have tried everything I could, but it remains the same.

Can you please let us know how to change this?

Thanks,

Milica

 

 

1 answer

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 26, 2019

Hi Milica,

I am a bit confused by your description here.  The default reporter is an optional settings you can configure within an incoming mail handler in Jira.  When you do this, users that send email to that inbox and don't have an account in Jira can have their messages processed into Jira issues, where the reporter becomes this default account rather than the user that actually sent the message.

You then stated:

System is still sending e-mails with my e-mail as FROM, and the issues opened in the system still have me as a reporter.

I don't follow.  Jira can also be configured to send email notifications, but these don't necessarily correspond at all to the incoming mail handlers in Jira.

Instead there is a global setting for an outgoing SMTP server that you can configure in Jira.  More details on that setting in Configuring an SMTP mail server to send notifications.  Perhaps this is the location you are looking for it you want to change what email address appears as the FROM when Jira sends out notifications.

If you still find that the existing mail handler is not working as you expect, try deleting that existing mail handler first, and then create a new mail handler with the new settings you want.  In some rare occasions, I have seen this method have better success than trying to edit an existing configuration in that module.

I hope this helps.

Andy

Nenad Spasic April 29, 2019

Hi Andy,this is not a problem with sending,but instead dedicating ticket to a user which is in from section.

Jira is currently NOT set to send with that user(milica,lubinic) but nevertheless it is assigning itself with that user.

If you need any additional logs or configurations please feel free to contact me.

Regards,

Nenad.

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 30, 2019

Hi Nenad and Milica,

  • What version of Jira is this?
  • Have you tried to delete the existing mail handler yet, and then try to create a new one with the new desired settings?
  • Are you using any automation style plugins with Jira, such as Automation for Jira, Scriptunner, Power scripts, JSU, etc that might be configured/scripted to create issues from a particular user when specific conditions are met?
  • Perhaps try looking at the History of an jira issue in question.  I'd be interested to learn if there are any clues we can obtain there in regards to the creation

Just to clarify, changing the mail handler settings won't change existing issues.  It should be able to change which user is used to create issues in the project going forward. 

Nenad Spasic May 3, 2019

Hi,this was on jira 7.13.2 and also on 8.0.2.

Yes,i deleted mail handler,done indexing and then created again. Nothing changed.

 

No,we don't have that kind of automation.

Nenad Spasic May 3, 2019

As for the history, it only shows this:

Milica Lubinic created issue - 7 minutes ago

And that;s all

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 7, 2019

All I can think of is that either

There is another mail handler in play here

OR

There is some other plugin to Jira that could be handling/altering this in some unexpected way

OR

Jira has a problem in regards to that user account email existing in more than one user record.

I'm more interested to investigate that last option about the user accounts in Jira to see if there is something off here.  For example, please check out the KB Jira incoming mail handler processes the email using an incorrect user. If your user directory in Jira has two or more user accounts with the same email address, Jira will use the first one it finds to process this message.  That could explain why Jira still is using this user account to process the message instead of the other user account.  IF they have the same email address in Jira.  Try checking this with the SQL query

SELECT id, directory_id, active, lower_user_name, lower_email_address FROM cwd_user WHERE lower_email_address = 'username@example.com';

Where you replace the username@example.com with the email address of Milica's account here.

If you get back more than one result, please let me know.  It tends to indicate that this is the cause of the problem here.  And in turn you can follow the resolution steps in that KB to work past this problem.

If you only get back one account here, then we can safely rule out this KB as applying here.  The next steps after trying this would be to try to start Jira in safemode, disabling all other user plugins and see if we can still get the mail handler to process these messages.  If not, it tends to indicate there is some other plugin in play here.

Please let me know the results.

Andy

Nenad Spasic May 8, 2019

hi,the output of the psql query:

id | directory_id | active | lower_user_name | lower_email_address
-------+--------------+--------+------------------------------+------------------------------
12831 | 1 | 1 | milica | milica.lubinic@netvizura.com
15136 | 1 | 0 | milica.lubinic@netvizura.com | milica.lubinic@netvizura.com
(2 rows)

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 8, 2019

I would recommend changing that second, inactive account's email address so that there is no possible way Jira can confuse the email address in play there.  You could leave the username as is, but try changing that email address to something like test54321@localhost and that should help make sure there is only a single account returned from that query.

A follow up query based on that last one

select * from app_user where lower_user_name='milica';

and

select * from cwd_user where lower_user_name='milica';


I am only expecting to see a single entry for each query. But the existence of multiple rows returned from either query could still indicate a problem with the accounts that might cause this unexpected behavior.

Andy

Nenad Spasic May 9, 2019

hi,ive changed to some different email address,and the rows looks like this now:

 id | directory_id | user_name | lower_user_name | active | created_date | updated_date | first_name | lower_first_name | last_name |
lower_last_name | display_name | lower_display_name | email_address | lower_email_address | credential
| deleted_externally | external_id
-------+--------------+------------------------------+------------------------------+--------+----------------------------+----------------------------+------------+------------------+------------------------------+-
-----------------------------+------------------------------+------------------------------+------------------------------+---------------------+-----------------------------------------------------------------------
----+--------------------+--------------------------------------
15136 | 1 | milica.lubinic@netvizura.com | milica.lubinic@netvizura.com | 0 | 2018-04-26 07:35:09.554+00 | 2018-06-01 07:12:52.724+00 | | | milica.lubinic@netvizura.com |
milica.lubinic@netvizura.com | milica.lubinic@netvizura.com | milica.lubinic@netvizura.com | milica.lubinic@netvizura.com | drop@localhost | {PKCS5S2}N7vzElbN8wiOVLewiodOTv9eN/yIKHJeTUCoNCoMyhRNViKYlz3MGiq1Z897z
KXP | | 030b90c8-e96a-4de9-93ba-89bdc3239105
(1 row)

 But i still receive email with the same FROM

Nenad Spasic May 9, 2019

both of those queries return one row.

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 10, 2019

Hi Nenad,

Thanks for this reply.  I am still curious to see if you can recreate this issue while other user plugins are disabled here, just to rule out the possibility of a plugin in jira that could affect the way issues are created.

Aside from that, could please try to run these other Select SQL statement:

select * from propertystring where id=(select id from
propertyentry where
property_key='handler.params');

I know this query works in postgresql, if it doesn't work for you, please let me know what database type you are using (mysql, ms sql, oracle, etc).

This should return to us all the mail handlers in place, along with the settings.   I am interested to see the project name, the reporteruserkey value (note the app_user.user_key value are sometimes the same as the cwd_user.user_name, but can be different than the username in Jira if the account has ever been renamed.) But also, running this query would help to tell us if there is perhaps multiple mail handlers in Jira that are configured for a particular project. 

In addition to this, can you tell me if this is by chance a Service Desk project?  I ask because service desk can in some cases, utilize a different type of mail handler to create issues.

Thanks

Andy

Nenad Spasic May 13, 2019

HI andy, here is the response from DB:

 163009 | project=SAL,issuetype=10503,reporteruserkey=gaja,bulk=accept,createusers=false,notifyusers=false,ccwatcher=true,ccassignee=false,stripquotes=false
Nenad Spasic May 13, 2019

Also Andy, this is Business project type

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 14, 2019

Hi Nenad,

Thanks for this. The only concern I have about it is the 'reporteruserkey=gaja' value.  I don't know if this user key corresponds to some other unknown account, or is correct for the account you want to be processing these messages as the reporter.  We can look this up via SQL as well with

select * from app_user where user_key='gaja';

This will return any entries that match that exact name, we're looking for the lower_user_name value that corresponds here in that table.  This will tell us the current user name of that account that is setup to be the default reporter for those issues. 

Each app_user.user_key value is unique to the account when it is first created in Jira.  Jira can rename user accounts, but that value in the app_user table is never expected to change, only the lower_user_name value and the values in the cwd_user table that correspond to it.  

I don't know what else might cause the behavior you have reported here.  Have you restarted Jira after making this change to the mail handler?  Curious if perhaps a service in Jira is getting stuck with the previous settings some how.  

Nenad Spasic May 14, 2019

HI Andrew,gaja is one our users(admins), i've tried changing to myself ,and restarting,and nothing happened.

as for the output of the command:

 10001 | gaja | gaja
Nenad Spasic June 12, 2019

Hi,ive upgraded to 8.1.2 and the problem persists.

Do you have any aditional help?

REgards,

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 13, 2019

Hi Nenad,

Sorry we have not been able to find a resolution yet to this problem.  I have created a support case on your behalf so that we can gather some more data from your environment in order to try to better help with this problems.  Please see https://getsupport.atlassian.com/servicedesk/customer/portal/20/GHS-154955 for more details.

Regards,

Andy

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events