Email server for DSL?Forum: Networking Topic: Email server for DSL? started by: arew264 Posted by arew264 on April 13 2005,01:53
I really would like to get an email server to run on DSL. I'm pretty much a newb. Can someone help me?
Posted by Grim on April 15 2005,22:41
What do you need it to do? IMAP? POP3? SMTP? Single user? Multiple users, if so, approximately how many? There's several different applications that can do what you need, but some of them may be better suited to your individual needs than others.Could you give a bit more information about what you want your "mail server" to do? Posted by arew264 on April 16 2005,02:25
I'd basically like to get a server that can handle six inboxes (I can compromise on this) recieve mail from servers and let computers on my network have email, the purpose being to be able to look at email on all of my computers instead of having to kick someone off one to check mail. I guess IMAP inside the network would be best so the sent items folders will all be the same. The servers I download mail from are all POP and SMTP. Only one of the mailboxes would have to dosnload from multiple servers. Thank you for your help, I hope that this told you what you need to know.
Posted by Grim on April 16 2005,05:19
Okay. There's a few problems with running a mail server from home. The primary problem is one of network ip, more than likely, you don't have a static ip, and if you do happen to have a static ip, if it's not within an acceptable ip block, your mail server is gonna get banned by several of the larger ISPs (AOL and it's derivatives, wmconnect, etc. and Earthlink, right off the top of my head, to name a few) so you won't be able to send mail to anyone on those networks from your mailserver. I'm telling you this from personal experience, so be prepared for it. Secondly, the biggest problem with new sysadmins setting up email for the first time is inadvertantly setting up an open relay. I've done it, everybody that's ever set up a mail server has done it at one time or another. If you set up an open relay, spammers will move in, set up residence and use your box for a spamming fiesta. You will get some of the nastiest emails in the world from hardworking sysadmins questioning your parentage and your predilection for bestiality. Thirdly, there is no third point. I'm going to assume that all six POP3 accounts belong to you, even if they don't, the first two-thirds of this is still applicable. Use fetchmail and procmail. Fetchmail can get mail from all of your mail accounts and procmail can deliver them to six different accounts in six different mailboxes or to the same account in six different mailboxes or even one account into the same mailbox. Procmail is infintely configurable and it's very handy. Secondly, set up an IMAP server so that you, or whoever, can log into your "mail server" and sync up their client to retrieve their email. If you have six different accounts, you can have six different people log in and get their mail. Qmail-IMAP is popular for a good reason, it has a very good history of security and it's in widespread use. Alternately, you might be interested in < Simple IMAP server > which is, as the name indicates, simpler to set up. Both will require you to compile from source on Debian-alike systems due to their licensing schemes. You might luck up and find a precompiled binary on a server somewhere, if you're paranoid you'll want to compile them yourself. Freshmeat has shell scripts to build a full qmail installation based on "Life with qmail", which you should buy, read and absorb fully. If you're not paranoid about a mail server install, you will be soon enough. Thirdly, you can set up qmail so that you can send email directly, "Life with Qmail" covers how to do this, and the above mentioned shell scripts will automate most of the setup. In your particular instance, I wouldn't do it. Qmail can act as a smarthost by rewriting the From: address and routing the mail through the appropriate ISPs SMTP server. Multiple accounts is a much more tedious, the same process must be repeated for each separate ISP and qmail must be configured to automatically rewrite the From: address and route accordingly. It would be easier to set up the individual clients to send mail directly through your ISPs SMTP host, and use your local "mail server" just to read received mail. Of course, if all six accounts belong to you, you can set up qmail to act as a smarthost and rewrite the From: address to be from one email address. It's a lot simpler and doesn't take as long to set up, but all outgoing mail will be from the same email address. My personal setup, that I've used for quite awhile at home, fetchmail+procmail+bogofilter+mutt+msmtp. Fetchmail gets mail from three accounts: from my isp, my hosting provider and gmail. Procmail pipes everything through bogofilter, which tags spam and then procmail sorts mail into one of 17 different mailboxes. I use mutt, a CLI app, which I can fire up from a SSH session from anywhere. Msmtp is a simple SMTP client that uses my ISPs SMTP server, so I can send mail from mutt from the same SSH session. All of my mail is under one account, on one box which I can access from anywhere via SSH to send and receive mail. I'm not saying that this is the direction that you should take, but it is easier than what you propose to do and it can be set up in half an hour. There are other mail servers that you can use, sendmail is one of the oldest and one of the buggiest. Go search through BugTraq's archives for sendmail and prepare for your mind to be boggled at all of the security holes that has plagued sendmail throughout it's history. I've heard a lot of good things about courier+postfix. I've never used them and can't vouch for their ease of setup or use. I've also used Exim, which comes default with every full Debian install but the config has changed drastically with the latest version and I haven't used it in a couple of years, so, you're on your own there. Qmail is probably the best bet for what you want to do, but I think it's going to be overkill for your particular situation. If I need to clarify any of this, or I didn't fully answer your question. Please ask again a little differently and I'll see what else I can come up with. Posted by arew264 on April 16 2005,14:45
With the whole SMTP thing, I am going to use my isp's smtp for that reason. THanks for all the help, I'll try to get it working.
Posted by tronik on April 16 2005,15:05
I think something smaller and easier to configure like postfix would actually be better for your situation. although I use Qmail, i use it because i have to manage thousands of email accounts.Postfix is good for someone who just wants to learn... Don't run a mailserver from your home. Everything grim said. Posted by arew264 on April 16 2005,17:44
Well, I downloaded and unzipped it fine, but when the instructions at the link gice me the three commands, none of them work because the make command isn't there. Also, I recieve the error that mail isn't a valid group when I try to install it. I also downloaded the rpm for fetch mail but I can't figure out what to do with it to get it installed. This is all pretty new to me. Thanks for any help you can provide.
Posted by RoGuE_StreaK on April 16 2005,23:19
Haven't tried make in ages, but I believe you need to install at least the gnu-utils and gcc1 packages before you can "make" under DSL. Both are in the repository, under System.< Repository / Apps > May possibly need more than that, I can't remember. There's also the Alien rpm to deb converter in there, which you need if you want to do anything with rpm's. But I don't know how much joy you'd have, as I've never tried it. Pretty sure you'd also need dsl-dpkg installed to get anywhere with the resulting .deb file. OT - Grim's back! Long time no see Posted by arew264 on April 17 2005,19:19
Well... I, being the genious I am, installed fetchmail and procmail and was about to go for msmtp and imap when I realized that I need SSL for my Gmail account. How would I go about uninstalling and reinstalling those programs after I get SSL installed?
Posted by arew264 on April 18 2005,03:00
It turns out that, while I still need to reinstall fetchmail and procmail with ssl support, I also can't get ssl to work with msmtp, as you can see < here >. Thanks in advance for your help, I'm actually finding playing with this quite fun. I can see why Linux is better dan Windows now.
Posted by arew264 on April 18 2005,23:55
Well, I think I better back up a step here. SHould I use OpenSSL or GnuTLS? I need one of the two because I have a google mail account that use ssl/tls. If someone could provide a walkthrough of how to get this whole fetchmail + procmail + imap + msmtp setup to work, I would be very thankful. I know, however that that would be pretty timeconsuming. Could someone please help me figure out how to do this?
Posted by pr0f3550r on Feb. 16 2006,11:55
I think having a small mail server in the shape of a .dsl app, is useful.I, for example, cannot use my ISP smtp outside the local network. Besides, I need a local mail server only for a few minutes... About the fact that the mail server can be blocked by the likes of AOL, etc. I used to work for AOL, it's rather the opposite. The AOL mail server is blocked by manu ISP's. It's easy to see if your local mail server is blacklisted. Send an email to yahoo, gmail and the likes. If you get it, You are not blacklisted. Posted by Grim on Feb. 18 2006,00:20
I don't know in what capacity you used to work for AOL, but it is a fact that they block all email from mail servers operating on dynamic ip addresses. My personal experience is that I couldn't send email to my best friend who used wmconnect, a Wal-Mart branded version of AOL. The bounced email stated that it was AOL's policy not to accept email from ip addresses originating from competitors residential ip blocks. They're pissy about competitors commercial ip blocks as well, but that's a whole 'nother story. If you're able to send email from your personal mail server, and you're using AOL as an ISP, it's a good possibility that they're not blocking your mail because you're using their network. Personally, I'm all against something small like DSL including a mail server by default because, in all likelyhood, something like DSL, that can be fit on a USB stick, is a tempting tool for spammers to use to sneak into a cyber-cafe and send out a few hundred-thousand spams. Posted by pr0f3550r on Feb. 18 2006,13:29
Grim:a) I used to send a few emails from my free webmail account to my ex-colleagues at AOL and I frequently got a message from postmaster saying, more or less, they wouldn,t bother to send mail to AOL as it is known spammer . Many professional spammers use the aol smtp server from within and live happily ever after. b) who cares about AOL. They have their proprietary protocols, may they rot in hell (and that's when I'm calm!) c)Many legitimate Linux distro come with a mail server up and running after installation . Some names? Debian, Ubuntu, Suse and that's only the ones I verified personally d) In my case I use public libraries and I'm always behind static IP addresses. Posted by Grim on Feb. 18 2006,15:17
a) Most spam that appears to originate from AOL has forged headers and is usually from some other domain.b) Hallelujah Prof. May the hedged garden burn to the ground. c) As far as I know, Debian, Ubuntu and SuSE don't come in a USB-stick variety that can be loaded from a running Windows install. DSL USB-stick + sendmail = spammers best friend. d) The static ip is only important if it's a consistent one. Bouncing your mail server from one static ip address to another is no different than having a dynamic ip address. The changing ip address will prevent anyone from replying to your mail. If you send email from your server but can't receive a reply, what's the use of a mail server? Spammers would find this ideal. I do understand the need to have a central location for email, it's the reasons for the popularity of webmail such as gmail, yahoo mail, hotmail, etc and IMAP instead of POP3. Personally, I ssh into my box at home and use mutt from there to keep all of my email in one place. The dynamic ip address can be overcome by using a dynamic DNS service like no-ip.com but if you have access to a static ip, it'd be better to set up a domain name and point it at your permanent mail server. I think that there are responsible people that can make use of a mail server extension. On the whole, I suspect that such an extension would be abused by spammers rather than used for legitimate purposes. Posted by pr0f3550r on Feb. 18 2006,16:22
Grim, to cut it short I could say that I respect your opinion but I don't agree with it.For the AOL thing, I could tell you 1001 funny and/or shocking hidden gems. In my case I just want to use a local mail server to send my email and that would be in 5 minutes a day. An experienced spammer can abuse any legittimate smtp server, the hole is in the smtp protocol, not in sendmail. In a webcafe I could load Knoppix from CD on qemu and use a local mail server. There are other similar minimal livecds with a mail server installed, I don't think that's what a spammer needs. But I understand your point, I'll experiment on my own and I'll let you know. Posted by runlevel5 on Mar. 09 2006,21:28
OK, so knowing about the dangers/problems of running an outbound SMTP server on a home network, is it possible to run DSL as a centralized post office for my home LAN and domain? (Inbound only, still using the ISPs SMTP server for outbound traffic)Let's say, I own a domain, and subscribe to a service like no-ip or dyndns. I can set up a webserver on DSL using monkey and using a home firewall/router that plays nice with dyndns, host www.mydomain.org through my home network. (Burning a custom image to a CD with the pages I want to serve would make for a pretty bulletproof setup) I'd like to do the same for inbound e-mail. For example, mail sent to user@mydomain.org would be redirected by no-ip or dyndns to an e-mail server running DSL on my home network. Other machines on the network could then POP mail off of the DSL machine. Is this possible for any OS (i.e. does any dynamic IP service support it)? I'd like to do it this way b/c POP is pretty insecure (I have an Audrey on my home network that doesn't support any other mail protocols) and would like to keep all of the POPing local; and most webmail services only allow forwarding, not POP off of their servers (or charge for it). I suppose qmail and procmail would be good candidates for filtering the mail into boxes, but if anyone has had success with other apps, I'd love to know. Posted by NewDude on April 11 2006,15:41
pr0f3550r,I agree whole heart with you. There is nothing wrong with setting up your own email server and being incharge of your own email server. I have been running my own email server on WIN2K for almost a year now. At first however, I had problems with learning to turn off OpenRelay, but once I turned it off, that still didn't solve my problems completely. Most of the big IPS won't take mail directly from a dynamic ip address for fear of it beings a spammer. My solution around this was to use SBC (My IPS) smtp servers for outgoing, and I would handle all the incoming. You are still in charge of your own email server though. It works wonderful. smtp servers from SBC would work as relays for their customers. There is a good feeling of freedom and independancy when you are in charge of your own email and web server. Because you are in control and don't have to rely on anyone. I am currently configuring DSL 2.2B on my old pentuim machine to be my web and email server. So far I got APACHE, PHP, MySQL running great on it. It is working as a full web server now. My next phase it to get the email part working, but still not sure what to try and what is easiest to setup. I have view POSTFIX, but I would rather not compile, I want a complete package that I can get going and use web mail also with it. It is hard to remain free in an unfree world, but I will take freedom when I can get it - Every should be in charge of their own email and web server. |