jamesread
Posts: 3
Joined: Wed Apr 15, 2015 6:42 pm

pi as email and cloud server

Wed Apr 15, 2015 6:53 pm

Hi there,

I am looking at using my pi as an email and cloud based server. Had a look around and have found a few guides on how to do this. My question is can it be done without a static IP? I am with sky for my broadband and as such don't have a static IP. Will I need to use something like noip or can I just buy my domain and set it up as normal? Any help is appreciated.

Thank
James

User avatar
JAVE
Posts: 36
Joined: Thu Sep 19, 2013 11:08 am

Re: pi as email and cloud server

Thu Apr 16, 2015 3:11 pm

If you buy a domain name, you will need a static IP address. (Or you will need to update the DNS information every time your IP address changes)
Things like noip work better, because they provide an API that you can use to automatically update your IP address every time you boot your computer (or every x hours, etc).

Beware that some big providers will block mail coming from domestic IP addresses (as spam prevention), and that some internet providers will block incoming/outgoing traffic on port 25 (the default SMTP port)

cpc464
Posts: 239
Joined: Tue Jul 08, 2014 5:10 pm
Contact: Website

Re: pi as email and cloud server

Thu Apr 16, 2015 4:56 pm

You don't need a static IP to run a server at home. I have been running one for years with my dynamic IP. I'm with BT and my IP address changes every few weeks. When it does that, my BT router contacts DynDNS straightaway and resets my domain name to point to the new IP.

Visitors to my websites never know the difference. I am sure your Sky router will be able to do something similar - check the router configs. Likely it will support DynDNS and a few of the other large providers. My BT router supports both noip, DynDNS and others.
Unix engineer since 1989

ThomasS
Posts: 118
Joined: Thu Jan 23, 2014 7:05 pm
Location: Leeds
Contact: Website

Re: pi as email and cloud server

Thu Apr 16, 2015 5:46 pm

One potential issue if you're uploading/ downloading large files to your cloud server is home broadband speed. Most domestic broadband packages only deliver a few Mb/s upload speed, meaning you may only be able to download files from outside your network at that speed. You could check what speed you get at somewhere like http://www.speedtest.net
ThomasS

jamesread
Posts: 3
Joined: Wed Apr 15, 2015 6:42 pm

Re: pi as email and cloud server

Fri Apr 17, 2015 10:42 am

Thanks for the responses. Looks like my router has dyndns.org support. So I guess I can register a domain with them and I should be ok. Will I still get issues with being blocked on port 25 by sky for emails. I was planning to use it as my main email account but not much point if the traffic is going to be blocked.

Cheers James

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: pi as email and cloud server

Fri Apr 17, 2015 11:23 am

DynDNS doesn't change anything on your network or your ISP's view of your network. It's just a way of assigning a dynamic name to an IP address and having that automagically follow your IP address when your ISP changes it.

They simply fiddle with an A record (or AAAA record) in their DNS server when their update script runs.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

cpc464
Posts: 239
Joined: Tue Jul 08, 2014 5:10 pm
Contact: Website

Re: pi as email and cloud server

Fri Apr 17, 2015 1:29 pm

Your Sky router supports DynDNS, so it should work like my BT router.

Note what the above poster said about network speeds. With ADSL, your upload speed will be slower than your upload speed. My BT speed is 18 Mb/s down but only 1 Mb/s up. This means visitors to my website (including me, when I access Owncloud on the Pi from work or elsewhere) will experience a maximum "download" speed of 1 Mb/s (ie. about 8 seconds to download 1 megabyte). It doesn't really matter though and is still plenty for most websites.

Yes if Sky are blocking port 25 you can't run a mail server.
Unix engineer since 1989

User avatar
JAVE
Posts: 36
Joined: Thu Sep 19, 2013 11:08 am

Re: pi as email and cloud server

Mon Apr 20, 2015 12:49 pm

You can test whether port 25 is blocked by connecting to a remote mail server:

Code: Select all

telnet mail.xs4all.nl 25
You should get something like this:

Code: Select all

Trying 194.109.6.40...
Connected to mail.xs4all.nl.
Escape character is '^]'.
220 smtp-cloud2.xs4all.net ESMTP ESMTP server ready
(type 'quit' to exit.)

If that works, you can send mail.

Now you just have to test if you can receive mail on port 25.

For this you need to set up a service that listens on port 25, and connect to it from somewhere outside of your ISP's part of the internet.
(Easiest to set up a mail server (haha. Setting up a mail server is not easy :? but if receiving mail works, you're done already), and send a test mail from a Google account or something similar)

You can also add port 25 to sshd so it listens on ports 22 (ssh) and 25 (smtp)
That way you can use ssh to connect to port 25 (ssh -p 25 user@your.ip.address)

jamesread
Posts: 3
Joined: Wed Apr 15, 2015 6:42 pm

Re: pi as email and cloud server

Mon Apr 20, 2015 4:55 pm

Thanks for the responses, when I do a telnet I get the following back so looks like im ok for sending emails which is good.

220 smtp-cloud2.xs4all.net ESMTP ESMTP server ready

Guess im just going to have to give it a go and see what happens

Thanks for the help

User avatar
alexandra
Posts: 12
Joined: Thu Apr 23, 2015 4:36 pm

Re: pi as email and cloud server

Thu Apr 23, 2015 6:49 pm

Try to use "rasp4you". With this simple software you can reach also any ip camera on your private network
using a domain name. Site is : www.rasp4you.com

beerreason
Posts: 1
Joined: Sun Sep 06, 2015 2:51 am

Re: pi as email and cloud server

Sun Sep 06, 2015 3:02 am

Hi -- I know this thread is several months old, but I wanted to add a comment for completeness. I've been successfully running a Linux machine as an email server for nearly 15 years. During that time, my ISP started blocking port 25, but what I do now is use the fetchmail command on the machine to retrieve mail from my external accounts on a periodic basis (e.g. every 1-2 minutes). Yes, this introduces a slight delay in mail delivery, but it's really not that bad. fetchmail can be configured to retrieve from POP and IMAP servers (and maybe others), and once you have it working, you can set it to delete the mail from the remote server when it fetches successfully.

I came across this thread while looking up how to configure my RPi2 as an email server to replace my old Fedora machine. I had gotten it working about a year ago on my RPi B+, but not with an external hard disk, which you really do need for longevity of the system.

I should add, too, that I've been using DynDNS (now called just "Dyn") for as long as I've been running a Linux-based server. There are others, but that's the dynamic DNS company I've used the most and for the longest time.

Return to “Networking and servers”