Trying mail-in-a-box and trying to get it to work. I’ve followed the docs as carefully as I could.
All worked great for about a week and then emails to gmail not only don’t go to gmail spam, they get bounced back. Now this is happening to lots of sent mails to all other domains I send to. Basically I can’t send email to anyone. Lots of “Connection timed out”. Seems I’m receiving ok. But this worked great for a week.
My setup is on AWS (Amazon web services). Stock standard Ubuntu server 18. Then I updated/patched it all. Then loaded MIAB. All pretty standard. I have all the ports open that are required. however System Status Checks report Incoming Mail (SMTP/postfix) is running but is not publicly accessible at 126.96.36.199:25.
mxtoolbox(dot)com reports my two domains, goodlets(dot)com and icafe(dot)com(dot)au are all good. No blacklist. I’ve even tried to get into the gmail postmaster tools page (postmaster(dot)google(dot)com/u/0/managedomains) and get the txt record which i’ve added to my dns records, still nothing. I can’t figure out why gmail and now lots of other domains are simply rejecting my email. I’ve put every recommended dns record in there.
mxtoolbox(dot)com check on 188.8.131.52 my ip reports all good and even reports Connecting to 184.108.40.206… 220 box(dot)goodlets(dot)com ESMTP Hi, I’m a Mail-in-a-Box (Ubuntu/Postfix; see https:// mailinabox(dot)email/) [1819 ms]
What am I doing wrong or how do I troubleshoot this further? I don’t know what else to do?
Thanks in advance.
(i’ve put (dot) in place of .)
The third issue is that you’re trying to run a mail server on AWS … their IP ranges are blocked by many because of spammers. I am working with someone else right now to find a solution … and it looks like that solution may be an inexpensive SMTP relay that I have developed OR simply not using AWS for MiaB installations.
So why does System Status Checks state that it is not publicly accessible when mxtoolbox says it is?
Or is it just AWS will not allow any port 25 even when it says it is open?
Any pointers appreciated but I’ll go over the pupsncats again…
I don’t know anything about AWS, but when I had MiaB on my residential connection, MiaB would only see the local connection status and not the firewall WAN connection, thus would incorreclty report all kinds of issues related to DNS. I gave up on trying to fix it as the server otherwise performed flawlessy.
It would normally be, yes. But AWS blocks it. Their docs say that they only block outgoing, but you are not the first to have this issue. Have you contacted their support to request that the block be removed?
Hi, this is David aka pupsncats who made the tutorial for AWS Lightsail.
First, do you have the firewall open on AWS? You may have UFW open but if you don’t have AWS firewall open then it’s a no go. My preference I open all ports on the AWS EC2 instance/lightsail instance. Then let UFW/MailInABox handle the ports that need to be open.
Second, you need to let AWS know that your instance is an email server and that you need port 25 open. They will allow a few test emails to go through but they will shut you done if you don’t inform them what you are doing. You also need to let them know to set your reverse DNS at the same time…AND…check to make sure they do it. Many times they forget. Check it after a few days.
I think those are your problems. Super simple to fix. And Mail In A Box is super easy. Amazon AWS just requires a few extra steps.
Feel free to message me if you need help. I most likely won’t respond until tomorrow night or until Wednesday as I friends visiting right now and I have to take them to Denver tomorrow.
I used pupsncats guide to set up an email server in Lightsail about 11 months ago. I had to send them the rDNS form the second time, before things were working correctly. They must have to manually adjust things.
I just setup another MiaB at IntoVPS. The server is in Cluj, Romania. $3/mo 2gig ram and 20gig SSD. No issues at all. Tip of the hat to Alento.
I created a mailserver several days back on AWS but I did not have to open port 25 in a special way. I simply went to my firewall and enabled incoming for port 25. However, I too faced the weird issue of getting blacklisted IPs from AWS. It seems that most of their IPs are all bad.
@alento, do you have a solution to this? it seems like you know a several. Would you have some time to paste some links to them? Do you recommend a particular provider/s for mailinabox with whom we will be able to proceed with least trouble?
@Isuru Yes, I do have a solution to this problem. At least to the problem of getting email to the recipient’s server. The problem of email being discarded by providers due to their internal spam policies is only solvable by not using those providers. So, what I am saying is that no solution is 100% as there are factors outside of the solutions control.
So, in response to issues I have dealt with on Slack, and my own personal issues, I have created an affordable SMTP relay. Please PM me with your email address and I will send you more information if you so desire.
well eventually AWS removed the restriction on port 25. Now gmail likes me. I can email test emails back and forth from gmail.
Strange as when I first set up MIAB two months ago, test emails back and forth to gmail worked. Then after about a week they stopped. So I think that the port 25 restriction happens AFTER you start using port 25 rather than a blanket restriction to start with. They must detect it and block it when it happens. Hence my confusion as to why emails suddenly stopped working.
Eventually AWS allowed me to have port 25 open. I asked it for my account rather than the IP address because if you delete and recreate the instance or lightsail instance, you will get a new and different IP address. So pointless getting them to lift restrictions per IP address.
I followed the link provided to request port 25 to be unblocked but eventually they were responding to my gmail emails rather than inside the AWS support portal. Strange.
I had to give a business case to AWS as to why I wanted port 25 open and what measures was I going to implement to not send spam from my instance. I replied that it was a personal email server for internal emails only. As to what measures I said that as I haven’t actually used MIAB for email except for about a week, then I didn’t know too much about it to say what measures it has to reduce spam! How can I know much about a product if I am unable to use it?
Anyway if the MIAB powers that be have a documentation page, I’ll be happy to add something to it about how to get around AWS restrictions. I think it needs to be front and center that hosting providers like AWS block port 25. MIAB may well lose many users due to port 25 not working and no one knowing that providers block port 25… even any time after you start using it. New users may blame MIAB somehow.
Thanks everyone for your help and input. I’ll now proceed to getting other MAIB stuff working. Keep up the good work.