[SOLVED] IMAP fetch only new mails

Moderator: crythias

Locked
HervE
Znuny wizard
Posts: 391
Joined: 03 Jan 2011, 17:15
Znuny Version: 3.3.8
Location: France

[SOLVED] IMAP fetch only new mails

Post by HervE »

Hello,

We are going to fetch incoming mails with IMAP.

First thing I have to say is: during the deployment phase, we are going to keep all fetched mails both in OTRS and Outlook.
I managed to configure that by commenting this line out in Kernel\System\MailAccount\IMAP.pm:

Code: Select all

# mark email to delete if it got processed
#$IMAPObject->delete($Messageno);
Unfortunately it is not perfect, because next time Inbox is fetched all kept messages will come again inside OTRS, thus creating doubled tickets!

Is there a way to fetch only mails that were not fetched already?

Or, alternatively, is there a way to automatically move fetched messages from Inbox to other folder in Outlook?

Regards,
HervE
Last edited by HervE on 18 Feb 2011, 10:19, edited 2 times in total.
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30
Mike_B
Moderator
Posts: 266
Joined: 12 Jan 2010, 18:16
Znuny Version: CVS HEAD

Re: IMAP fetch only new mails

Post by Mike_B »

I would suggest you create a separate mailbox for OTRS, and using a filter on the mailbox, or by means of mail server configuration, forward all mail from your support box to the new OTRS box.
--
Mike
huntingbears.nl - @michielbeijen on Twitter
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: IMAP fetch only new mails

Post by crythias »

OTRS's inbox should never be parsed by humans.

http://www.intelliadmin.com/index.php/2 ... -exchange/

set an OTRS-only inbox. Have OTRS grab from that and delete from it.

http://technet.microsoft.com/en-us/libr ... G.80).aspx
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
HervE
Znuny wizard
Posts: 391
Joined: 03 Jan 2011, 17:15
Znuny Version: 3.3.8
Location: France

Re: IMAP fetch only new mails

Post by HervE »

Interesting.
Please could you remind me of how to fetch folder other than INBOX? Is it in IMAP.pm as well?

(Edit: Yes, I have found it - and tested - in IMAP.pm.)

HervE
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30
Locked