Setting up a Mail Server in linux

DumbGuy

Senior member
Aug 17, 2000
518
0
0
Hello :)

I just finished moving my server to an static IP (finally!) and now that I have one, I would like to set up a mail server, either qmail or postfix (sendmail might be too open to vulnerabilities?)

Anyways, I've been googling around, but no solid find yet on how to set up a mail server based on either qmail or postfix step by step. Can someone enlight me on a few things?
I have two domains right now; I would like to have emails for both domains. What about the mail relaying? I posted a few weeks ago about this, but didn't quiet get it, what's the deal with the reverse DNS lookup, etc etc?

I'm still googling around.. ;o

BTW, my main concern is since mail-loss. I'm hosting the website from an static IP of Comcast, I don't know if their IPs are spam filtered or whatnot.
 

Soybomb

Diamond Member
Jun 30, 2000
9,506
2
81
http://www.porcupine.org/postfix-mirror/docs.html

The reverse dns thing is as follows. Your mail server connects to another one to send a message to someone. It says, I'm mail.dumbguy.com. The other mail server says well lets see, your ip address is 24.123.123.122 and if I do a reverse lookup on that I get statususer122.detroit.michigan.comcast.com, sorry your reverse dns doesn't match who you claim to be so I won't accept that email from you.

I would say don't expect to not have some problems or loss hosting your mail server on a cable modem. If your mail is that important you need to pay for some hosting.
 

DumbGuy

Senior member
Aug 17, 2000
518
0
0
allright.. I'm getting somewhere now.
I did a reverse lookup on my IP and I got blahblahblah.mia.comcast (just an example). So, how do i get my server to do reverse DNS then? Would it be a problem since I have two domain names? (virtual hosting thru apache)

Oh yeah... about the MX records. Should I do the email handling myself or get another server to do it? what's the best way to do it? I'm sure comcast would not handle emails coming from my server.
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
What you should do is use your ISP's mail relay for relaying mail, that will alleviate the reverse DNS and blacklist issues. This is very trivial to set up. I highly recommend Postfix for the MTA.

As far as your MX record, you probably just want to point it to your same, single address as the A record. I've been doing mail and web hosting on my home cable line for a while now so hopefully I can answer most of your questions. :) Only thing I can't really tell you about is virtual hosting, I just have a single top level domain pointed at me.

BTW, to set you mail relay in postfix, in main.cf, just set relayhost to your ISP's mail server. For example, mine is:

relayhost = mail.mchsi.com
 

Soybomb

Diamond Member
Jun 30, 2000
9,506
2
81
You can't do the reverse dns, since the IP addres is comcasts, their servers are the ones that are asked for the information.

I think you lost me on the mx record question. An mx record shows what the mail servers for a domain are. If you have your own domains and want to run your own mail server, the mail servers ip will be the one in the mx record.
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Originally posted by: Soybomb
You can't do the reverse dns, since the IP addres is comcasts, their servers are the ones that are asked for the information.
As far as mail goes, though, if he's using their mail server as a relay, then the mail will be "coming" from mail.comcast.net or whatever, so reverse dns won't matter.
 

Soybomb

Diamond Member
Jun 30, 2000
9,506
2
81
Originally posted by: BingBongWongFooey
Originally posted by: Soybomb
You can't do the reverse dns, since the IP addres is comcasts, their servers are the ones that are asked for the information.
As far as mail goes, though, if he's using their mail server as a relay, then the mail will be "coming" from mail.comcast.net or whatever, so reverse dns won't matter.

A very advisable suggestion :)
 

DumbGuy

Senior member
Aug 17, 2000
518
0
0
thanks for the suggestions guys.
I went with Qmail and now I gotta figure out how to do the relaying :)

Well, I started doing the relaying. I perfectly sent emails from my mail server to hotmail and yahoo addresses. But I can't seem the get any emails. Let's see what's wrong...
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Some ISP's will provide Reverse DNS for you - I don't know if Comcast is one of them. That would keep you from having to set up the relays.
 

stash

Diamond Member
Jun 22, 2000
5,468
0
0
Hmmm, I don't know why. It should work. But I dont use POP, so I never really checked. IMAP is much better than POP.
 

stash

Diamond Member
Jun 22, 2000
5,468
0
0
qmail-pop3d is included in those instructions, so it should be working.