luckymitra
Posts: 18
Joined: Sun Sep 11, 2016 6:07 pm

Mail Server Raspberry Pi

Sat Mar 25, 2017 6:29 am

Hi thereI am interested in setting up a mail server (very soon) on my RPi3. I already have a registered domain and have a Dynamic DNS host domain provider (Namecheap which provides free DYDNS service ) in case my IP changes but I'm wondering how/what would be the best way to set the mail server up? I've heard of a few options like Sendmail/Iredmail/ but is there any low ran use/processor intensive option? I've head that turning the spam filter off saves memory usage and such.?. What are you suggestions? Also, I have a 1.5TB external Hd plugged in if that helps for storage

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: Mail Server Raspberry Pi

Sat Mar 25, 2017 11:57 am

luckymitra wrote:Hi thereI am interested in setting up a mail server (very soon) on my RPi3. I already have a registered domain and have a Dynamic DNS host domain provider (Namecheap which provides free DYDNS service ) in case my IP changes but I'm wondering how/what would be the best way to set the mail server up? I've heard of a few options like Sendmail/Iredmail/ but is there any low ran use/processor intensive option? I've head that turning the spam filter off saves memory usage and such.?. What are you suggestions? Also, I have a 1.5TB external Hd plugged in if that helps for storage
Sendmail and postfix are likely the two most popular and are fairly lightweight (resources needed will depend on how much mail the process and what they do with it).

You will need a domain name that you can enter MX records on. Ideally you will want a static IP. You will also need and ISP that permits you to run a mail server - Many will block incoming smtp traffic.

Along side the mail server you will probably also need to setup spam and virus scanning, greylisting, dkim, spf and probably a few others. You also need to learn about what an open relay is and how to prevent it (otherwise you're liable to become a spammers best friend and start getting angry letters from your ISP).

Personally I'd suggest a mail server is one of the things that's probably better to get from someone else rather than trying to setup your own. I run a mail server for some of my stuff and it's a lot of hassle (but currently only just slightly less hassle than migrating it somewhere else).

S0litaire
Posts: 216
Joined: Thu Dec 29, 2011 4:24 pm
Location: Ayrshire, Scotland
Contact: ICQ Skype Twitter

Re: Mail Server Raspberry Pi

Sat Mar 25, 2017 1:00 pm

have a read of this how to guide:
https://pimylifeup.com/raspberry-pi-email-server/

It's using "citadel" groupware server to handle the mail settings.

Pre-Requisites :
- A Domain Name
- Static IP address or subscribed to a Dynamic DNS service.
--
Laters

Bill "Solitaire" C

Anáil nathrach, ortha bhas betha, do cheol déanta

User avatar
DougieLawson
Posts: 35381
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Mail Server Raspberry Pi

Sat Mar 25, 2017 1:17 pm

If you open port 25 to the public internet you'll need to have some sane and sensible security in place, because otherwise your Raspberry will become a spam spewing mail relay in a matter of minutes.

They're trying all the time. I had my email server open for about ten minutes and got this junk in my log

Code: Select all

Mar 14 14:49:02 apollo postfix/smtpd[11142]: disconnect from unknown[89.46.82.238]
Mar 14 14:49:05 apollo postfix/smtpd[11142]: connect from unknown[89.46.82.238]
Mar 14 14:49:06 apollo postfix/smtpd[11142]: warning: unknown[89.46.82.238]: SASL LOGIN authentication failed: authentication failure
...
Mar 14 14:50:27 apollo postfix/smtpd[11142]: too many errors after AUTH from unknown[89.46.82.238]
Note: Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Electron752
Posts: 142
Joined: Mon Mar 02, 2015 7:09 pm

Re: Mail Server Raspberry Pi

Sat Mar 25, 2017 8:45 pm

You don't have to open up port 25 completely, just have it redirect to a single machine the RPI. Just don't have something like dovecot running on the same RPI because it's a big target for people.

Honestly, the biggest issue is that most ISP will filter the SMTP port in both directions so that you don't try to run a business or something. That's the harder part to work around.

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: Mail Server Raspberry Pi

Sat Mar 25, 2017 10:12 pm

I just heard an echo
viewtopic.php?f=63&t=170101
Maybe you should also read the answers from last time you asked the same question (although I think you've had the same answers again)

Return to “General discussion”