LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-18-2004, 06:40 PM   #1
Snerkel
Member
 
Registered: Jul 2004
Location: England
Distribution: 1 Gentoo 2005.0 system(desktop), 1 hardened-gentoo SeLinux stage1 server ;)
Posts: 262

Rep: Reputation: 30
A questiong about setting up a mail server


ok i am setting up qmail server and im not 100% sure what to enter in this bit of the config.

Quote:
{b}vi /var/qmail/supervise/qmail-pop3d/run[/b}
Find "mail.example.com" and change it to your server's hostname. For example: mail.mydomain.com.
ok what i need to know is, my domain (which i wish to recive email for) is snerkel.org.

a) Do i need to create a sub domain mail.snerkel.org ? if so then where should i forward it to ?

b) My server hostname is also snerkel.org, so should i set mail.example.com to snerkel.org or what ? i want to recive email for "@snerkel.org" not "@mail.snerkel.org" (as in endings of the email addy)

im confused can anyone clear things up ?

im using the www.qmailrocks.org guide and it is very good i just cant understand this bit.

if anyone can help i would be very greatful

Ben

edit: its not just this part of the setup im confused about i get confused when ever i need to do something in this area.

Last edited by Snerkel; 08-18-2004 at 06:43 PM.
 
Old 08-19-2004, 07:59 AM   #2
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
>> a) Do i need to create a sub domain mail.snerkel.org ? if so then where should i forward it to ?

Yes. You need to forward it to the IP address of your mail server. You'll need an A record and an MX record for it.

In my case, I created mail.mydomain.com and have the system running as mail.mydomain.com. So whenever people send mail to somebody@mail.mydomain.com, I have it forwarded to me@mydomain.com.

You'd probably be wise to change your computer's hostname to something more unique. For example, maybe you name your machines after various birds... like one of them might be robin.snerkel.org or bluejay.snerkel.org. Of course your hostname would just be "robin" and "bluejay". And your mail server might do all of its business as "robin.snerkel.org", and when people send mail to you@robin.snerkel.org, you can have those messages forwarded to you@snerkel.org and everything should work fine.

I don't know if that's the most elegant solution, but it should be a little cleaner and easier to understand and apply to your howto.
 
Old 08-19-2004, 12:04 PM   #3
Snerkel
Member
 
Registered: Jul 2004
Location: England
Distribution: 1 Gentoo 2005.0 system(desktop), 1 hardened-gentoo SeLinux stage1 server ;)
Posts: 262

Original Poster
Rep: Reputation: 30
i only have 1 server and i use it for everything, e.g. web server, mail server, irc server, database server(soon). so would i still give it a host name like blah.snerkel.org or can i just keep it as snerkel.org ?

how do i setup an A record & a MX record ?

ok i was just re-reading your post and so would i just set my hostname to blah ? could i set my hostname to snerkel so e.g. the mail server would use snerkel.snerkel.org or is that stoopid!?

would people have to send an email to me@blah.snerkel.org or could they just email me@snerkel.org?
Do you know or anything on the web thats not to tell you how to setup the mail server just how the whole process works (e.g. like every question ive got!) because i think that i need to know alot and you probally dont want to explain it all!

Thanks for your post it did explain alot but also opened doors to new questions
Anymore help would be greatly apricated.
 
Old 08-19-2004, 12:53 PM   #4
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
Well, if you type in "hostname" at the prompt, it should not say "snerkel.org" because then your fully qualified domain name (a.k.a. your "fqdn") becomes... snerkel.org.snerkel.org See what I mean? Most programs you're running will take your hostname (the output of your "hostname" command) and couple that with your internet domain name. That's why I would choose single names for your hostname like "blah" so you can couple that with "blah.whatever.com".

snerkel.snerkel.org works, but that's a little non-descriptive. Someday you may want to add a second machine, and when you do, having one of them called snerkel isn't very descriptive. But if you're sure you will only ever have one machine, I don't see the harm.

Like I was saying before, you can setup your mail server to accept mail for you@mail.yourdomain.com and have any messages sent to that address automatiaclly forwarded to you@yourdomain.com. So that address you@mail.yourdomain.com does exist and you do have a mail account for it, but you're forwarding everything from there to your "real" address. It's normal to do this and causes no harm. Settings for this are done in your mail server. When you get it setup, you can use vpopmail commands or vqadmin to setup new domains for the account and you can use qmailadmin for setting the forwarding I mentioned.

To setup DNS records, like the A record and the MX record, you probably need to setup a DNS server. If you aren't in the mood to setup a DNS server, there are 3rd party solutions for this problem like www.zoneedit.com which provides a way to setup DNS records for your domain. The problem is, those services usually don't allow you to create PTR records for the domain, which is needed because if you dont' have them, some ISP's will block your messages. You may want to search the forums for this. I was just involved in another thread today where we are discussing this very problem. There's another guy who is getting mail blocked on his server because he has no PTR records.

You may want to call your ISP and ask them if they can setup PTR records for your IP address. So basically they are assigning a domain name to your IP address. So if you decide to setup "mail.yourdomain.com" for your mail server, then you'll need to ask your ISP to set the PTR records for your IP address to be "mail.yourdomain.com".

Try going to the prompt and type "host 123.456.789.0" where the numbers are actually the external IP address of your machine. Let me know what the output shows and I may be able to advise you better. Also, if you're on cable, you may have a problem because cable providers usually don't allow static IPs which also means they cannot provide you with PTR records for your IP.

I don't really know any good sites, but feel free to keep asking questions.
 
Old 08-19-2004, 01:20 PM   #5
Snerkel
Member
 
Registered: Jul 2004
Location: England
Distribution: 1 Gentoo 2005.0 system(desktop), 1 hardened-gentoo SeLinux stage1 server ;)
Posts: 262

Original Poster
Rep: Reputation: 30
[ben@myroom ben]$ host 192.168.0.150
Host 150.0.168.192.in-addr.arpa not found: 3(NXDOMAIN)

i dont have a static ip so i use www.dyndns.org and update my ip with them. i use firevision to manage my domain and i forward my domain (www.snerkel.org) to my dyndns domain.

ok now i think i get the whole hostname thing but do i actually have 2 email addys, @mail.snerkel.org but the mail actually goes to @snerkel.org after forwarding ?

i cant say i will never add another server so i will set my hostname accordingly, saying that i do have another linux b0x which is the main b0x i use.

when i type in "hostname" it does say Snerkel.org so i will change that, but i have never set my domain on my server.

if a added a second machine why would i need it ? would it be e.g. 1 b0x for my web server, 1 for a mail server, 1 for a file server etc. ?

i think i remember something about MX records on dyndns.org, i will find out exactly what they offer for MX records and let you know.

Thanks again for this help i really apricate it
 
Old 08-19-2004, 01:53 PM   #6
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
No, that IP you used won't work. That is a "local" or "non-routable" IP address because it only works behind a router. The IP you need to use should be your external IP address that your ISP gives you. But I think it's probably moot anyhow because you have already said you're using dyndns, which probably means you are on dynamic IP (aka DHCP) so your IP address changes from time to time.

To set your hostname just run...

hostname -s whatever

Where whatever is the hostname you want. Also check "man hostname" to see what other options you can give it. (just a friendly reminder to use the man pages whenever possible)

>> i actually have 2 email addys, @mail.snerkel.org but the mail actually goes to @snerkel.org after forwarding

Yep.

>> would it be e.g. 1 b0x for my web server

Exactly. Seperating your services onto seperate machines helps to offload the burden from the single machine when it starts to take on some load, and it also is more secure because you have less vulnerabilities open on each machine.

I'm sure you can probably set your MX records on dyndns, but the big question is whether you can setup PTR records with them too. I kinda doubt it, but one never knows.
 
Old 08-19-2004, 04:11 PM   #7
Snerkel
Member
 
Registered: Jul 2004
Location: England
Distribution: 1 Gentoo 2005.0 system(desktop), 1 hardened-gentoo SeLinux stage1 server ;)
Posts: 262

Original Poster
Rep: Reputation: 30
sorry i miss read your last message:

[root@myroom linux-2.6.7]# host 81.154.210.25
25.210.154.81.in-addr.arpa domain name pointer host81-154-210-25.range81-154.btcentralplus.com.

ok so if i have 2 addys then what would happen if someone sent an email to @snerkel.org instead of @mail.snerkel.org

is there a way to get round the mail.snerkel.org and just use snerkel.org ?

yeh im using a dynamic IP and its 22.05 now so i will ring BT (my ISP) tomorrow and find out about PTR. i checked dyndns for MX record information but i couldn find anything but ill look again.

Edit:
ok on dyndns the only thing about MX is:

Mail Exchanger (optional): Backup MX?
which has a text box after "(optional)" and a tick box before "Backup"

is this what im looking for ?.

Last edited by Snerkel; 08-19-2004 at 04:19 PM.
 
Old 08-19-2004, 04:23 PM   #8
Snerkel
Member
 
Registered: Jul 2004
Location: England
Distribution: 1 Gentoo 2005.0 system(desktop), 1 hardened-gentoo SeLinux stage1 server ;)
Posts: 262

Original Poster
Rep: Reputation: 30
do you know anything about recompiling the kernel ?
ive got a real problem, this is the error:

[root@myroom linux-2.6.7]# /sbin/mkinitrd /boot/initrd-2.6.7.img 2.6.7
No module sata_sil found for kernel 2.6.7, aborting.

is it something ive missed in the config or what !?

dont worry if you cant help but if not could you sugest anywhere to look ?

Last edited by Snerkel; 08-19-2004 at 04:24 PM.
 
Old 08-19-2004, 04:26 PM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You might want to read the fine print on your ISP's web-site before calling them. Running your own server may technically be against the policy agreement if you have customer rather than commercial service. Just something to keep in mind. Also, for outgoing mail, they may require that you go through their own mail server. In other words port 25 traffic may be blocked for other destinations. This is a measure to combat bogus emails from virus infected windows computers. They don't have much choice in the matter because if they don't do this, they will be blackballed by AOL.
 
Old 08-19-2004, 07:30 PM   #10
Snerkel
Member
 
Registered: Jul 2004
Location: England
Distribution: 1 Gentoo 2005.0 system(desktop), 1 hardened-gentoo SeLinux stage1 server ;)
Posts: 262

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by jschiwal
You might want to read the fine print on your ISP's web-site before calling them. Running your own server may technically be against the policy agreement if you have customer rather than commercial service. Just something to keep in mind. Also, for outgoing mail, they may require that you go through their own mail server. In other words port 25 traffic may be blocked for other destinations. This is a measure to combat bogus emails from virus infected windows computers. They don't have much choice in the matter because if they don't do this, they will be blackballed by AOL.
Ok so can i still send emails ? with my mail server ?
 
Old 08-19-2004, 08:00 PM   #11
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
>> what would happen if someone sent an email to @snerkel.org

Mail is delivered to the account as usual. The only thing you need to realize is... it's just the whatever@mail.snerkel.org simply forwards EVERYTHING to another account of your choosing. So even if somebody sent a message to "dlkfhdskf@mail.snerkel.org" it would still forward that message to your other account. You should get everything setup and you can easily test your setup in every concievable way and I'm sure you'll quickly understand.

>> is there a way to get round the mail.snerkel.org

Honestly, I don't know. Just play around with it when you get everything setup and you may be able to figure out a way. Regardless, I would be VERY grateful if you would come back here and post the answer once you find out. This kind of knowledge is excellent for sharing with others.

>> is this what im looking for

Yes, MX is short for "Mail Exchanger" so yes, that's what you want.

>> do you know anything about recompiling the kernel

Probably want to begin a new thread for this question. This is very off topic and probably best handled by a kernel guru who may not be following this discussion.

>> In other words port 25 traffic may be blocked...

If this is the case, it's easy to work around it. You can use the qmail "smtproutes" file to control how mail is delivered. However, it requires the use of a relay mail server on their network, so they need to have this available, otherwise you're screwed. If you find out port 25 is blocked, just let me know and I'll try to elaborate.

As he said, you may want to try reading all the FAQ's and informations your ISP has available on their website... particularly their terms of service. If it's a long document filled with leagalese, just hit control+F and search the page for "server" and see what comes up.

What jschiwal is trying to say is... If you are running a server on their network, it may be against their policy and if you call them up asking for info, it may put you in the spotlight. If that happens, they may start blocking your ability to do any of this!

But it also stands to reason that if they were really so concerned about people running servers on their network, they would put the appropriate restrictions in place to stop that from happening in the first place. I mean, what good is a TOS if you don't back it up with technical means? i.e. I tell all my employees not to use the telephones in our office after midnight, but yet I leave the phone system on during this time.... it must not be that important!
 
Old 08-21-2004, 10:36 AM   #12
Snerkel
Member
 
Registered: Jul 2004
Location: England
Distribution: 1 Gentoo 2005.0 system(desktop), 1 hardened-gentoo SeLinux stage1 server ;)
Posts: 262

Original Poster
Rep: Reputation: 30
Quote:
Mail is delivered to the account as usual. The only thing you need to realize is... it's just the whatever@mail.snerkel.org simply forwards EVERYTHING to another account of your choosing. So even if somebody sent a message to "dlkfhdskf@mail.snerkel.org" it would still forward that message to your other account. You should get everything setup and you can easily test your setup in every concievable way and I'm sure you'll quickly understand.
ok so what your saying is that people can send an email to me@snerkel.org and it will deliver to the same account as if they emai me@mail.snerkel.org?

Quote:
Yes, MX is short for "Mail Exchanger" so yes, that's what you want.
ok so what would i set the "bsckup MX" to ?

i have had enough time recintly to setup the mail server but as soon as i do i will let you know the out come
 
Old 08-21-2004, 11:43 AM   #13
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
Quote:
ok so what your saying is that people can send an email to me@snerkel.org and it will deliver to the same account as if they emai me@mail.snerkel.org?
Yep.

Quote:
ok so what would i set the "bsckup MX" to
You don't NEED to put anything. You can leave it blank. But this is good if you have a backup mailserver somewhere else that can "stand-in" if the first one goes down. In that case, you just provide the IP of that mail server and be sure it actually works well enough so that if your #1 server goes down, the #2 will pick up where the first one left off.
 
Old 08-23-2004, 08:56 AM   #14
Snerkel
Member
 
Registered: Jul 2004
Location: England
Distribution: 1 Gentoo 2005.0 system(desktop), 1 hardened-gentoo SeLinux stage1 server ;)
Posts: 262

Original Poster
Rep: Reputation: 30
ok so i dont actually do anything for the back up MX because i dont have 1. how do i setup the normal MX record ?
 
Old 08-23-2004, 11:33 AM   #15
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
Uhhhhh... well, that really depends on how their system works. I'm only experienced with using zoneedit.com, so assuming they are similar, you just add the IP address of the system you want to use and the hostname you want to connect it with.

For example, you probably have 2 boxes. One of them is where you put the domain name. So maybe you put mail.yourdomain.com and then in the other box, you put the IP address, so that would be the EXTERNAL ip of your system. I put that in all caps becasue you MUST NOT put internal (non routable) ip addresses like 192.168.x.x

If you are running your system behind a router, then you'll have to open that port on your router and forward all traffic on that port to your system.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up a mail server. scjvsTP Linux - Networking 1 10-03-2005 02:24 PM
[SOLVED] Setting up a mail server? ziphem Linux - Newbie 2 11-27-2004 02:09 AM
setting up mail server fayax1 Linux - General 1 11-02-2004 05:27 PM
Setting a mail server. hubergeek Linux - Networking 0 04-26-2002 12:38 PM
Setting up a mail server linuxguruwannabe Linux - Networking 13 08-07-2000 02:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration