cancel
Showing results for 
Search instead for 
Did you mean: 

Imap metadata

rascio
Champ in-the-making
Champ in-the-making
Hi at all,
i've enabled the imap subsystem, when i drag and drop an email on an Alfresco folder, it's created the relative .eml file in Alfresco. I want to change the name of the file created (Message_xxx.eml) with the subject of the email, how i can do this?

I've tried putting this line
messageSubject to cm:name

into "Email Mappings" into the Records Management Console.

Someone can help me?
8 REPLIES 8

mrogers
Star Contributor
Star Contributor
It should work.

rascio
Champ in-the-making
Champ in-the-making
I have to restart alfresco after i made this setting?

It this the only way to do this?

mrogers
Star Contributor
Star Contributor
Are you extracting to an RM folder.   In which case you should be able to use the RM admin console.

rascio
Champ in-the-making
Champ in-the-making
I've seen that the behavior is the same if i put the content in an rm folder or in a normal space, and not all the mappings works. I've tried to change some mapping and don't seems work correctly…maybe the better solution is create a rule at the top of alfresco and change the name from this one.

rascio
Champ in-the-making
Champ in-the-making
I've see the code of the class org.alfresco.module.org_alfresco_module_dod5015.email.CustomEmailMappingServiceImpl, this class modify the extracter.RFC822 (org.alfresco.repo.content.metadata.RFC822MetadataExtracter) and adds to it the custom mapping defined in the jsonMapping.json.
But reading the wiki about the MetadataExtractor:
When a property already exists, it is not overwritten by the extractor.

The cm:name is a mandatory parameter, so is possible that when the RFC822MetadataExtracter extract the metadata and insert into the node the cm:name is already enhanced?

If it is true, there are some properties that are impossible to overwrite with the Records Management Email Mapping…

I hope I'm wrong Smiley Tongue

mrogers
Star Contributor
Star Contributor
Whether a metadata extractor overwrites existing properties is configurable.     By default, I think the mode is PRAGMATIC which will not overwrite non null values.

rascio
Champ in-the-making
Champ in-the-making
Thank you so much!

I've changed the overwrite policy and working properly.

Now the problem is that the subject of the email don't match the constraints regex ahah.

I will write a behavior that change the name if the subject if the constraints it's ok.

sjeandroz
Champ in-the-making
Champ in-the-making
Hello,

I have the same probleme.

Whene I drag&drop an email to Alfresco using imap, it is created with the name "Message_XXXX".

I don't use the Records Management Console (I don't know if there is an additionnal module to install in order to use this console, or not), so I don't really understand the way you use to resolve this probleme.

Someone could help me to resolve this problem?

Thanks and sorry for my bad level in english