Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mail Checker Deletes Mail But Doesn't Create Ticket #251

Closed
1 of 2 tasks
DustyArmstrong opened this issue Jul 27, 2019 · 24 comments
Closed
1 of 2 tasks

Mail Checker Deletes Mail But Doesn't Create Ticket #251

DustyArmstrong opened this issue Jul 27, 2019 · 24 comments

Comments

@DustyArmstrong
Copy link

Is this a BUG REPORT or FEATURE REQUEST?:

  • BUG
  • FEATURE

What happened:
Set up the mailer check, which does appear to access the mail address. I chose to "Delete Message" from the Inbox once processed, however it does not create a ticket.

What did you expect to happen:
A ticket to be created within Trudesk.

How to reproduce it (as minimally and precisely as possible):
Set up the mailer check on port 993 for IMAP, applied settings. Check inbox of targeted account to note that email was deleted, check to note that no ticket is present.

Anything else we need to know?:
My logs state "invalid log file...".

I'm sorry to post two issues in one day.

Environment:

  • Trudesk Version: 1.0.12
  • OS (e.g. from /etc/os-release): 18.04.2
  • Node.JS Version: v10.16.0
  • MongoDB Version: v3.6.13
  • Is this hosted on cloud.trudesk.io: No
@DustyArmstrong
Copy link
Author

Just to update, I tested on a fresh Ubuntu VM on a different host, in a different network, and had the same result. This was using the installation script, for reference.

Everything else seems to work, and the mailer itself is working, just not the ticket creation.

@polonel
Copy link
Owner

polonel commented Jul 28, 2019

What mail provider are you using?

@DustyArmstrong
Copy link
Author

Tested with Gmail (IMAP), self hosted with provider (IMAP) and Exchange.

Results are consistent, email inbox is opened, mail is deleted, but no ticket is created.

@polonel
Copy link
Owner

polonel commented Jul 29, 2019 via email

@cotanmarius
Copy link

Hello,

i could confirm this bug on my installation too.

Environment:

Trudesk Version: 1.0.15
OS (e.g. from /etc/os-release): Ubuntu 18.04.2 LTS x64
Node.JS Version: v10.16.1
MongoDB Version: v3.6.13
Is this hosted on cloud.trudesk.io: No

Email server is exchange server and we are using the port 993.
The symptoms are the same as @DustyArmstrong described, the mails got deleted but no ticket is created.

@polonel
Copy link
Owner

polonel commented Aug 8, 2019

Fix will be included in v1.0.16

Currently on develop

@cotanmarius
Copy link

@polonel
Thank you!

@cotanmarius
Copy link

@polonel

I still have one question: i don't know exactly how this feature will work, but for example, if i have a ticket open and the support answers to my ticket, i shoud get an email.

If i reply to this ticket over email, will trudesk recognize that it is a reply from me or will it create a new ticket for this answer?

Thank you!

@DustyArmstrong
Copy link
Author

DustyArmstrong commented Aug 11, 2019

I tried merging from the develop branch into my local build, but still having the same problem. EDIT: I checked the updated files, and it does include the relevant changes made on the develop branch.

I'm going to assume that this is something I've done wrong, particularly since I have almost no experience with Github. I'll wait for the next release.

Thanks for looking into it!

@polonel
Copy link
Owner

polonel commented Aug 11, 2019

@cotanmarius No this is currently not possible. Right now email replies do not update the referenced ticket. This is something that hasn't made it into the Open Source version.

@dataedgehungary
Copy link

I merged from the dev branch update 7 days ago, still the same #254

@polonel
Copy link
Owner

polonel commented Aug 15, 2019

@dataedgehungary
did you do a yarn build?

Dev branch does not come with prebuilt files.

@dataedgehungary
Copy link

Well I only copied the edited mailercheck.js content, but then yes I ran a rebuild

@polonel
Copy link
Owner

polonel commented Aug 15, 2019

Do you have the proper group added to your assigned department? There was also an update on the develop branch to allow setting "All Public Groups". This setting would allow all incoming tickets from incoming mail display in the ticket list view.

Every error is caught with a warn log if it were to error out. Have you seen any warn messages?

If it works properly without the autotls option, my best guess is its an issue with the IMAP module.

@DustyArmstrong
Copy link
Author

Updated (and completely re-installed) from the new release and results are still the same. Mail is checked, the email is deleted, but no ticket is created under any circumstance.

Relevant customer from which the email is sent is registered on Trudesk, and assigned to a group. The log does not provide any information beyond trudesk Ready and subsequent Invalid Log File.

@polonel
Copy link
Owner

polonel commented Aug 25, 2019

Updated to dev branch? Your about page shows 1.0.16-beta? Is your trudesk account a member of a team/department that has access to All Groups or the group the user is a member of? Do you have permissions to "Manage Public Tickets" in Settings->Permission

I manually tested with, Yahoo, Gmail, Outlook.com, Office 365, Exchange, ProtonMail, Zoho before I pushed to dev.

Please verify.

Can you check if the ticket is actually being created?
From the Shell of your server.

mongo
use trudesk;
db.tickets.find({“owner.email”: "user@email.com"});

This will show all the tickets for the given user's email.

@stale
Copy link

stale bot commented Sep 5, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Sep 5, 2019
@cotanmarius
Copy link

@polonel
is this update still in beta?

@stale stale bot removed the wontfix label Sep 5, 2019
@polonel
Copy link
Owner

polonel commented Sep 6, 2019

Its being pushed to 1.0.16 this weekend.

polonel added a commit that referenced this issue Sep 8, 2019
## [1.0.16](v1.0.15...v1.0.16) (2019-09-08)

### Bug Fixes

* **datepicker:** [#247](#247) ([d51e341](d51e341))
* **mailcheck:** [#251](#251) - Not creating ticket due to invalid group ([1d97104](1d97104))
@polonel polonel closed this as completed Sep 8, 2019
@haakonnessjoen
Copy link

I am having this issue still with v1.0.16. With logging set to on, it says: Processed 2 Mail > Ticket, but nothing more about creating any tickets or anything else. And nothing happens in the web interface.

@dataedgehungary
Copy link

dataedgehungary commented Sep 19, 2019

We still had the issue with the new version too. We think that async processes cause the problem, the email gets deleted before it can be imported.

We manged to temporarily "cure the symptoms" by adding a Timeout:

    try {
        mailCheck.Imap.on('end', function () {
            setTimeout(function () {
            handleMessages(mailCheck.messages)
            mailCheck.Imap.destroy()
            }, 1000)
        })
        ...
    }
}

@cotanmarius
Copy link

Any update?

@polonel
Copy link
Owner

polonel commented Jan 15, 2020

Should be fixed in v1.1.2

@teutat3s
Copy link
Contributor

teutat3s commented Jul 8, 2020

It looks like this is still an issue with a fresh install of version 1.1.3 running on docker. Please take a look at the following debug log:

7/8 11:23:02 [85497] - ^[[34mdebug^[[39m: Processing 1 Mail --> src/mailer/mailCheck.js#L152
7/8 11:23:02 [85497] - ^[[34mdebug^[[39m: DEBUG Imap.end() called  --> src/mailer/mailCheck.js#L220
7/8 11:23:02 [85497] - ^[[34mdebug^[[39m: DEBUG message pushed:  from=me@example.com, subject=[test] Help me please, body=<p>This is a test issue send via mail.</p><p>Big bug, big problem, please fix.</p>  --> src/mailer/mailCheck.js#L194

It seems like the Imap.end() call comes a bit too early, right? It should then continue to winston.debug('Created %s tickets from mail', count), but it doesn't.
No ticket gets created, but the message gets deleted / read. If I can be of help to debug this further, please tell me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants