MailScanner bug causing 0 byte tmp files

Report bugs and workarounds
Post Reply
mcspaul
Posts: 3
Joined: 24 Mar 2014 16:46

MailScanner bug causing 0 byte tmp files

Post by mcspaul »

On a recent deployment of EFA (using the build script) I discovered that there is a growing amount of 0 byte temp files in /tmp that are not getting deleted. These files started showing up prior to the system being exposed to email traffic (other than perhaps what is locally generated on the host). Doing a quick search I found multiple message from May-2012 on the MailScanner list that discusses this issue. The person in the message below did some investigation and found the cause. He also provided a fix.

http://lists.mailscanner.info/pipermail ... 99592.html

I am not sure if this is the same issue but it does seem feasible. I do not have the time to test this patch right now but I will try to get to it this upcoming weekend. The message also talks about seeing 0 byte files being left behind in /var/spool/MailScanner/incoming/SpamAssassin-Temp which I am also seeing. Unfortunately the person who sent this message was not able to figure out why those files were being created only when they were getting created. He might have posted at a later date with more info but I do not have the time to do further searches right now.
buzzzo
Posts: 94
Joined: 03 Feb 2014 09:09

Re: MailScanner bug causing 0 byte tmp files

Post by buzzzo »

I've noticed the same things too.

Ending by cleanup the /tmp via tmpwatch.
I've applied the patch only on the clamav sided (simply by adding the rm line).
User avatar
shawniverson
Posts: 3649
Joined: 13 Jan 2014 23:30
Location: Indianapolis, Indiana USA
Contact:

Re: MailScanner bug causing 0 byte tmp files

Post by shawniverson »

Keep us posted on your findings. We'll be happy to apply a patch to fix this or a workaround. I am seeing this also. :D
mcspaul
Posts: 3
Joined: 24 Mar 2014 16:46

Re: MailScanner bug causing 0 byte tmp files

Post by mcspaul »

I installed the patch over the weekend and I am happy to report it has resolved the issue. So far I have not seen any unintended side affects but I will continue monitoring for another week or so just to be on the safe side. If anything comes up I will let you all know.

I have not had time to look through the mailing list archive to see if the other issue was ever resolved (stale 0 byte files issue in /var/spool/MailScanner/incoming/SpamAssassin-Temp). Due to my current time constraints I will not be able to investigate this other issue anytime soon.
[rant] As another user pointed out in another forum the mailscanner devs really should have resolved this already since the author of the thread went so far as to provide a fix in 2012. At the very least a reply should have been sent with either a message indicating it will be fixed or why it will not be fixed. I would go an register this as a formal bug but as far as I can tell from their website they do not have a formal bug submission process. That means that any reported and confirmed bugs maybe forgotten about. Based on the postfix devs statement that the mailscanner devs refuse to work with them to officially support postfix I guess I am not surprised. Mailscanner manipulates the postfix mail queue directly instead of using any of the mechanisms postfix has in place to interact with mail. This has the potential to cause mail corruption or even loss. There is no reason for mailscanner to manipulate the queue directly since other mechanisms are provided and supported by postfix. If it was not for the mailwatch front-end I would have suggested EFA switch to something like amavisd-new. [/rant]
buzzzo
Posts: 94
Joined: 03 Feb 2014 09:09

Re: MailScanner bug causing 0 byte tmp files

Post by buzzzo »

I think all tmp file issues could be fixed by the following: https://github.com/MailScanner/MailScanner/pull/4
Post Reply