cancel
Showing results for 
Search instead for 
Did you mean: 

Inbound Email Attachment Version Control?

gregj
Champ in-the-making
Champ in-the-making
I finally got Alfresco Community (on my home PC) to take inbound emails.  At work, my coworker had already gotten Alfresco to do the same thing.  But if I send a follow-up email with the same file, the system saves the attachment as a separate file.  So file name M4s.xls is unaffected but I see a new file, M4s(1).xls and perhaps M4s(2).xls and so on.

I have done a few forum queries and tweaked a few settings without success. 

Is there a way to version control attachments?  Or is this something I'll need to do via code?
5 REPLIES 5

jpotts
World-Class Innovator
World-Class Innovator
I believe you are going to have to customize the inbound SMTP class so that when it finds a matching attachment name in the folder it creates a new version rather than creating a new object.

I don't know of a setting that allows you to do that through config, but I could be wrong.

Jeff

mrogers
Star Contributor
Star Contributor
There's an overwrite duplicates setting.   Look at the smtp documentation. 

Sorry cant paste a link on an iPad.

gregj
Champ in-the-making
Champ in-the-making
I think I found the setting.  That would be a line to add to alfresco-global.properties in the Inbound SMTP section?  And then attachments ought to overwrite?  (If I am wrong, you may need to perform a flying tackle to stop me. This looks fairly straightforward to implement.)

If I understand, that might be very useful in at least a couple of scenarios I currently envision.  In other cases, I may have to refer back to Mr. Pott's idea of customizing.

Thanks!

gregj
Champ in-the-making
Champ in-the-making
Adding the setting in alfresco-global.properties file, and then setting up a rule in the subdirectory to assign the versionable aspect makes the mail, itself, do what I'd hoped.  I can make some use of that.

But the attachment appeared to do the same thing it did before.  So it sounds like I may have to dig into code to get the exact behavior I want.

Again, thanks!

eihab86
Champ in-the-making
Champ in-the-making
The default behavior of Alfresco when you add a new file with the same name of an existing one is to change the name of the added file and not to create new version of it. So I think yes you should modify the code the following link may be useful:

https://forums.alfresco.com/forum/end-user-discussions/alfresco-share/versioning-files-same-name-020...