IMAP4 Reader <MessageID>

More
4 years 8 months ago #21471 by admin
Replied by admin on topic IMAP4 Reader <MessageID>
Using GUID is a better option.
Connecting/disconnecting from the server is s very heavy operation. Some service providers may not like it.
You might get timeout errors.


Mike
ETL Architect
Attachments:

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago - 4 years 8 months ago #21474 by bruce.gibbins
Hi Mike

Appreciate what you are saying and I am very mindful of this. However, (and I may be misunderstanding something) as per the adjusted attached image I am using the option to "DOWNLOAD ALL" Messages and to then dump each set of attachments per message into a unique folder based on the <MessageID> and thus avoid continually connecting and disconnecting. We have been successfully doing this for a long time now (years). But for some reason in this case the <MessageID> is not working.

Are you saying that {GUID} will be unique for each Message and basically do the same as <MessageID>?

I only used <MessageID> because that is what the IMAP Property Form suggests.

Won't the GUID be super long and thus make the folder path super long and messy as well?

Attachments:
Last edit: 4 years 8 months ago by bruce.gibbins.

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #21480 by admin
Replied by admin on topic IMAP4 Reader <MessageID>
MessageID is unique within a single download session.

Let say for example you have five messages in the inbox. (1,2,3,4,5)

Without any filter when downloading all messages 5 folders will be created
How if you want to download messages based on filter say messages 1 and 4 folders 1 and 4 will be created

Please note that I'm describing here an ideal world where no one else is deleting messages from the inbox

It imports to clean the attachment folder before downloading messages again otherwise you may end up overwriting old messages with new ones.

Are you saying that {GUID} will be unique for each Message and basically do the same as <MessageID>?

{GUID} is not the same as <MessageID>

I only used <MessageID> because that is what the IMAP Property Form suggests.

Won't the GUID be super long and thus make the folder path super long and messy as well?

Yes it is long but it is always unique

Mike
ETL Architect

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago - 4 years 8 months ago #21482 by bruce.gibbins
Thanks Mike. I guess we have been around this loop a bit and I have take a lot of your time. It is also difficult to reproduce especially when I can't provide samples of the mail messages due to their content being sensitive.

I do a lot of pre and post processing to make sure the target folder is clear and ready to use and it is a dedicated MailBox for ETL and as such there is very limited interaction with it and if there is it would only be by 2 people on very rare occasions. Other mail can come and so that could be a contributing factor but I haven't seen any evidence of that during the time that this has occured.

However, I just wanted to clarify ...

How if you want to download messages based on filter say messages 1 and 4 folders 1 and 4 will be created

That is exactly the scenario I m referring to in my example and in most cases this is exactly the experience I typically have. However, for some reason when I get these three mail messages together (time-wise within minutes) I don't get "1" and "4" as per your example - I get a single 5 digit number such as 27233 which based on the IMAP conversation log is the UID of the LAST captured/filtered message in this specific download session.

So, although there was 1,2,3,4 where 2,3,4 are related but distinct messages. I needed to ignore 1 because it is from a different source but grab 2,3 and 4. I have a filter setup to grab 2,3 & 4 but instead of getting those folders I get a single one of 27233. It is a single download session.

I think that perhaps the filtering regex and the filename regex are somehow contributing to this due to their complexity.
These messages don't always appear at the same time but sometimes they do and so I need to cater for that and since all of the downstream processing is identical I decided to "Get All Message" with a filter and basically reuse the same package by putting in filters that would get them all.

The logic is

Grab The message(s)
- FROM anyone sending from "domain1" OR "domain2" or "domain3"
AND has ("Fxxxxx valuation" OR "ABC-Class.xxxxMarket Release") in the subject
AND has an attachment with an extension of ".CSV" OR a name of "ABCxxxxCLASSxxxMarket Release YYYYMMDD.xlsx"

Sender Is:
(?i)(^[a-zA-Z0-9\.\-]+@domain1\.com$|^[a-zA-Z0-9\.\-]+@tdomain2\.com$)|(^[a-zA-Z0-9\.\-]+@domain3\.com$)

Subject is:
(?i)(Fxxxxx valuation)|(.*ABC - Class.*Market Release)

Attachment is:
(?i)(.*ABC.*Class.*Market Release_\d{8}\.XLSX)|(.csv)

When Extracting use this regular expression:
(?i)(.*ABC.*Class.*Market Release_\d{8}\.XLSX)|(.csv)

Anyway, I can work around it by taking the risk of Downloading a single message and then waiting for the next cycle and picking it up. But the cycle is about every 20 minutes (to avoid the server feeling it is being attacked) and the people after the data would really like to see all 3 processed at the same time.

I will experiment with the GUID as that may be a workable option

Thanks again for your feedback and I know this can be frustrating given the fact I can't easily supply example message. Hence I have tried to be as detailed as I can be.

cheers
Last edit: 4 years 8 months ago by bruce.gibbins.

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago #21486 by bruce.gibbins
Hi have just tried {GUID} and can see it partially work - in our scenario.A problem occurs in my opinion because when I used {GUID} . The curly braces were retained when building the folder name. That is ok except that I store the name in a package that then gets used later in a file Operation.As you can see by the screen shot the curly braces get retained and my guess is that when I then use the variable in another file operation it tries to recalculate what is between them and gets an error.hard to explain but the image should clear it up

Attachments:
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

More
4 years 8 months ago - 4 years 8 months ago #21488 by admin
Replied by admin on topic IMAP4 Reader <MessageID>
I will ask developers to find an alternative solution for you

Mike
ETL Architect
Last edit: 4 years 8 months ago by admin.

Please Log in or Create an account to join the conversation.

Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Read more
Marketing
Set of techniques which have for object the commercial strategy and in particular the market study.
Google
Accept
Decline
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Google Analytics
Accept
Decline
Functional
Tools used to give you more features when navigating on the website, this can include social sharing.
Advertisement
If you accept, the ads on the page will be adapted to your preferences.
Google Ad
Accept
Decline
Save