Postmaster create duplicate tickets

Moderator: crythias

Locked
thaihulk
Znuny newbie
Posts: 4
Joined: 02 Jul 2015, 06:24
Znuny Version: 4.0.x
Real Name: Đặng Quang Thái
Company: INFOdation

Postmaster create duplicate tickets

Post by thaihulk »

Issue on OTRS 4.0.5
Im run postmater create ticket by manually. Fetch mail echo like below:
First run, mail are fetched till the last message:

Code: Select all

IMAP: Message 23/27 (customerservice@blahblah.nl/mail.blahblah.nl)
IMAP: Message 24/27 (customerservice@blahblah.nl/mail.blahblah.nl)
IMAP: Message 25/27 (customerservice@blahblah.nl/mail.blahblah.nl)
IMAP: Message 26/27 (customerservice@blahblah.nl/mail.blahblah.nl)
IMAP: Message 27/27 (customerservice@blahblah.nl/mail.blahblah.nl)
And Next run:

Code: Select all

IMAP: Connection to mail.blahblah.nl closed.
IMAP: Message 1/5 (customerservice@blahblah.nl/mail.blahblah.nl)
IMAP: Message 2/5 (customerservice@blahblah.nl/mail.blahblah.nl)
IMAP: Message 3/5 (customerservice@blahblah.nl/mail.blahblah.nl)
IMAP: Message 4/5 (customerservice@blahblah.nl/mail.blahblah.nl)
IMAP: Message 5/5 (customerservice@blahblah.nl/mail.blahblah.nl)
IMAP: Connection to mail.blahblah.nl closed.
..........
My question is: Why connection not close in first run then closed in second run??

Fetched done! im go to dashboard see have many duplicate tickets created :(
To make sure, im go to mailbox to check mail messages deleted but these are still there :( -> that mean OTRS can't delete mail message on server.

This is original fetch mail flow:
Image

My question is: why mail messages could not delete ???

Im try fetch mail again and again, i see sometime OTRS can delete mail message on server, sometime not :(
Please help me !!! many thanks

This is my check modules:

Code: Select all

o Crypt::Eksblowfish::Bcrypt.......Not installed! (optional - For strong password hashing.)
o Crypt::SSLeay....................ok (v0.57)
o Date::Format.....................ok (v2.22)
o DBI..............................ok (v1.609)
o DBD::mysql.......................ok (v4.013)
o DBD::ODBC........................ok (v1.45)
o DBD::Oracle......................Not installed! (optional - Required to connect to a Oracle database.)
o DBD::Pg..........................Not installed! (optional - Required to connect to a PostgreSQL database.)
o Encode::HanExtra.................ok (v0.23)
o GD...............................Not installed! (optional - Required for stats.)
o GD::Text.......................Not installed! (optional - Required for stats.)
o GD::Graph......................Not installed! (optional - Required for stats.)
o IO::Socket::SSL..................ok (v1.31)
o JSON::XS.........................ok (v2.27)
o LWP::UserAgent...................ok (v6.05)
o Mail::IMAPClient.................ok (v3.34)
o IO::Socket::SSL................ok (v1.31)
o ModPerl::Util....................ok (v2.000004)
o Net::DNS.........................ok (v0.65)
o Net::LDAP........................ok (v0.40)
o Net::SSL.........................ok (v2.84)
o PDF::API2........................ok (v2.019)
o Compress::Zlib.................ok (v2.061)
o Text::CSV_XS.....................ok (v0.85)
o Time::HiRes......................ok (v1.9725)
o XML::Parser......................ok (v2.36)
o YAML::XS.........................ok (v0.38)
Last edited by thaihulk on 02 Jul 2015, 11:16, edited 2 times in total.
schulmann
Znuny wizard
Posts: 477
Joined: 20 Nov 2011, 16:08
Znuny Version: 6.5.11
Real Name: Schulmann

Re: Postmaster create duplicate tickets

Post by schulmann »

Such a behavior is almost always a problem of the mail server.
I'd use tcpdump or wireshark to see what's going on.
Znuny6/Debian/ESXi
thaihulk
Znuny newbie
Posts: 4
Joined: 02 Jul 2015, 06:24
Znuny Version: 4.0.x
Real Name: Đặng Quang Thái
Company: INFOdation

Re: Postmaster create duplicate tickets

Post by thaihulk »

schulmann wrote:Such a behavior is almost always a problem of the mail server.
I'd use tcpdump or wireshark to see what's going on.
many thanks, but i saw mail server didn't received delete/flag command :(
Any suggestion ??
schulmann
Znuny wizard
Posts: 477
Joined: 20 Nov 2011, 16:08
Znuny Version: 6.5.11
Real Name: Schulmann

Re: Postmaster create duplicate tickets

Post by schulmann »

thaihulk wrote:but i saw mail server didn't received delete/flag command
Are you really sure?

Then I'd test the mail fetching with the program fetchmail.
Or I'd set up a completely new OTRS system to test the fetching of mails.
Znuny6/Debian/ESXi
thaihulk
Znuny newbie
Posts: 4
Joined: 02 Jul 2015, 06:24
Znuny Version: 4.0.x
Real Name: Đặng Quang Thái
Company: INFOdation

Re: Postmaster create duplicate tickets

Post by thaihulk »

schulmann wrote:
thaihulk wrote:but i saw mail server didn't received delete/flag command
Are you really sure?

Then I'd test the mail fetching with the program fetchmail.
Or I'd set up a completely new OTRS system to test the fetching of mails.
Thanks your feedback :D
Im very sure about that, mail server not stable, sometime happend sometime not :(
I'm also fetch mail like you with other mail server and gmail -> work very nice
but with this one it's doesn't work :(

So, my idea:
- No delete ticket after created ticket.
- Save UID of email messages after created ticket.
- No create ticket and skip email message if UID of email message has existed

How do you think my idea?
If it's fine, do you have any suggestion about save UID into text-file or database or cache or .. ????

I want to say thanks again
schulmann
Znuny wizard
Posts: 477
Joined: 20 Nov 2011, 16:08
Znuny Version: 6.5.11
Real Name: Schulmann

Re: Postmaster create duplicate tickets

Post by schulmann »

If I was sure the mail server isn't stable then I'd use another mail server or another mail provider.

Or I'd start a mail server (for example Postfix with procmail) on my OTRS system (that means my OTRS system is a mail transport agent) and send the mails directly (with appropriate DNS records) or with an automatic mail forwarding to this system.
The positive side effect would be that the tickets are generated immediately.
And if I need to modify the mails before transferring them to OTRS I could do it without changing anything in OTRS.
In our company we do it this way.

I guess with UID you mean the smtp message id.
Theoretically it may work as you suggested.
But in the long run I think it's not the best solution because some software could use the same message id for different mails or for mails to different queues in your OTRS.
If I was forced to implement it this way I'd fetch the mails with fetchmail and send it to OTRS with the Perl program ~otrs/bin/otrs.PostMaster.pl to avoid the most important disadvantage: The need to change the behavior of OTRS and getting difficulties with OTRS updates, upgrades and support.
If you do it this way you could save the message ids in plain files but not in the OTRS database. Otherwise you could get difficulties with OTRS updates, upgrades and support.
Znuny6/Debian/ESXi
thaihulk
Znuny newbie
Posts: 4
Joined: 02 Jul 2015, 06:24
Znuny Version: 4.0.x
Real Name: Đặng Quang Thái
Company: INFOdation

Re: Postmaster create duplicate tickets

Post by thaihulk »

Hi schulmann, thanks a lot
let me consider but your suggest very helpful for me :)
Locked