S
S
Sergey Abramov2011-07-13 23:46:35
Email
Sergey Abramov, 2011-07-13 23:46:35

One server + multiple domains?

the question is essentially this: there is a server. it hosts several sites with their own domains. ip one for all. it is necessary to make sure that each site has its own mail with its own pop3 and smtp. e.g. site example.com, mail: pop3.example.com and smtp.example.com. And so it is with every site. in which direction to dig?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
J
Juggler, 2011-07-14
@gnusy

The task consists of two parts 1. Setting up
DNS A - record
- you need to register its IP for each web and mail host . 111.111.111.111 A mail.domain2.ru 111.111.111.111 MX record - points to the mail server for the domain, with priorities MX domain1.ru mail.domain1.ru MX domain2.ru mail.domain2.ru 2. Setting up the server part - for Apache - make virtual servers in the config
- for the mailer (sendmail) - probably similar, but I have never set it up. There it is necessary to register a list of supported domains and mailboxes with aliases for each domain
As a result,
- websites - when typing www.domain1.ru or www.domain2.ru in the browser , the name will resolve to 111.111.111.111 . When entering there, the Apache will receive information about which domain was requested and will work in accordance with it.
- mail - when you try to send to [email protected], the remote SMTP server will take the MX-record, get an IP for it and connect to your mailer. When you try to send mail to [email protected], your mailer will check that it serves the domain1.ru domain and that it has a corresponding mailbox. After that, he will receive the message and put it in the box.
This is very briefly. The question is comparable in complexity to “How the Internet works” ...
Setting is necessary in order to

V
VBart, 2011-07-14
@VBart

Dig aside what is a domain, what is an MX record.

F
Fyodor, 2011-07-14
@Richard_Ferlow

It is better to park all domains on domain.yandex.ru, and to make the sites work, create A records.
Because it is extremely dreary to organize full-fledged mail on your server. If you set it up, problems with delivering mail to recipients will begin to appear due to all sorts of spam filters.

A
Alexander, 2011-07-14
@Alexx_ps

"Yandex-mail for a domain", there is an instruction for setting up MX records. Google also has such a service, everything is free.

A
Alex Bunin, 2011-07-14
@azxc

Not enough information. A lot of things depend on the OS and on the type of software used.
For example, for the web on Apache, you can easily create virtual hosts by name on one IP.
For mail, there are, for example, vpopmail and other similar products. Usually there, authorization goes not just by login, but by the whole e-mail address, so the system knows which domain is connected.
Several different services for imap/pop3 work with the same vpopmail. For example, dovecot is quite popular.

S
smartlight, 2011-07-14
@smartlight

the web hosting control panel will save you ,
it will do everything for you.
They are paid, but there are also free ones.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question