Wierd Spamtrap Log Entries

My maillog is filled with these messages:

unable to create lock file /var/virtualmin-traps/spam/120464942112376.lock: Permission denied

Any ideas?

Status: 
Closed (fixed)

Comments

Does that file /var/virtualmin-traps/spam/120464942112376.lock exist, and if so which user and group own it ?

Also, does deleting it fix the problem? It is quite safe to remove ..

There are no .lock files in that directory at all actually. There are many files with just numbers, in fact 120464942112376 which matches the 120464942112376.lock is in there. All owned by root, and the folder is owned by root.

Ok, those files are expected .. they contain the email sent to the spamtrap address, per domain.

What are the permissions on the spamtrap directory? It should be world-writable (mode 777).

/var/virtualmin-traps/ /var/virtualmin-traps/spam/ /var/virtualmin-traps/ham/

are all 755, should they all be 777?

Yes, they should be 0777 .. or 01777

Apparently messages sent to spamtrap are now being returned with this message:

cannot append message to file /var/virtualmin-traps/spam/120464942112376: file is executable

That's a new one .. does it help if you make those files mode 666 instead of 777 ?

Seems to have fixed it. Thanks.

Cool .. I will make sure Virtualmin sets the permissions as 666 on those files in future.

Well I am still having issues with this. Apparently it is back to :

cannot append message to file /var/virtualmin-traps/spam/120464942112376: cannot open file: Permission denied

Which makes no sense as everything is 1666.

Are all the parent directories readable and listable by all users?

I had changed it to 1766 and ran some more tests and can't see it in the logs and got no bounces. But that happened last time too before it started sending bounces again... We'll see

btw, all the parent directories are 755.