Disable "Local Mail Server" by default for new domains

If all new domains are going to have their mail hosted remotely, and you wish to have this option set by default you can do so with the domain_create_post.sh script.

Create:
/usr/local/directadmin/scripts/custom/domain_create_post.sh

In it, add the code

#!/bin/sh
FILE=/etc/virtual/domains
cp -f $FILE $FILE.backup
grep -v -e "^$domain\$" $FILE > $FILE.tmp
mv -f $FILE.tmp $FILE
chmod 644 $FILE
chown mail:mail $FILE
exit 0;

save/exit.  Then type:

chmod 755 /usr/local/directadmin/scripts/custom/domain_create_post.sh



Any newly domains created after this point should not be in the /etc/virtual/domains.

Don't forget to copy:
/usr/local/directadmin/data/templates/dns_mx.conf

to the custom folder (in that same directory) and edit the custom/dns_mx.conf for the correct default vaules.


Was this article helpful?

mood_bad Dislike 2
mood Like 0
visibility Views: 30956