Jump to content

Emails and emails


gem-in-eyez
 Share

Recommended Posts

First off... definately glad to be back in the community and back on my Drake box.

 

My question for you gurus are:

 

The scenario:

  • 1 mandrake 9.1 box (mail, apache, ventrilo, sql, webmin server)
  • 3 2003 windows server (each a domain controller but 1 is specifically an exchange server, long authorizer, the other a sharepoint server )
  • 1 laptop (wifi connection used to vnc and ssh in to servers for remote administration)
  • 2 wifi routers 4 port connections

What I would like to do:

I want to learn how to get my drakebox to retrieve my email from my isp (on a dynamic ip connection) and then forward it to my windows domain controller that is an exchange server.

 

My research:

I found out that with exchange I need to have a pop connector to connect to my isp's mail server and retrieve my mail in order to have my exchange server hold the emails. I had a trial version of a software and it worked fine but I would rather have an open source application perform this. I have tried to get an email server set up on my linux box but failed miserably. Until I get $$ to purchase another lab pc to dedicate to learning how to create a mail server in linux, I just want to have my mail retrieved on the linux box and be able to use outlook on my laptop to retrieve it via the exchange server.

I really want to learn about mail servers in both the linux and windows domain.

 

My test environment is set up with an intranet and internet segments. Still needs some more tweaking because I am thinking about bringing in a 3 router to expand it to include sharepoint, but I have 2 routers for the time being. I will attach an image to this post to give everyone a better visual understanding of what I would like to accomplish in my lab experiment in about 3 hours when I get home.

 

If someone can point me in a good direction and/or help me out with how to go about this is clear details I would greatly appreciate the aid.

Thnx

post-14397-1186611209_thumb.jpg

Link to comment
Share on other sites

I would suggest setting up a forward on your ISP so that the email gets delivered to a domain name you own. That way, you can play with the MX record to point it at the Linux box. Then, when the Linux box receives the email it will send it to the Exchange Server.

 

If you do it over SMTP, which is the easiest, you can configure postfix on the Linux box. There are two things you need to configure. First is recipient maps and the second is transport maps. The recipient maps is basically for the domain name and the ip address of the Exchange Server. The transport maps is to allow the Exchange Server to send via the Linux box.

 

I don't know of any real other way you can do this other than how I've mentioned. Maybe there is a way via IMAP or something, but I doubt it. SMTP is the best way to do this.

Link to comment
Share on other sites

Hey bro,

K I understand what you are saying with the forward to my domain and then from there have it point to my linux box with some config files.

 

I already have a domain registered and so I am looking at getting a DNS setup so that redirection from my domain to my linux box at home can occur.

 

I went to this site http://www.linuxhomenetworking.com/wiki/in...9_:_Dynamic_DNS

because my ISP's IP given to me is a dynamic one. From this page it says that I now need to register at a DDNS site to have them do the forwarding to my box. I am already registered at dyndns and use their services for testing and tunneling in to my boxes with ssh and vnc. But want to keep it for usage on my windows environment (since the 2003 server will be behind my first router with the linux box, for remote administering and so forth) However for the email, www, the DNS I want to have it straight from my domain to my box at home. Even though I am on a dynIP from my isp I would be willing to manually go to the Domain's account page and change the IP's manually if need be. but how do I go about to get a proper dns configured is the issue I appear to be having.

 

you can do a whois on my domain which is www.krynn.ca and you will see the old nameservers I was messing around with. none of the configurations seemed to have worked correctly but when I tried a host command I did see that my old IP from my isp was listed in there so something had worked to a certain extent when I was trying to tinker around with the DNS stuff from before.

 

Now the IP's are different from my ISP because I am living in a new area.

 

So right now I am trying to get a cache DNS server set up on the linux box so that I can forward the www.krynn.ca & email.krynn.ca to my linux server and the windows server can then just query the linux box dns for intranet usage accordingly. But how do I go about that.

Must I first enable port forwarding on my router to the internal IP of the linux box with the respective ports and then create an authoritative dns or caching dns that will query other internet cache or authoritative dns'?

 

 

sorry for the overload of info...been up hours trying to figure this out and plan where to start. In the end all the labs I create and do to learn is to get linux and windows to fully interconnect and be able to share, retrieve, backup & monitor between the systems.

 

I attached another image to perhaps show how I want the domain name and the dyn name to work in my network, but I mainly want my linux box for the inet segment and the windows for my intranet however still able to connect to both remotely from the internet. Again many thanx!

dns_pointing.bmp

Link to comment
Share on other sites

cool I will look in to it then... not what I really wanted but if you suggest that it is easier that way then I'll try that route.

 

BTW, just saw your linux solutions page. Really nice...you built it yourself or is there a 3rd party behind the scenes & of course...are you hosting it?

Link to comment
Share on other sites

Still on the DNS configuration on my box, been reading up on some more info about the named.conf file.

 

I made some modification to the file while at work here but need to wait until I get home to test it.

I created a zone for my local network and wanted to just see if I am on point with the coding...

 

zone "0.0.127.in-addr.arpa" {

type master;

allow-query { 192.168.1.0/200; };

file "named.local";

};

 

theoretically I am trying to say here that for my internal zone, this server is considered the master and that all queries coming from the internal segment 192.168.1.0 up to 200 can query this server. Am I correct in assuming this?

also to I tried to fined a definitive answer about the "file" command located in the .conf

 

When the file "####" command is entered in the coding, does this mean that the server WILL create the "zone" file and write to it, update it or only reference it?

 

In some areas I find this as its definition "file — Specifies the name of the file in the named working directory that contains the zone's configuration data."

 

other areas I find this :

zone "example.com" {

type slave;

file "example.com.zone";

masters { 192.168.0.1; };

};

"The information the slave server receives from the master server is saved to the /var/named/example.com.zone file."

 

1 says that it references it the other says that it creates but only mentions that it pertains to a slave and in a particular directory other than what the first definition states... kinda confusing since I cannot test it right now on my box.

Edited by gem-in-eyez
Link to comment
Share on other sites

DNS, I always do like this:

 

file "domainname.com.zone";

 

and the rest of the normal config after that. You then need to edit the file and put the domain information in. If you want some help, I'll post it here. Did it a while back for someone else with bind problems. If you can't find that post, I'll dig it out of my documents and put here.

 

With regard to my website, it's using joomla, and all the stuff is stored inside mysql automatically as this is what joomla uses. Then I just add text, and it can be done from any machine with an internet connection, as it's all done through the browser. The joomla interface has web editing interface to add it all. Quite neat and quick. Template was purchased for about $20 or something.

Link to comment
Share on other sites

Hey bro, I think I saw your post on that topic. I will read it over and see what it is about and the tips you offer.

 

I figured I would first test to see if the system creates the zone files after I update my named.conf. If it doesn't then I found some sites that show how the basic setup of it looks like and will take it from there along with your post. I think the bind version I got is 8 and tried to update it with webmin but that failed. so I will see if it works as is and then just continue to backup all the configs I do on the lab box until I redo a clean server for production.

 

I also noticed that some other websites state that the named.conf should be found in a chroot or something of the sort folder with protection, however with mandrake 9 I find it all just in the /etc. Should I consider this a security risk?

 

Anyhow things are coming along so I will let you know how my tests go....once again thnx for the info and the direction!

 

Oh btw that joomla looks real interesting think I am going to install it and give it a try. thnx again! :afro:

Edited by gem-in-eyez
Link to comment
Share on other sites

DNS, I always do like this:

 

file "domainname.com.zone";

 

My named.conf says the following:

 

options {
directory "/var/named";
pid-file "/var/run/named/named.pid";

In here is where I found the 3 default zone files that the system created itself. I think I will continue to follow the lead and place the zone files in here renaming them with your ".zone" extension...

 

Think this is the post you were talking about.

named - is it really running or not? [solved]

 

 

Question pertaining to the NS1.X.X.X

 

In my lab environment, my linux server (drake) is my www, NS, apache, etc... server. There is no seperate server at the moment dedicated to being a nameserver alone. Is this fine or should I create a/or server(s) soley dedicated to being a nameserver?

 

My sole lab box has the host name drake at the moment. So if I am creating the zone file records do I really need to add the NS1 prefix to my krynn.ca record in the zone file as a pose to just coding drake.krynn.ca?

 

Got this piece from an article I was reading online

Server ns1.my-site.com is the name server for my-site.com. In corporate environments there may be a separate name server for this purpose. Primary name servers are more commonly called ns1 and secondary name servers ns2.
which is where I get my previous questions from.

 

 

Now from your post this is what I coded for my zone file so far:

 

$TTL 3D

@	IN SOA ns1.krynn.ca. my.isp-email-account.ca. (
2007081601; serial yyyymmddvv (vv = version for increment on changes)
7200; refresh
7200; retry
604800; expire
86400 ); minimum


krynn.ca.		IN	NS	ns1.krynn.ca.
ns1.krynn.ca.		IN	NS	x.x.x.x; (Ip address ISP provides or local?)
localhost		IN	A	127.0.0.1
krynn.ca.	  IN	A	x.x.x.x; (Ip address ISP provides or local?)
mail.krynn.ca.		IN	A	x.x.x.x; (Ip address ISP provides or local?)
krynn.ca.		IN	MX 5	mail.krynn.ca.; (not yet created)
www.krynn.ca		IN	CNAME	drake
ns1		IN	CNAME	drake
mail   IN  CNAME drake; (not sure if it is needed but can't see why it would hurt)

 

The reason I will post my external IP is because this is a DNS zone entry for a www domain that should direct all external communications to the respected ports, to my home network via my router and then to the servers. For the local network I am assuming that the zone file can then have the local ip's of the server(s) that will have the communication directed directly to them.

Also I am on a dynamic IP from my provider and do realize that when the IP changes I will have to come back to the zone file and make the necessary modifications, which I don't mind for now.

 

 

Other formats of the zone file I found online:

			NS	  www; Inet Address of nameserver
krynn.ca.	MX	  5 mail; Primary Mail Exchanger

localhost	   A	   127.0.0.1
drake		  A	   x.x.x.x; (Ip address ISP provides or local?)
mail			CNAME   drake
ns1			 CNAME   drake
www		   CNAME   drake

 

 

taken from http://www.linuxhomenetworking.com/wiki/in...Configuring_DNS

 

 

Last question would be, which is better, cleaner and efficient?

 

I have not put it in production yet because from looking at what my drake box has so far, is quite different. I have backed up the named.conf and resolv.conf from my /etc directory and from the /var directory the folder called named which contains krynn.ca, named.ca, & named.local which appear to be my zone files that the system automatically created. now when I look at these the format and information are all quite different from what you and the online referenced sites have posted. I am not sure if it is because of webmin and its modules or what but I will email you the information and if you can look it over and give me your feedback I would then feel secure in proceeding with my tests. guess I am scared to mess up the ol box and have to start everything over from scratch again with all my installs.

 

I tell you since you had me on this path from what ... since I became a member here, lol...it has been quite a journey! Loving every moment of it! If it wasn't for my family, friends and some of the systems at work, I would do away with windows altogether! Quite remarkable all the info you have opened me up to and the fun in learning it all. :headbang:

Edited by gem-in-eyez
Link to comment
Share on other sites

You should be OK running all of this on one server no problem providing specs are OK. DNS probably won't be utilised to heavily since it will only be used locally and not externally.

Link to comment
Share on other sites

Yeah I think it should work atleast for the krynn.ca zone.

I will implement it and test it to see if I can get the www.krynn.ca pointed to my lab server.

If that works it is just a matter of getting the dyndns name I have registered to work in the same manner but I am also thinking if it is worth doing the zone for that since they automatically point to my network anyways.

Other than that tweak out the local zones that I created to do more further testing that way I can get the hang of the master and slave "type". Then get the ISP to forward my mail to the domain and start the next phase of getting the postfix working.

Am I safe in saying that postfix is the equivalent to the Windows exchange server? And on a scale of difficulty, is it alot of work getting exchange to pull all the emails and filter them from postfix to the user bins on exchange for specific users?

 

Either way it took a bit of coffee and time reading over all your posts but very happy that I learned quite a bit from this setup phase!

;)

Edited by gem-in-eyez
Link to comment
Share on other sites

Postfix is for SMTP stuff. For POP3 or IMAP you'd need something like courier-imap. However, if all you are going to do is forward the emails from the postfix system to the Exchange server, then you just need postfix.

 

It's easy enough to do, and just means you need to configure postfix to relay correctly without opening your system up as an open-relay. I've already done this, so can provide you assistance with the very few lines you need to configure for postfix. All Exchange has to do is accept the emails being relayed from the postfix machine, and that is it.

 

You can then even configure Exchange to relay via the postfix machine, or leave it as is to send directly to the internet.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...