I am running squirrelmail, apache2, and postfix on Ubuntu 16.04 server edition. The server works fine, but if I don't use it for about an hour port 80 and 25 become closed for anyone trying to connect using my public ip.
Then if I reboot, everything will work fine for about an hour. All my debian servers still work so I know the problem is with Ubuntu and not my router.