I wish to change the default spam settings for new domains

Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"

Top Level » Email » Spam

I wish to change the default spam settings for new domainsLast Modified: Jan 20, 2016, 11:35 pm
Similar to the guide to enable SpamAssassin by default, this guide will explain the basics as to how to change the per-domain spam options for a newly created domain.

Using the domain_create_post.sh, you'll want to have your script edit the /etc/virtual/$domain/filter.conf file.  This is where the per-domain settings are.  To find out the setting you need to change, edit a test domain through the normal SpamAssassin/SpamFilters interface through DA, and take note of which option changed.  This will tell you what change you need to make with your script.

For example, if you wish to set the filter.conf to use

Send the spam to the user's spam folder.

by default for new domains, you'd have a domain_create_post.sh with this content:

if [ -e $F ]; then
   echo "where=userspamfolder" >> $F
   echo "action=rewrite&value=filter&user=$username" >> /usr/local/directadmin/data/task.queue

and chmod the script to 700.
Related Helpfiles
How to enable SpamAssassin/rspamd for new accounts

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST