I am facing a similar issue that was reported here https://github.com/phax/as2-lib/issues/103, while I am using as2-lib v5.1.2 where the error reported in #103 is already fixed.
It seems the root cause is the same, the SMIMEUtil.toMimeBodyPart call.
In my case the method is invoked in AS2ReceiverHandler.decompress().
The SMIMEUtil.toMimeBodyPart method is called without the AS2ResourceHelper.createTempFile() parameter in AS2ReceiverHandler.
I suppose this is the reason why the temporary bcMail*.mime files are not cleaned up by AS2ResourceHelper.
When compression is not used, no mime file is generated in /tmp directory.
I am facing a similar issue that was reported here https://github.com/phax/as2-lib/issues/103, while I am using as2-lib v5.1.2 where the error reported in #103 is already fixed.
It seems the root cause is the same, the SMIMEUtil.toMimeBodyPart call. In my case the method is invoked in AS2ReceiverHandler.decompress().
The SMIMEUtil.toMimeBodyPart method is called without the AS2ResourceHelper.createTempFile() parameter in AS2ReceiverHandler. I suppose this is the reason why the temporary bcMail*.mime files are not cleaned up by AS2ResourceHelper. When compression is not used, no mime file is generated in /tmp directory.