cancel
Showing results for 
Search instead for 
Did you mean: 

failed email parsing from MFP

chrisokelly
Champ on-the-rise
Champ on-the-rise
Hi,

We have set up the inbound email server in Alfresco 4.0.e Community. The main purpose of this was so that employees could scan documents at any of the MFD's on the network and have them instantly in the CMS. These MFDs have been around for some time and most staff are already comfortable using them to email documents to themselves.
I set up a folder with the alias 'test' to test the system and I have no problems sending to it from 99% of sources. My company exchange sends to the folder without a problem and they show up having come from my user account. My gmail and hotmail accounts send email to the folder which shows up having arrived from the unknownUser I set up. Even when I use telnet to imp an email coming from a non-existing address (what@thisaddresscouldneverbereal.strange) it arrives no problem (also from the unknownUser property). This also works fine with attachments for all the above examples apart from telnet (there probably is a way to include an attachment over telnet but I don't know what it is, so I didn't try).

When using the MFD to email a scanned document, the whole process falls over. If I send to myself from the MFD I get a message like so:

from:Konica@companyDomain.com.au
subject: Message from KMBT_C203 SAO2E042004160
attachment: SKMBT_C203 12110714490.pdf

but if I send to test@docs.companyDomain.com I get a single file in the target folder called 'Message from KMBT_C203 SAO2E042004160' but no separate attachment. The content of the 'Message from…' file appears to be the pdf attachment-
%PDF-1.4
1 0 obj
<</Type /XObject
/Subtype /Image
/Name /TI1a
/Filter /CCITTFaxDecode
/DecodeParms <</K -1 /Columns 1656 /Rows 2338>>
/Width 1656
/Height 2338
/BitsPerComponent 1
/ColorSpace /DeviceGray
/Length 2 0 R
>>
stream
������2�
…(and so on)

In catalina.out and alfresco.log at this point I see:
2012-11-07 14:49:42,646  ERROR [repo.action.AsynchronousActionExecutionQueueImpl] [defaultAsyncAction2] Failed to execute asynchronous action: Action[ id=2dae9907-472f-4a19-95bc-5a7983503589, node=null ]
org.alfresco.error.AlfrescoRuntimeException: 10076967 Creation of thumbnail 'doclib' failed
        at org.alfresco.repo.thumbnail.CreateThumbnailActionExecuter.executeImpl(CreateThumbnailActionExecuter.java:186)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:196)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:780)
        at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:700)
        at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1$1.execute(AsynchronousActionExecutionQueueImpl.java:403)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:388)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:259)
        at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1.doWork(AsynchronousActionExecutionQueueImpl.java:412)
        at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:519)
        at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper.run(AsynchronousActionExecutionQueueImpl.java:415)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: org.alfresco.service.cmr.repository.ContentIOException: 10076966 Content conversion failed:
   reader: ContentAccessor[ contentUrl=store://2012/11/7/14/49/c4ceab81-eefc-49fa-90c9-077f53c398c2.bin, mimetype=text/plain, size=130838, encoding=UTF-8, locale=en_AU]
   writer: ContentAccessor[ contentUrl=store://2012/11/7/14/49/17099c25-a595-460e-92f1-920d16d1b108.bin, mimetype=image/png, size=0, encoding=UTF-8, locale=en_AU]
   options: {targetContentProperty=null, contentReaderNodeRef=null, contentWriterNodeRef=null, imageResizeOptions=ImageResizeOptions [width=100, height=100, maintainAspectRatio=true, percentResize=false, resizeToThumbnail=false, allowEnlargement=false], sourceContentProperty=null, includeEmbedded=false, imageCropOptions=null, commandOptions=, imageAutoOrient=true}
   limits: {timeoutMs=120000, maxPages=-1, readLimitKBytes=-1, maxSourceSizeKBytes=-1, pageLimit=1, readLimitTimeMs=-1}
   claimed mime type: text/plain
   detected mime type: application/pdf
        at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:198)
        at org.alfresco.repo.content.ContentServiceImpl.transform(ContentServiceImpl.java:589)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.model.ml.MLContentInterceptor.invoke(MLContentInterceptor.java:125)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:175)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:152)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy52.transform(Unknown Source)
        at org.alfresco.repo.rendition.executer.AbstractTransformationRenderingEngine.render(AbstractTransformationRenderingEngine.java:120)
        at org.alfresco.repo.rendition.executer.AbstractRenderingEngine.executeRenditionImpl(AbstractRenderingEngine.java:504)
        at org.alfresco.repo.rendition.executer.AbstractRenderingEngine$1.doWork(AbstractRenderingEngine.java:428)
        at org.alfresco.repo.rendition.executer.AbstractRenderingEngine$1.doWork(AbstractRenderingEngine.java:408)
        at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:519)
        at org.alfresco.repo.rendition.executer.AbstractRenderingEngine.executeImpl(AbstractRenderingEngine.java:407)
        at org.alfresco.repo.rendition.executer.AbstractRenderingEngine.executeImpl(AbstractRenderingEngine.java:369)
        at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:196)
        at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:780)
        at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:700)
        at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:538)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:175)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:152)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy37.executeAction(Unknown Source)
        at org.alfresco.repo.rendition.RenditionServiceImpl.executeRenditionAction(RenditionServiceImpl.java:281)
        at org.alfresco.repo.rendition.RenditionServiceImpl.render(RenditionServiceImpl.java:183)
        at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.createThumbnailNode(ThumbnailServiceImpl.java:588)
        at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.access$000(ThumbnailServiceImpl.java:67)
        at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$1.doWork(ThumbnailServiceImpl.java:262)
        at org.alfresco.repo.thumbnail.ThumbnailServiceImpl$1.doWork(ThumbnailServiceImpl.java:259)
        at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:519)
        at org.alfresco.repo.thumbnail.ThumbnailServiceImpl.createThumbnail(ThumbnailServiceImpl.java:258)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:46)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.alfresco.repo.audit.AuditMethodInterceptor.proceedWithAudit(AuditMethodInterceptor.java:232)
        at org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:199)
        at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:152)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy123.createThumbnail(Unknown Source)
        at org.alfresco.repo.thumbnail.CreateThumbnailActionExecuter.executeImpl(CreateThumbnailActionExecuter.java:177)
        … 12 more
Caused by: org.alfresco.service.cmr.repository.ContentIOException: 10076965 Content conversion failed:
   reader: ContentAccessor[ contentUrl=store://2012/11/7/14/49/c4ceab81-eefc-49fa-90c9-077f53c398c2.bin, mimetype=text/plain, size=130838, encoding=UTF-8, locale=en_AU]
   writer: ContentAccessor[ contentUrl=store:///opt/alfresco-4.0.e/tomcat/temp/Alfresco/ComplextTransformer_intermediate_txt_8401600942918654860.pdf, mimetype=application/pdf, size=0, encoding=UTF-8, locale=en_AU]
   options: {targetContentProperty=null, contentReaderNodeRef=null, contentWriterNodeRef=null, imageResizeOptions=ImageResizeOptions [width=100, height=100, maintainAspectRatio=true, percentResize=false, resizeToThumbnail=false, allowEnlargement=false], sourceContentProperty=null, includeEmbedded=false, imageCropOptions=null, commandOptions=, imageAutoOrient=true}
   limits: {timeoutMs=120000, maxPages=-1, readLimitKBytes=-1, maxSourceSizeKBytes=1024, pageLimit=1, readLimitTimeMs=-1}
   claimed mime type: text/plain
   detected mime type: application/pdf
        at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:198)
        at org.alfresco.repo.content.transform.ComplexContentTransformer.transformInternal(ComplexContentTransformer.java:255)
        at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:171)
        … 90 more
Caused by: org.alfresco.service.cmr.repository.ContentIOException: 10076964 OpenOffice server conversion failed:
   reader: ContentAccessor[ contentUrl=store://2012/11/7/14/49/c4ceab81-eefc-49fa-90c9-077f53c398c2.bin, mimetype=text/plain, size=130838, encoding=UTF-8, locale=en_AU]
   writer: ContentAccessor[ contentUrl=store:///opt/alfresco-4.0.e/tomcat/temp/Alfresco/ComplextTransformer_intermediate_txt_8401600942918654860.pdf, mimetype=application/pdf, size=0, encoding=UTF-8, locale=en_AU]
   from file: /opt/alfresco-4.0.e/tomcat/temp/Alfresco/OpenOfficeContentTransformer-source-3116534920816232648.txt
   to file: /opt/alfresco-4.0.e/tomcat/temp/Alfresco/OpenOfficeContentTransformer-target-6189493223013695567.pdf
        at org.alfresco.repo.content.transform.OpenOfficeContentTransformerWorker.transform(OpenOfficeContentTransformerWorker.java:249)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:65)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
        at $Proxy11.transform(Unknown Source)
        at org.alfresco.repo.content.transform.ProxyContentTransformer.transformInternal(ProxyContentTransformer.java:76)
        at org.alfresco.repo.content.transform.AbstractContentTransformer2.transform(AbstractContentTransformer2.java:171)
        … 92 more
Caused by: net.sf.jooreports.openoffice.connection.OpenOfficeException: conversion failed; java.lang.NullPointerException
        at net.sf.jooreports.openoffice.converter.OpenOfficeDocumentConverter.convertInternal(OpenOfficeDocumentConverter.java:114)
        at net.sf.jooreports.openoffice.converter.AbstractOpenOfficeDocumentConverter.convert(AbstractOpenOfficeDocumentConverter.java:75)
        at org.alfresco.repo.content.transform.OpenOfficeContentTransformerWorker.transform(OpenOfficeContentTransformerWorker.java:244)
        … 102 more
The section of my alfresco-global.properties relating to inbound email is:
email.inbound.enabled=true
email.inbound.unknownUser=alfresco.anon
email.server.enabled=true
email.server.port=25
email.server.domain=docs.companyDomain.com
email.server.connections.max=3
email.server.auth.enabled=false
email.server.enableTLS=true
email.server.requireTLS=false
email.handler.folder.overwriteDuplicates=false

I have some suspicions that this may be to do with the Konica-sent emails being without a body. Although I haven't been able to reproduce by sending emails without a body, I am guessing my email client does not actually send a totally empty body. Has anybody else experienced this behavior with a Konica MFD before or does anybody have any thoughts or suggestions?

Oh one final thing - I added  log4j.logger.org.subethamail.smtp.server.ConnectionHandler=debug to my log4j properties based on the wiki, but saw no extra logging. I'm not sure if this is because there is genuinely nothing to report from the email server or because this info is outdated. Can anybody confirm that this is the correct log4j property?
2 REPLIES 2

mrogers
Star Contributor
Star Contributor
Please raise a JIRA with an example of the message that is causing problems.   Or a wire shark capture.

Turning debug loggi g on for that class should still work however it doesn't appear that your problem is in that class.   I suggest you turn on debug loging for the email handlers or the entire email package

chrisokelly
Champ on-the-rise
Champ on-the-rise
Hi,

When you say to include the message, is there a way I can intercept the message source on the Alfresco side? I spent yesterday looking for any logging whatsoever on the Konica Minolta for sent emails and came up empty handed. I could also attach the message as it appears once I receive it in Outlook, but I believe that by then the message has been fudged by Exchange/Outlook anyway (also the problem is not apparent in the message as it arrives in my inbox or as forwarded from there). I only have a vague idea what wireshark does, but won't I need to be able to run it on one of the two machines? Obviously I can't run it on the MFD, and the alfresco server is Ubuntu 10.04 - with no GUI. Will wireshark run in a pure CLI environment?

As it is we have worked around this for now by using the FTP feature of the MFD instead and setting up the Alfresco FTP server - so I am unlikely to look too hard at this in the near future.