• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Setting Up An SMTP Server?

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

JigPu

Inactive Pokémon Moderator
Joined
Jun 20, 2001
Location
Vancouver, WA
I'm getting more and more frustrated with e-mail the more I use it. It seems that there is no service out there that really meets what I want from a provider. GMAIL, Yahoo (basic), and Juno (where my original email address is) don't support IMAP. AIM Mail sporadically "forgets" messages. Most sites don't offer a ton of space (several hundred MB at least). I don't feel like making my university account into a spam-hole. You get the picture.

Because of this, I'm very much considering running an SMTP server on my box. What exactly is involved in this? The initial research I've done says that I can get by without an MX record (which no-ip.com charges for IIRC) because servers will fallback to the A record, is this true? Also, how can I make sure other servers don't immediatly mark my mail as spam (since it will be coming from a residential IP block)? Is it somehow possible to force my mail to first route through my university's mail servers?

I have experience hosting Apache, but SMTP appears to be an entirely different ballgame. Any and all help is appreciated :)

JigPu
 
First of all, check with your ISP - most block SMTP traffic on their networks that do not have an endpoint with one of their own mail servers. This was done originally to suppress spammers and enforce EULAs, but these days the primary reeason is to suppress viri and trojans that carry their own SMTP servers to replicate/spam with. Assuming that port 25 is unblocked in both directions there is no guarantee that the remote mail servers will falll back to the A records. There is also no guarantee that the remote mail servers will transmit or receive mail to/from a residential block, as it is totally dependant upon their administrators' preferences. Some of us like whitelists, others like blacklists, more yet may use SPF (which requires you have control over your DNS entries) or other systems. The long & short is that it's a major headache to do at home without an MX record.

All things considered, it's still not that easy, as our company has been mistakenly blacklisted several times, and as a government contractor, we've actually had the Federal agency we contract with have their servers blacklisted and SPF-blocked more than once. It's a wonderful experience to have executives come screaming about some email they didn't receive and then have to explain that the government screwed up and we can't really do much about it. Regardless, the message you should be getting here is that setting up an SMTP server is not that hard, getting it work right and stay working, and by that I mean transmitting and receiving email without viri, spam, etc., giving you headaches, is, in fact, hard.

Before you think this is a lost cause, understand that it is not. Years ago I had a similar dillema when in graduate school and found the best solution was to run my own IMAP server on my lan and use a pop3 client to pull my mail from various accounts to the local maildir. Once it was local, sharing it with IMAP accross the various machines wasn't an issue. Outgoing mail was still handled by the various remote SMTP servers. This was all using Qmail and I honestly can't describe how I made it work with the config files. It was a strange hack to get the pop3 client to feed qmail for deliveries. I'm sure if you google around some you can find someone else doing the same thing, hopefully with a howto.
 
MTA (SMTP server), Mail storage (IMAP/POP3 server). possibly MDA (local mail delivery agent), Spamfilter, Virusscanner. For further detailed information your intended platform/OS is needed. *nix and Windows are fairly different, e.g most times all the above programs are bundled in one under Windows.

MX record is only needed if mailserver domain and domain to get mail for are on different machines. A record is fine,

To avoid falling foul of DNSRBL you need to use a smarthost or relayhost: you send all your mail to a friendly host which isn't in a DNSRBL and they forward that mail for you to the real recipient. E.g. gmail can do this for you.
 
Fetching periodically mails from outside pop3 accounts is dead easy: fetchmail gets them and immediately connects to your MTA at which point they are like any other incoming mail. 10 minutes tops to set up if you already have a mail setup running.
 
I'm running Windows, though if I manage to scrounge up sufficient hardware eventually I'll probably move it and Apache over to a linux box. On that note, what would be the minimum requirements for an SMTP box?

What exactly do you mean by smarthost and relayhost? I know I can connect to my university's SMTP server to send mail from home (it requires authentication, but it's how I have Thunderbird set up ATM), but is that the same thing?

Depending on the difficulty of getting everything set up, I may just end up going for the IMAP server option. Although it would be nice to have everything "direct-delivered", that may not be worth the trouble and loss of reliablility (since my uptime isn't quite as good as Google's ;)). Pulling it to my own server and then accessing it from anywhere (while still using the university SMTP to send) may very well be exactly what I need.

JigPu
 
486, 32MB RAM

smarthost and relayhost are the same thing, different name. If your University allows you to send mail under other usernames/mail addresses than [email protected], then yes you can use it as a relay.

While you can use IMAP server only, it's generally not a good idea since it's as complicated and non standard as a full MTA+IMAP setup and gives you less choices, e.g. with your own MTA you can do single-use addresses for spam trapping/registering. You have to configure every mail client for smarthost while with MTA it does it for you centrally, etc
 
If you're on windows, hmail isn't too bad of a daemon. It does smtp, pop3, imap, and spam filtering (SPF, blacklists) all in one package. Clamscan for windows plugs into hmail and if you want more robust spam filtering, ASSP can front for it. It's not as powerful as qmail, postfix, or some of the other MTAs, but it works pretty well. Of course, the more crap you run, the faster the box will need to be.
 
Back