Email issue for multisite build

Bilal YILMAZ

New member
Joined
Mar 27, 2022
Messages
6
I have a multiwebsite project. I open different sites using different databases; for domains that I define as alias on a host.

I had previously installed the same system on vesta and cpanel. We were able to create an e-mail account for the domain parked or determined as a pointer in other panels. However, we cannot create different mail accounts in the domain defined as alias in DirectAdmin.
For instance;
I set up mysite.com host. I created the [email protected] mail address.
I added othersite.com as alias on mysite.com.
In this case I cannot create [email protected].

I don't understand why this is not allowed. The same system works on other panels.

Anyway, I'm trying to get around this by adding it as a new domain instead of defining it as an alias. In this way, I can create an e-mail address.

However, in this case, the location of the main site files and the files of the new site is different. Is there a way to set document root as the same location for all domains to be created for this user?
 
If you create othersite.com as alias on mysite.com, [email protected] will be automatically created as email alias for [email protected].

You can change the document root in Directadmin -> Custom HTTPD Configurations -> othersite.com ->

Code:
|?DOCROOT=/home/mysite/domains/mysite.com/public_html|
 
thanks for the reply

email alias is not working for me. Because the sites will be owned by different people. Therefore, different e-mail addresses should be created. Mailboxes and passwords must be separate.

I added this definition to Custom HTTPD Configurations. But when I add new domain it still continues to open from its own folder.
I think it is necessary to do this for each domain even if we create it with the same user.

Is there a function where I can do this with the API? Because I will create the domain with api. It doesn't seem possible to do this manually.
 
i guess i found it.

Code:
CMD_API_CUSTOM_HTTPD
Method: POST
domain=domain.com
config=custom httpd.conf data

i will try this code..
 
I don't understand why this is not allowed. The same system works on other panels.
Another way of doing this is to just create othersite.com as domain and then create an automatic site redirection to mysite.com and then you can create all email accounts as you want on both domains.

However I'm not into API so can't help you there. But you don't have to use custom configurations this way.
 
Another way of doing this is to just create othersite.com as domain and then create an automatic site redirection to mysite.com and then you can create all email accounts as you want on both domains.
If I redirect, the domain in the address bar will change, and I cannot find which database to pull data in the software. The entered domain must be found in the address bar.

CMD_API_CUSTOM_HTTPD solved my problem for multi-site setup. At the same time, since they have separate domains, I can create e-mail addresses separately.
 
Back
Top