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

 

 

 

[SOLVED]Settings up Email server

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
jalisco
Posts: 94
Joined: 2013-09-01 17:30

[SOLVED]Settings up Email server

#1 Post by jalisco »

Hello ladies and gentlemen,

I want to setup my own email server, on my home debian server. I am already running a website (have a FQDN), and static IP.

There are numerous "simple" tutorials for setting up Dovecot, Postfix, and Squirrelmail.

I will proceed cautiously.

Was thinking of the following steps (more or less):
1. install Postfix and Dovecot
2. turn them both off -- until they are configured to my liking.
3. test them locally, before setting up MX and A records for the mail.

My primary concern/question is:

I don't want email spammers/frauder/etc, to send email from my domain before I can properly set it up. Should I be concerned about this? How can I subvert this? I am not a sys administrator, so I am doing this for the first time, and trying to be careful.
Last edited by jalisco on 2019-01-11 16:16, edited 1 time in total.

kedaha
Posts: 3521
Joined: 2008-05-24 12:26
Has thanked: 33 times
Been thanked: 77 times

Re: Settings up Email server

#2 Post by kedaha »

Hi,
There are numerous tutorials out there for a postfix & dovecot email server. For "jessie" I used the tutorial at workaround.org but for current stable I followed this step-by-step-setting-up-mail-server guide, with a few modifications as detailed in my forum topic. The reason I changed from the excellent workaround tutorial was because I wanted to use postfixadmin to manage users, aliases and domains and, as a matter of principle, chose to install the stable version from debian's main repository rather than the downloaded version.
yes, I think you should thoroughly test the configuration before exposing your email sever to the 'net.
With regard to your questions I would recommend you read through the workaround tutorial and maybe even try it because it answers your questions about keeping the server safe.
Don't use squirrelmail because it's no longer maintained. I'd recommend using roundcube from Debian.
DebianStable

Code: Select all

$ vrms

No non-free or contrib packages installed on debian!  rms would be proud.

User avatar
jalisco
Posts: 94
Joined: 2013-09-01 17:30

Re: Settings up Email server

#3 Post by jalisco »

Thanks for the info. I did not know that squirrelmail was no longer maintained, but I guess I will not use it then.

Again, thanks for the links, I will check them out.

reinob
Posts: 1189
Joined: 2014-06-30 11:42
Has thanked: 97 times
Been thanked: 47 times

Re: Settings up Email server

#4 Post by reinob »

jalisco wrote: I want to setup my own email server, on my home debian server. I am already running a website (have a FQDN), and static IP.
but then
I am not a sys administrator, so I am doing this for the first time, and trying to be careful.
Do you have a compelling reason why you want to do this?
Mail server admin is, however private and/or low traffic it may be, something that requires your constant attention.
You have to learn and keep up with any security issues and you will run into problems when delivering e-mail (you have a static IP, but maybe the world -- the blacklists -- thinks your IP is private and hence "spammy"), plus you will have to sign up for "feedback loops" with the dev^H^H^H Microsoft, Google, Yahoo and others.

If you really really want to go ahead with this, first configure your firewall to block any access to any port opened by postfix and dovecot. This way you can play with them ON YOUR LOCAL SUBNET while the Internet is unaware of what you're doing.

Luckily both dovecot and postfix have good (sane) defaults. But make sure your e-mail accounts have a good password (millions of bots will try to send e-mails (postfix sasl) and get your e-mails (dovecot)) plus something like fail2ban.

Make a plan of what you want to have (spam and/or virus filtering, DKIM signing, DKIM validation, SPF, SPF policy, DMARC, DMARC policy, greylisting, etc. etc.) and prepare that (mind, paper) before you even apt install postfix.

That should keep you busy for a while. Come back when you're ready :)
Good luck.

User avatar
jalisco
Posts: 94
Joined: 2013-09-01 17:30

Re: Settings up Email server

#5 Post by jalisco »

thanks for the information Reinob.

You threw a lot of keywords at me, that I didn't know, that I should know as I move forward, thanks for the advice. I will take it to heart.

I have gone through, and written down a few pages of things to be aware of, as I proceed (and, before I start), so you gave me valuable information to add to that list. I will just keep on figuring stuff out on paper.

I identified, straight away, that setting up email (properly) wasn't going to be a "slam-bam" job.

But, as a computer science student, it also shouldn't be outside the realm of my abilities, so it's doing as a learning experience.

It should never hurt to learn. =)

User avatar
jalisco
Posts: 94
Joined: 2013-09-01 17:30

[SOLVED]Settings up Email server

#6 Post by jalisco »

For anyone interested, I wanted to update this thread.

I did setup and configure an email server, that works great. There are numerous tutorials online, many steps, and in summation, it's an arduous task.

I cross-referenced many tutorials, and other information, working my way through, but the following tutorial was the most valuable.

https://vorkbaard.nl/installing-a-mails ... roduction/

On a scale of 1/10, it's a 10. It's great.

This one was also decent:

https://arstechnica.com/information-tec ... in-part-1/

The second one, was about a 7.5/10. But, still informative.

Anyway, good luck with anyone who also wants to setup a mail server.

Before you start, you need the following:
1. static ip. I guess it's theoretically possible to do without, but I wouldn't recommend it.
2. Access to your domain configuration, which you should have, if you have a domain.
3. You'll need to get a PTR record from your ISP, which shouldn't involve more than calling them up, and asking them to set one up for you.

Ok, good luck =)

kedaha
Posts: 3521
Joined: 2008-05-24 12:26
Has thanked: 33 times
Been thanked: 77 times

Re: [SOLVED]Settings up Email server

#7 Post by kedaha »

Hi jalisco
I was interested to see that you got your email server up and running with installing-a-mailserver-on-debian.
I think for it to be complete that postfixadmin, which I use to manage users, aliases and domains, needs to be used rather than using phpmyadmin or mysql.
DebianStable

Code: Select all

$ vrms

No non-free or contrib packages installed on debian!  rms would be proud.

Post Reply