All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Running mailserver is hard man
For the past few days I am reading up on setting up postfix and dovecot because I like to live dangerously. Today I followed the following tutorial and setup everything. IT WAS VERY HARD MAN! even though I followed tutorial and I just had to run commands but still it was very taxing on my mind to understand what does what and I feel like my mind has been drained. There are so many things to do to run a mail server.
https://www.linode.com/docs/email/postfix/email-with-postfix-dovecot-and-mysql/
Anyway the problems I am facing are two:
I am able to send email BUT I have to open outgoing port 25. I know SMTP is 25 but I have enabled TLS (or may be SSL) and I assume it should be using port 587 or 465 but if I keep outgoing port 25 blocked through
ufw
then mail doesn't go. And when I check the email on GMail client on Android, it is showingStandard encryption (TLS)
so I believe it is using TLS to send email then why do I have to keep port 25 open?I am unable to receive email. Send email from GMail to my mailserver does nothing. When I used MXRoute (I have one domain there) to send email to myself, the email returned with following message:
host smtp-out.mxroute.com[xxx.xxx.xxx.xxx] said: 550
5.1.2 email1@mydomain.com: Recipient address rejected: Malformed DNS
server reply (in reply to RCPT TO command)
I don't know what this means. I even opened incoming port 25 but same result. I haven't setup any SPF, DKIM, Reverse DNS so may be this is the issue?
Comments
Calculate the time spent vs paying Google $5 for incredible spam filters & delivery.
Mail-in-a-Box Should work nicely!
try mailcow hosted or run in house server or in a VPS
Maybe do some tests using mxtoolbox dot com. Good place to start.
Yeah but $5 > $0 and me being a true LET member so....
this looks like a simplified one-in-all mail server solution, correct?
is mailcow easier to setup than postfix?
Lol I think most of LET realized mail servers aren't worth your time but hey if you enjoy it u do u fam
This is a good idea. I have now shutdown the VPS because I am too scared to keep it running (you know someone finding out and IP black listing and all) so will try this tomorrow.
Yeah, most pay 3rd party to do mail delivery nowadays.
Seriously not worth the extra headache.
Hopefully will flag up where you might need to change some settings
Generally my first port of call when setting up a mail server and its not playing ball!
Good luck !
Delivery is the hard part, as others have pointed out. You can still use postfix, but if you set up a smarthost for mail delivery (via SES/Mailgun/etc) your life will be much easier.
This is the plan. But one thing I am unable to figure out is how do I authenticate my users and then relay that mail to another smtp (sendgrid, mailgun etc) for delivery. So for e.g.
[email protected], [email protected], [email protected] sends email via mail.mydomain.com (this is my server) which is relayed to sendgrid for delivery
[email protected], [email protected], [email protected] needs to authenticated by my server before they can send email
Yeah I am using MXRoute BF2018 plan which is perfectly fine for my needs. This is just for a project which I have in my mind. You are right it's really headache.
Here's a look. I censored your domain:
Your DNS server is literally returning the value "1 \@." for the MX record. Weird.
Instead of discouraging you I'll try to address your problems:
if you want to have public mail server, you have to open port 25. Not every mail-server is using smtps/465 but every one is using smtp/25 (587 is for message submission, not server2server communication).
error message says it all: check your dn-server for proper MX, A and PTR records
Well, mailcow covers all other issues such as dovecot/gui/spam filtering, postfix is the an MTA.
If you're comfortable with docker, mailcow is pretty straight forward to setup.
I am using CloudFlare and here are my entries:
I believe instead of @ I should be using IP of my VPS. Surprisingly I am able to send email to GMail, MXRoute and it goes directly into inbox and not spam.
Can you please elaborate a more on port 587 message submission vs server2server communication part?
First issue I see is no SPF, it's very important. Even with hosted mail.
What is your score at http://mail-tester.com?
Sounds like a newspaper headline about Jason Statham quickly delivering post. :-|
No idea. Will check tomorrow.
Time for a remake?
Can't use an IP as an MX, but you can make an A record for the VPS like "mail.mydomain.com" and then set the MX record to "mail.mydomain.com" instead.
yes one of the easiest docker mail setup you can find on the internet. If you google mailcow dockerized you will get lots of tutorial for your OS Linux
port 587 would be used for your users to authenticate their local client at your mail server to send mail, or for your mail server to authenticate so as to relay mail through mxroute ( or other mail relay service).
This is an example of a sendmail argument to relay all out going mail through mxroute using port 587.
Inbound mail servers are not that hard AFTER you get it all set up.
Outbound is always changing and why after many years of running mail servers I decided that I'll let mxroute handle outbound delivery.
EDIT: mxroute login details, username, and password are stored in /etc/mail/authinfo in the above example.
Unless you want to make living on hosting mail server, just leave it to those who know what they are doing. Running a mail server no more have to do with just configuring your box. It now involves a whole lot of other stuff including Artificial Intelligence.
You don't need an MX record for mail, and set the MX record for mydomain.com to a domain pointing to your mailserver, and set the SSL key on postfix (if you want to enable SMTPS). AFAIK pointing MX record to an IP address should technically work, but never done it.
IMO the best way is using mail-in-a-box or Mailcow (what I'm currently using)
@alilet, use mailcow, it is easy to setup using the documentation, it is actively being developed/updated and the developer usually answers github issues quickly.
https://mailcow.github.io/mailcow-dockerized-docs/