2

I'm trying to install a mail server on my root server.

There are many many how to's on the internet I tried to get my own mail server with IMAP/SMTP. Also maybe some virus/spam detection.

I've got a Root Server (CentOS 6.4) and a own domain (let us say 'morekings.com').

I want to have some email adresses (admin@morekings.com, peter@morekings.com, etc). Nice would be some kind of encryption (ssl/tsl). But I have no official cert.

Roughly speaking I removed sendmail, installed postfix and cyrus and configured it. Among others for example I tried this tutorial https://www.digitalocean.com/community/articles/how-to-install-postfix-on-centos-6

In main.cf of Postfix I used this:

myhostname              = mail.morekings.com 
mydomain                = morekings.com

Is this right?

At least I got it to send mails via Thunderbird and send/receive via telnet.

1

myhostname: is the host name of the system (i.e, the system is called mail or mail.example.com). You can find it in /etc/hosts or /etc/hostname

mydomain: is the domain name for the email server (it can be a real or fake domain name). So when you add a mail user foo for your configuration his mail will be foo@morekings.com. If you set it like mydomain=mail.morekings.com than it will be *foo@mail.morekings.com*... If you usemyorigin = $mydomain`

This is the default settings on postfix, if you don't specify mydomain.

See here

  • first line is for IPv4, so consider changing your hostname like, for example, 127.0.0.1 mail.morekings.com mailmorekings localhost.localdomain localhost, change HOSTNAME=mail.morekings.com in /etc/sysconfig/network and do /etc/init.d/network restart or like in example here . Ofcourse if you have public IP or you will be relaying you mail to some other server, you need to tell your DNS that mail.morekings.com has that IP. – mirkobrankovic Jun 28 '13 at 13:11
  • Sorry that I deleted my comment. I just wanted edit it again but it wasnt possible anymore. I'm really new to this stackexchange network. I know this is a little bit off topic and doesnt treat my question but: Why do I have to change my hosts file? www.morekings.com forwards to my public IP adress already. Is it just for internal behaviors? In my etc/sys/config/network also only is this line: NETWORKING=yes. I guess I have to read some more about this. Do you maybe have some helpfull article for me? – HeyILikeYouAlot Jun 28 '13 at 13:15
  • what is the output of hostname, if you already registered that hostname with your DNS, than in postfix: myhostname=<output you get from hostname>, and if it's morekings.com than keep mydomain=morekings.com. If this isn't mail server only – mirkobrankovic Jun 28 '13 at 13:23
  • hostname is xxxxx.servers.jiffybox.de which is not my morekings.com but the adress which is given from my root server provider. – HeyILikeYouAlot Jun 28 '13 at 13:26
1

Take a look at the ISPmail tutorials, their are made for Debian releases but it's easy to modify them for CentOS. They are not only explaining how to install and configure basic services but how to put them all together in to a professional mail server with antivirus and spam filters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.