comments in .spamassassin/user_prefs?

jigster

Verified User
Joined
Jul 23, 2021
Messages
84
Can we add comments to /home/USERNAME/.spamassassin/user_prefs? If so, in what format (# or // etc.)?

I've written a roundcube plugin to whitelist email addresses in webmail using DirectAdmin's API, and my idea is to put a timestamp as a comment with the 'whitelist_from' entry in /home/USERNAME/.spamassassin/user_prefs so that I can run a cron once a week/month to remove old entries (e.g. older than a year), to keep the whitelist list size down.

Thanks
 
Hello,

The file /home/USERNAME/.spamassassin/user_prefs will be overwritten by Directadmin and you will loose your customization. In order to achieve the desired you might need to disable DirectAdmin overwriting the file, or use a different file for comments. Unless there are POST/PRE hooks that can be used for this.
 
Thanks for your help/suggestions. I've changed my roundcube plugin to add the timestamp/whitelist details to a separate file so I can use that for removing old listings with a cron.
 
Back
Top