Add to Favourites Add to Favourites    Print this Article Print this Article

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 script.


In it, add the code

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/

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

Don't forget to copy:

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

Was this answer helpful?

Also Read