PDA

View Full Version : how alias all sub domains to one



MS_Dark
07-29-2010, 01:55 PM
hi all.
i install a Mail client to one of own account now i want to alias all domains mail subdomain to my own domain.

like this.

mail.mydomain.com => this is where i install mail client.
now i want to all domain mail subdomain alias to this domain like this.

when type mail.anotherdomain.com show my mail client on mail.mydomain.com
but with mail.anotherdomain.com url. (like pointer).

any one can help me?

mr.applesauce
07-30-2010, 02:18 PM
Use htaccess redirect then.

You can search on google.

MS_Dark
07-31-2010, 12:59 PM
thank you for This solotion but any one dont have bether solotion ?
i want all domain redirect so i cant change all domains htaccess file ...
or maybe users change this file.
i want make this defoult when i create new domain or add new user auto domain alias on mail.!

zEitEr
08-05-2010, 02:40 AM
I do know.

See my example with webmail subdomain (it's not good to use mail.anotherdomain.com, because it is used for SMTP/POP3 server, that can have some other IP):

1. First of all add


webmail=|IP|

to usr/local/directadmin/data/templates/custom/dns_a.conf

2. Run


echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue

3. Create /etc/httpd/conf/extra/httpd-custom-webmail.conf with:


<VirtualHost YOUR_SERVER_IP_HERE:80>
ServerName webmail.shared
ServerAlias webmail.* webmail.shared
DocumentRoot YOUR_WEBMAIL_DOCUMENT_ROOT_HERE
SuexecUserGroup webapps webapps
</VirtualHost>

4. Add


Include /etc/httpd/conf/extra/httpd-custom-webmail.conf

into file /etc/httpd/conf/extra/httpd-includes.conf

5. Restart apache.

6. Wait DNS to update and check it out with webmail.anotherdomain.com

Do you have root shell? Are you good enough to edit httpd config via shell? If no, I can do it for you.

MS_Dark
08-08-2010, 11:14 AM
Hi zEitEr
Thank you for your solution .
i try to do this i think its good
i make with pointer and i add every domain mail sub-domain point to one domain.
and make it web mail.
but this is good.
I try this and gave feedback.
Thank you again.