Disable "Local Mail Server" by default for new domains


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


Top Level » Email

Disable "Local Mail Server" by default for new domainsLast Modified: Jan 5, 2009, 5:11 pm
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.
 
Related Helpfiles
Using an external Mailserver

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