When I run the spamassassin command on an email, it properly identifies the email as spam and appears as if the headers have been added. But the file is not actually updated and the headers remain the same. Because of my reputation here, I cannot post the actual output of the commands. Any help is appreciated. Thank you.
To start, /etc/spamassassin/local.cf has 'report_safe 0'
Basically, I am running the following command on a single email, as an example.
mike@servo:/mnt/filestore/mail/mike$ spamassassin INBOX/cur/1476677884_0.3597.servo\,U\=678\,FMD5\=7e33429f656f1e6e9d79b29c3f82c57e:2\,
The result of this includes the entire email with the X-Spam headers visible. In this case, "X-Spam-Status: Yes, score=24.0 required=5.0" as an example.
I am then just viewing the file with 'more' afterwards. But the X-Spam headers are not visible. Nothing is changed.
mike@servo:/mnt/filestore/mail/mike$ more INBOX/cur/1476677884_0.3597.servo\,U\=678\,FMD5\=7e33429f656f1e6e9d79b29c3f82c57e:2\,
Edit: I also wanted to point out that using the spamc command instead of spamassassin results in the same. Unless I am totally mistaken on how this is supposed to behave - the commands should actually write the file not just output the result, correct? - then perhaps this is a permission issue? It appears that the user that was installed with spamassassin is debian-spamd, all of my mail is stored as -rw-rw-r-- mike:mike. I cannot find any logs to prove a permission error, however.
– Simply8219 Oct 17 '16 at 23:39How would I do this on the folder versus a specific file? 'spamassassin INBOX/cur/*' will cycle through each message in the folder. But how would I define the files to write?
Is it possible to force deletion on the original file? My plan was to read the folder after spamassassin ran to find any files containing 'X-Spam-Flag: YES' and move it to the junk folder. This step may not be needed if I can write the new file directly to the junk folder. But, I will still need to deal with the original file.