Skip to content
Gospo promo
Gospo promo

Latest Updates

  • Home
  • Insurance
  • Education
  • About Us
  • Contact Us
  • Privacy Policy
Gospo promo

Latest Updates

How to set webmail server system in DirectAdmin panel

gospopromo, September 6, 2021

This article contains step by step on how to set webmail system for DirectAdmin users who have root access on their hosting.

This article works only for VPS, cloud, and dedicated hosting who have root access to their package with simple instruction.

Here we, let’s set up the webmail system in DirectAdmin,

  1. The domain and hostname used on the system should be different.
  2. We need to add the hostname in /etc/virtual/domains file.
  3. Do not add the hostname details in/etc/virtual/domainowners file.
  4. The hostname must resolve. If not, then we need to add the A record into the DNS zone such that the hostname resolves.
  5. The directory /etc/virtual/<hostname> must be available in the server without any files under that.
  6. We need to add the details of the domain, which is used by the mail system in both the /etc/virtual/domains file and the /etc/virtual/domainowners file. Furthermore, the system must have /etc/virtual/<domain> file, /etc/virtual/<domain>/passwd and /etc/virtual/<domain>/aliases files.
  7. File permission of the virtual pop inboxes should be set as below (excluding Dovecot/Maildir):
    /var/spool/virtual/<domain> 770 username:mail
    /var/spool/virtual/<domain>/* 660 username:mail 
  8. Ensure that the hostname is not having any uppercase letters.
  9. Ensure that the main server IP has set reverse lookup on it.

Here are the steps to rebuild /etc/virtual/domainowners file if it is empty;

Create a script under /etc/virtual folder with the name fix_domainowners.sh.

cd /etc/virtuals

vi fix_domainowners.sh

Press “i” to go into insert mode and update the below code into it.

#!/bin/sh
for u in `ls /usr/local/directadmin/data/users`; do
{
for d in `cat usr/local/directadmin/data/users/$u/domains.list`; do
{
echo “$d: $u”
for p in `cat /usr/local/directadmin/data/users/$u/domains/$d.pointers | cut -d= -f1 2>/dev/null`; do
{
echo “$p: $u”
}
done;
}
done;
}
done;

Exit insert mode (ctrl+c), then save and exit (click shift+Z twice) the file. Then run the below code in the command prompt:

chmod 755 fix_domainowners.sh
./fix_domainowners.sh > domainowners
chmod 644 domainowners
chown mail:mail domainowners

Done.

Post Views: 610
Hosting DirectAdminWebmail

Post navigation

Previous post
Next post

Related Posts

Hosting

How to set one click auto-login for PhpMyAdmin in DirectAdmin panel

September 6, 2021

This article contains step by step on how to enable one click autoi-login for PhpMyAdmin…

Read More
Hosting

9 Points to consider on choosing best web hosting

November 18, 2021

There are many companies around the world provides web hosting with a lot of features,…

Read More
Hosting

10 Best Managed Cloud WordPress hosting for 2021

September 14, 2021

Managed Cloud hosting are best web hosting for all kind of traffic, especially for those…

Read More

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Best Medical Schools in New York 2024-2025
  • List of All Nursing Colleges And Schools in South Africa
  • Life Insurance Policy For Foreigners in USA: Navigating Coverage Options and Requirements
  • Deriv Online Trading Platform-The Best Platform to Trade With
  • How Does Car Insurance Work
©2025 Gospo promo | WordPress Theme by SuperbThemes