Page 1 of 1

SMTP Server with Imap and POP Support

Posted: 2013-03-21 15:08
by Xerophyte.ca
I'm taking on a big project to build and configure a working Debian Server with SMTP, POP3, Imap and SPAM filtering. After my initial research I realize there are several different packages to choose from. Any suggestions on which ones are more secure, reliable, and easy for a newbie to configure.

FYI I have an extra domain name I will be putting to use for testing and development purposes.

Re: SMTP Server with Imap and POP Support

Posted: 2013-03-21 16:55
by dasein
First off, SMTP "handles" outgoing mail, whereas POP and IMAP handle incoming.

Anyway, specific package recommendations, focusing on security and quality of documentation...
  • SMTP: Postfix
    POP/IMAP: Dovecot
    SPAM: Spamassassin
You just can't go wrong with these.

Re: SMTP Server with Imap and POP Support

Posted: 2013-03-21 17:00
by Xerophyte.ca
Thank you for the quick reply. Postfix is described as a MTA. Does Postfix also handle incoming SMTP requests? Or is MTA and SMTP one in the same....

Re: SMTP Server with Imap and POP Support

Posted: 2013-03-21 17:21
by dasein
Xerophyte.ca wrote:Postfix is described as a MTA.
And so it is.
Xerophyte.ca wrote:Or is MTA and SMTP one in the same....
I'm not actually trying to deflect your question, but I'd like to suggest to you that if you're going to run a mailserver, you need to learn the fundamentals for yourself. None of it is particularly hard, but there is a lot to learn, and all of it is unfamiliar: MDA -vs- MTA, SSL -vs- TLS, LOGIN -vs- PLAIN, just to name a few.

Every minute you spend reading up beforehand will pay back dramatically when it comes time to actually set up your server.

Re: SMTP Server with Imap and POP Support

Posted: 2013-03-21 17:55
by Xerophyte.ca
I'm not your typical IT geek. I've been hosting Microsoft Servers, Cisco Routers, and PIX Firewalls for years. I'm ready to apply that experience and knowledge to my future Linux endeavors.

Thank you for your advice. I'll make Postfix, Dovecot, and Spamassassin my first project. In the mean time I'll continue to read and research this topic.

Sv: SMTP Server with Imap and POP Support

Posted: 2013-03-21 18:01
by elmacus
I would recommend howtoforge.com. Lots of guides of this, also check ispconfig.

Sent from Nexus 7 via Tapatalk 2

Re: SMTP Server with Imap and POP Support

Posted: 2013-03-21 18:14
by dasein
I meant no disrespect. Email is a strange beast all its own. For myself, decades of technology experience and an advanced degree didn't prepare me for the subtle intricacies of email server setup. As I said before, it's not that it's particularly difficult, but it is highly specialized knowledge, with a great many interdependencies. And trying to learn it piecemeal is suboptimal.

So it ultimately does you no good for me to say "Yes, MTA and SMTP are (approximately) synonymous." It's true, but it's only one tiny piece of a much larger puzzle.

This may help get you started: https://en.wikipedia.org/wiki/E-mail_ag ... ructure%29
(You may safely substitute postfix for every instance of sendmail)

Re: SMTP Server with Imap and POP Support

Posted: 2013-03-21 19:21
by dilberts_left_nut
You REALLY need to get your head around it BEFORE connecting any SMTP server to the internet (with or without publicly listed MX records) as they are a very big target for miscreants and ANY misconfiguration will be quickly exploited to relay spam.

This will get your IP onto a plethora of blacklists, some of which are difficult / impossible to get off, which will have a negative impact on your ability to run an effective mail service in the future.

My suggestion would be to start with your server having no SMTP access from the world and pull mail from a domain mailbox on another provider with fetchmail or such, and do rigorous SMTP testing locally.

This will allow you to get the "user side" (anti-spam, mailboxes, authentication etc.) sorted while learning what you need to know about the whole process of mail delivery, prior to going live with your own SMTP.

A healthy percentage of the worlds spam problem is due to "mail admins" who set up their systems by blindly following a "guide" with no clue what it all means.
Don't be one of them. :)

Re: SMTP Server with Imap and POP Support

Posted: 2013-03-22 14:52
by Xerophyte.ca
Debian supports several different MTA agents i.e. exim4, postfix, sendmail. What's the difference between them or advantage to one over the other?

Thank you for the suggestion thus far. I'll start with postfix and go from there.

Re: SMTP Server with Imap and POP Support

Posted: 2013-03-22 15:27
by smtp
For a novice e-mail administrator I would recommend Postfix.
Postfix is very powerful and easy to configure / maintain.
The most important is to not become an open relay after initial configuration.
I would switch mynetworks_style to host as a bare minimum:

mynetworks_style = host

Cheers.

Re: SMTP Server with Imap and POP Support

Posted: 2013-03-26 02:18
by Xerophyte.ca
It's been a struggle the last 48-72 hours, but I have Debian Squeeze installed from net-install with just standard utilities.
I've Installed, configured, and tested Postfix and Dovecot from command line. I found most of the online guides were NOT complete and didn't include the little nuances I needed to add to postfix main.cf and dovecot.conf to work properly...

I will continue with TLS Auth, Spamassasin, and Squirrelmail soon. I need dinner and a beer.

Re: SMTP Server with Imap and POP Support

Posted: 2013-03-26 02:22
by Xerophyte.ca
Many backup & file copy utilities available. I should make a backup of what I've done so far. Any recommendations? DD, Dump, ect..

Re: SMTP Server with Imap and POP Support

Posted: 2013-03-26 02:31
by Xerophyte.ca
Since the goal is to decommission my Microsoft Servers; I'm going to need a DNS Server. That means Bind or MyDNS. Any DNS recommendations for newbies or utilities to help create zone files?

Re: SMTP Server with Imap and POP Support

Posted: 2013-03-26 03:11
by dasein
Xerophyte.ca wrote:I found most of the online guides were NOT complete...
The official docs for both Postfix and Dovecot are exemplary. Speaking firsthand, I know that my installation issues were 100% pure PICNIC.
Xerophyte.ca wrote:Many backup & file copy utilities available.
And which you choose depends primarily on two things: the type of backup you want to run, and the filesystem you're using.

If you're using ext3, it doesn't get better than partimage for a full-partition backup.

If you're using ext4, you may want to investigate partclone, but verify the backup once you've made it. (I've had partclone backups fail.)

OTOH, if you just want to backup your files, rsync or fsarchiver are both excellent choices (though they operate quite differently).
Xerophyte.ca wrote:I'm going to need a DNS Server.
Dilbert's _Left_Nut has forgotten more about DNS than I know. So I agree with whatever he says :mrgreen:

But if your needs are fairly simple, maybe look into DNSMasq.

Re: SMTP Server with Imap and POP Support

Posted: 2013-03-26 11:48
by dilberts_left_nut
:lol:
@ dasein - I've never learned any more than I needed to...and I'm going to agree with you. :)

Plus I've never really had to bother with bind (directly), all my DNS needs so far have been met with dnsmasq and registrars web interfaces (usually to bind).

It obviously depends on what you need to do.
If you are providing your own authoritative DNS for a public domain, have a stupidly complicated internal network or need local MX or TXT lookups, go with bind.
There is good documentation on the configuration of it, provided you are familiar with the concepts and terminology (which you should be if you have done the same on a MS system - or is there wizards for that magic? :wink: ).

Otherwise, for just local name resolution and external lookup forwarding and caching (and optionally DHCP too), dnsmasq should cover what you need in a straightforward and efficient manner.
The default .conf file is extensively documented.
Multiple hosts files can be specified, to separate big lists of machines into "sort of zones" for easier management (or for DNS blocklists for ads, trackers or NSFW stuff).

Re: SMTP Server with Imap and POP Support

Posted: 2013-03-26 13:57
by Xerophyte.ca
The reasoning to my madness is to learn first hand what I manage and host in the MS world. Eventually I would like to migrate everything to these new Debian servers and decommission my loud obnoxious MS servers.

I'm building a silent 1U Server with minimal fans and a 200w power supply. Great 1U Server Case for Linux Servers. I've seen other cases as small as 100watts and 60watts. Great solution for my future Linux boxes.

I'm using the Supermicro SC512L. Google it.

Thank you for the quick advice. I have a project to work on for the next .....

Re: SMTP Server with Imap and POP Support

Posted: 2013-04-02 14:21
by Xerophyte.ca
I finally got my new Server and am faced with my first BIG challenge. Check out this other post and let me know if you have any insight. Thank you !

http://forums.debian.net/viewtopic.php? ... 53#p492553

Re: SMTP Server with Imap and POP Support

Posted: 2013-04-03 02:08
by Xerophyte.ca
Found the issue. Help trying to compile Intel 82579v driver.
http://forums.debian.net/viewtopic.php?f=5&t=103067