SMTP Server with Imap and POP Support

Here you can discuss every aspect of Debian. Note: not for support requests!

SMTP Server with Imap and POP Support

Postby Xerophyte.ca » 2013-03-21 15:08

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.
Xerophyte.ca
 
Posts: 32
Joined: 2013-03-21 14:52

Re: SMTP Server with Imap and POP Support

Postby dasein » 2013-03-21 16:55

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.
Carl Sagan wrote:In the fabric of space and in the nature of matter, as in a great work of art, there is, written small, the artist's signature.
I wish real life came with an "ignore list."
TFM: Debian Reference
User avatar
dasein
 
Posts: 4399
Joined: 2011-03-04 01:06

Re: SMTP Server with Imap and POP Support

Postby Xerophyte.ca » 2013-03-21 17:00

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....
Xerophyte.ca
 
Posts: 32
Joined: 2013-03-21 14:52

Re: SMTP Server with Imap and POP Support

Postby dasein » 2013-03-21 17:21

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.
Carl Sagan wrote:In the fabric of space and in the nature of matter, as in a great work of art, there is, written small, the artist's signature.
I wish real life came with an "ignore list."
TFM: Debian Reference
User avatar
dasein
 
Posts: 4399
Joined: 2011-03-04 01:06

Re: SMTP Server with Imap and POP Support

Postby Xerophyte.ca » 2013-03-21 17:55

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.
Xerophyte.ca
 
Posts: 32
Joined: 2013-03-21 14:52

Sv: SMTP Server with Imap and POP Support

Postby elmacus » 2013-03-21 18:01

I would recommend howtoforge.com. Lots of guides of this, also check ispconfig.

Sent from Nexus 7 via Tapatalk 2
elmacus
 
Posts: 12
Joined: 2011-07-13 19:13

Re: SMTP Server with Imap and POP Support

Postby dasein » 2013-03-21 18:14

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)
Carl Sagan wrote:In the fabric of space and in the nature of matter, as in a great work of art, there is, written small, the artist's signature.
I wish real life came with an "ignore list."
TFM: Debian Reference
User avatar
dasein
 
Posts: 4399
Joined: 2011-03-04 01:06

Re: SMTP Server with Imap and POP Support

Postby dilberts_left_nut » 2013-03-21 19:21

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. :)
AdrianTM wrote:There's no hacker in my grandma...
User avatar
dilberts_left_nut
 
Posts: 2902
Joined: 2009-10-05 07:54
Location: enzed

Re: SMTP Server with Imap and POP Support

Postby Xerophyte.ca » 2013-03-22 14:52

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.
Xerophyte.ca
 
Posts: 32
Joined: 2013-03-21 14:52

Re: SMTP Server with Imap and POP Support

Postby smtp » 2013-03-22 15:27

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.
smtp
 
Posts: 1
Joined: 2012-04-23 17:32

Re: SMTP Server with Imap and POP Support

Postby Xerophyte.ca » 2013-03-26 02:18

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.
Xerophyte.ca
 
Posts: 32
Joined: 2013-03-21 14:52

Re: SMTP Server with Imap and POP Support

Postby Xerophyte.ca » 2013-03-26 02:22

Many backup & file copy utilities available. I should make a backup of what I've done so far. Any recommendations? DD, Dump, ect..
Xerophyte.ca
 
Posts: 32
Joined: 2013-03-21 14:52

Re: SMTP Server with Imap and POP Support

Postby Xerophyte.ca » 2013-03-26 02:31

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?
Xerophyte.ca
 
Posts: 32
Joined: 2013-03-21 14:52

Re: SMTP Server with Imap and POP Support

Postby dasein » 2013-03-26 03:11

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.
Carl Sagan wrote:In the fabric of space and in the nature of matter, as in a great work of art, there is, written small, the artist's signature.
I wish real life came with an "ignore list."
TFM: Debian Reference
User avatar
dasein
 
Posts: 4399
Joined: 2011-03-04 01:06

Re: SMTP Server with Imap and POP Support

Postby dilberts_left_nut » 2013-03-26 11:48

: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).
AdrianTM wrote:There's no hacker in my grandma...
User avatar
dilberts_left_nut
 
Posts: 2902
Joined: 2009-10-05 07:54
Location: enzed

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable