Using Postfix with MX record only.
Hello, I am basically just looking for some confirmation here please.
I'm relatively new to all this, so please be nice... I am fairly confident that my installation (see below) is correct because everything works as expected. The issue: ----------- My Domain Registrar says before they can register/bind myownserver.com to point to my IP, they require a fully functioning SMTP server at my IP which is capable of receiving mail for postmaster- and abuse@myownserver.com So I have this installation: http://howtoforge.com/perfect-server...ot-ispconfig-3 My Registrar DID create an MX record for me at: MAIL.myownserver.com... ...in their zone on: NS1.REGISTRARSDOMAIN.TLD and NS2.REGISTRARSDOMAIN.TLD DIG and NSLOOKUP results confirms the above. I therefor have used the above NameServers' IPs and MAIL.MYOWNSERVER.COM in my Server/Postfix configuration. What I know: 1. My IP does NOT resolve to myownserver.com yet. 2. My IP DOES have a MX record; mail.myownserver.com When doing a smtp test AGAINST MY IP ADDRESS here... https://wormly.com/test_smtp_server ...I get the following result: ----------------------------------- Connecting... SMTP -> FROM SERVER: 220 mail.myownserver.com ESMTP Postfix (Ubuntu) SMTP -> FROM SERVER: 250-myownmailserver 250-PIPELINING 250-SIZE 250-VRFY 250-ETRN 250-STARTTLS 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN MAIL FROM: someone@somewhere.com SMTP -> FROM SERVER: 250 2.1.0 Ok RCPT TO: postmaster@myownserver.com SMTP -> FROM SERVER: 250 2.1.5 Ok Sending Mail Message Body... SMTP -> FROM SERVER: 354 End data with . SMTP -> FROM SERVER: 250 2.0.0 Ok: queued as 37BD92608 Message completed successfully. ---------------------------------------- And of course I confirmed that the mail is in fact delivered at the server. Looking at the above result, I assume that my SMTP server does in fact accept mail FROM ANYWHERE to postmaster@myownserver.com - because I have an MX record - even though I don't have a Qualified Domain Name yet. Is this correct ? Can i go back to my registrar with this working Postfix configuration ? Please comment your thoughts on this. Thank you kindly. Jamie. |
Quote:
When you tell your registrar that the mail server is up and running, they will create (at least) two records in the DNS zone for your domain:
|
Thank you. Yes I do have accounts for abuse, webmaster, info, etc.
So an A record points my IP to mail.mydomain.com, which is the name of the server(the host computer)? And a MX record is something on the Registrars system "pointing/routing" emails from "out there" to mail.mydomain.com? Or is it the other way round ? I've been at this for 3 weeks straight, and after google'ing this day and nite, I am still trying to understand the difference between: mail.mydomain.com and mydomain.com Anyway, thank you for the feedback. Just to be absolutely sure before I go back to my Registrar... You agree that I DO have a MAIL SERVER capable of receiving mail at mail.MYDOMAINNAME.com ? Kind regards, Jamie. |
Quote:
Code:
mail IN A 1.2.3.4 Quote:
The MX record looks like the A record, except:
Code:
@ IN MX 5 mail Code:
@ IN MX 5 mail1234.outlook.com. Quote:
You may want to double-check that your server isn't acting as an open relay (that is, forwarding inbound mail for non-local addresses). You can do that by entering your IP address here, here or here. |
Thank you.
Thank you. Your explanation is so much clearer than wikipedia's version of A and MX records.
Believe it when I say I did the complete server installation 5 times, yes, 5 times "clean install" in order to get it right. Coming from windows (forcibly due to work) over the past 20years, this was a steep learning curve and very long hours for me. So I sincerely appreciate your feedback. Thanks for the heads up on the open relay test. I'll be sure to double-check that also. Thanks again. Jamie. PS: To any Windows users reading this - let it be known: Windows makes you lazy !! Linux is hard work, but sooooooo much faster, more effective, and way better. Period. |
Issues
Hi again, I just want to keep this thread alive for now because there is an issue:
Every so often the SMTP would just stop working (see below). As soon as I restart amavis (/etc/init.d/amavis restart), the SMTP works again, for a while. I've been testing the SMTP all day long at https://www.wormly.com/test_smtp_server Every few (undetermined) minutes of testing apart, I would get a: SMTP -> ERROR: Failed to connect to server: Connection refused (111) Message sending failed. Then I do /etc/init.d/amavis restart Run the test again. Test successful. I could not find anything significant in mail.log, yet. I want to believe it is some kind of timeout issue but I am still looking into the problem. I will post here if I get it sorted. Any thoughts from you would be greatly appreciated. Thank you. Jamie. |
Quote:
|
Hi, thank you for your reply.
Quote:
I still do not find amavis related errors in the logs but I am still investigating. (Also, see below for -> not needing to restart amavis) Something else, and maybe just my imagination, but it does seem strange that: During after hours, when the (cisco 800) router is not very busy (low traffic), my testing the SMTP server is successful (error free) every time, all through the nite. During office hours, when the router is more busy (with general internet traffic), I start getting the test errors: Sometimes it will error out at EHLO, sometimes at HELO, sometimes at DATA, and then sometimes the (111) error as described previously. Today I noticed that I do NOT have to restart amavis for the test to be successful again later. So in short: Testing the server at (https://www.wormly.com/test_smtp_server - and other urls), the test result would be successful 80% of the time. If/when the test does result in an error, it would be successful again a few minutes later, irrespective of me restarting amvis or not. I am at a loss - but will keep at it. I need 100% up-time of the SMTP server. As it should be. I will post back here with my findings. Your thoughts on this is always appreciated. Thank you. Jamie. |
Interesting. Connection refused typically means that the port is closed. You're experiencing this during times of heavier traffic and have not problems during periods of lighter traffic. Have you looked at the router status to see what the CPU utilization is, as well as other metrics like packet losses, and percent traffic capacity? Perhaps your router isn't able to keep up and is responding by denying new connections?
|
Quote:
Yesterday (during office hours), I disconnected the rest of the network (approx 12 comps - 1 of which does video conferencing), had only 3 other comps generating traffic, and did not once have connection errors while testing the smtp. I will get the rest of the network up today, get some high traffic usage going and see how it goes. Will keep you posted for interest sake. |
Solved
There were 2 switches between the router and my smtp server.
I think that configuration was the issue. Although it shouldn't have an effect (?) - because i have other machines running through those switches with no connection problems. Anyway, I connected the smtp box directly to the router and since then not experience any connection/mail errors. Thank you to everyone who replied. I appreciate your comments and advice. Kind regards. Jamie. |
All times are GMT -5. The time now is 06:25 PM. |