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.

 
email/disable.txt · Last modified: 2010/02/22 05:58 by muscardin
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Please visit Automatic Backlinks to start earning free backlinks Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki