Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

SMTP Server with Imap and POP Support

Here you can discuss every aspect of Debian. Note: not for support requests!
Post Reply
Message
Author
Xerophyte.ca
Posts: 33
Joined: 2013-03-21 14:52

SMTP Server with Imap and POP Support

#1 Post 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.

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: SMTP Server with Imap and POP Support

#2 Post 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.

Xerophyte.ca
Posts: 33
Joined: 2013-03-21 14:52

Re: SMTP Server with Imap and POP Support

#3 Post 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....

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: SMTP Server with Imap and POP Support

#4 Post 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.

Xerophyte.ca
Posts: 33
Joined: 2013-03-21 14:52

Re: SMTP Server with Imap and POP Support

#5 Post 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.

elmacus
Posts: 17
Joined: 2011-07-13 19:13

Sv: SMTP Server with Imap and POP Support

#6 Post by elmacus »

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

Sent from Nexus 7 via Tapatalk 2

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: SMTP Server with Imap and POP Support

#7 Post 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)

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 12 times
Been thanked: 66 times

Re: SMTP Server with Imap and POP Support

#8 Post 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. :)
AdrianTM wrote:There's no hacker in my grandma...

Xerophyte.ca
Posts: 33
Joined: 2013-03-21 14:52

Re: SMTP Server with Imap and POP Support

#9 Post 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.

smtp
Posts: 3
Joined: 2012-04-23 17:32

Re: SMTP Server with Imap and POP Support

#10 Post 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.

Xerophyte.ca
Posts: 33
Joined: 2013-03-21 14:52

Re: SMTP Server with Imap and POP Support

#11 Post 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.

Xerophyte.ca
Posts: 33
Joined: 2013-03-21 14:52

Re: SMTP Server with Imap and POP Support

#12 Post 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..

Xerophyte.ca
Posts: 33
Joined: 2013-03-21 14:52

Re: SMTP Server with Imap and POP Support

#13 Post 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?

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: SMTP Server with Imap and POP Support

#14 Post 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.

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 12 times
Been thanked: 66 times

Re: SMTP Server with Imap and POP Support

#15 Post 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).
AdrianTM wrote:There's no hacker in my grandma...

Xerophyte.ca
Posts: 33
Joined: 2013-03-21 14:52

Re: SMTP Server with Imap and POP Support

#16 Post 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 .....

Xerophyte.ca
Posts: 33
Joined: 2013-03-21 14:52

Re: SMTP Server with Imap and POP Support

#17 Post 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

Xerophyte.ca
Posts: 33
Joined: 2013-03-21 14:52

Re: SMTP Server with Imap and POP Support

#18 Post by Xerophyte.ca »

Found the issue. Help trying to compile Intel 82579v driver.
http://forums.debian.net/viewtopic.php?f=5&t=103067

Post Reply