|Since there will always be a system email account with any new DA User, sometimes Admin's do not wish it to be active, as many clients simply don't know it's there or don't use it. It can then fill up with a lot of email, causing disk usage issues.|
One solution is to disable the account for any domain created under that User. Note that the actual firstname.lastname@example.org value will still be active (can be disabled in /etc/aliases if you really want), but for the most part, disabling the alias email@example.com -> firstname.lastname@example.org will be sufficient for most cases.
The email@example.com is actually a forwarder to the hostname, so in this guide we're just going to disable that forwarder.
1) Create the following script:
/usr/local/directadmin/scripts/custom/domain_create_post.shand in it, add the following code:
2) Chmod the script to 755:
chmod 755 /usr/local/directadmin/scripts/custom/domain_create_post.sh
3) You can manually test the script, and/or run it for existing accounts as follows:
4) Expanding on tip #3, you can run this for all existing accounts automatically with this script:
|Disable "Local Mail Server" by default for new domains|
|Why is there a system email account for all domains I create?|
© 2018 JBMC Software, Suite 173 3-11 Bellerose Drive, St Albert, AB T8N 1P7 Canada. Mon-Fri 9AM-5PM MST