You are not logged in.

#1 2007-06-05 12:57:24

DeepThoughts
Member
From: Norther part of Sweden (Piteå)
Registered: 2006-04-11
Posts: 44
Website

Mailserver on subdomain?

After som serious head scratching I've gotten a mailserver up and running.

The software I've chosen is postfix and dovecot.

It works fine and I can send and recive mail without problems. I do have one question. How do I make the servers listen on mail.domain.com instead of domain.com as it is now. I want the e-mail address to be name@domain.com but the servers to be mail.domain.com

Could someone give me any hints on how to decipher the config files and MX-records?


Stefan Nitsche
stefan_at_nitsche_dot_se

Offline

#2 2007-06-05 14:51:56

TheDoctor
Member
From: Ontario, Canada
Registered: 2005-06-28
Posts: 63
Website

Re: Mailserver on subdomain?

You should have no problem with postfix accepting mail for both domain.com and mail.domain.com, providing mail.domain.com is your mailserver's name.  If it isn't, then you can also accept mail by hacking main.cf to accept mail for all kinds of domains. 

check out the line in main.cf with mydestination in it:

 
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain, www.$mydomain, ftp.$mydomain.

For the MX record, your named zone file should look something like this one, assuming that you are using BIND:

$ORIGIN .
$TTL 86400      ; 1 day
domain.com               IN SOA  server.domain.com. yourmailacct.domain.com. (
                                46         ; serial
                                10800      ; refresh (3 hours)
                                900        ; retry (15 minutes)
                                604800     ; expire (1 week)
                                86400      ; minimum (1 day)
                                )
                        NS      server.domain.com.
                        MX      10 mail.
$ORIGIN domain.com.
server              A       192.168.1.1
mail                 A       192.168.1.2
$TTL 300        ; 5 minutes

be aware of the dots at the end of the domains.

Offline

#3 2007-06-08 09:06:24

DeepThoughts
Member
From: Norther part of Sweden (Piteå)
Registered: 2006-04-11
Posts: 44
Website

Re: Mailserver on subdomain?

Thanks!

Although I don't use bind the information was very helpfull and I've managed to get it working as I want. smile

Next I'm going to embark on the adventure of password protecting Postfix. smile


Stefan Nitsche
stefan_at_nitsche_dot_se

Offline

Board footer

Powered by FluxBB