Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
-----------------------------------
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 ?
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.
You don't have an MX record, but yes, your server is accepting mail for the domain in question. (Make sure you create an account or alias for "abuse" as well.)
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:
an A record pointing from a server name (such as "mail.yourdomain.com") to your IP address
an MX record for the domain, pointing to the server name in the A record
Once they've done that, external servers will be able to deliver mail for your domain to your server.
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 ?
So an A record points my IP to mail.mydomain.com, which is the name of the server(the host computer)?
That is correct. Every host on the Internet needs to have one if it's to be accessed by name rather than by IP address. A (Address) records exist in the DNS zone for a domain, like "mydomain.com", and contains a name and an address. The entry in the DNS zone file looks something like this:
Code:
mail IN A 1.2.3.4
Quote:
Originally Posted by jamiebond
And a MX record is something on the Registrars system "pointing/routing" emails from "out there" to mail.mydomain.com?
MX stands for "Mail Exchanger", and each domain needs at least one in order for inbound mail to function.
The MX record looks like the A record, except:
it points from the domain itself rather than from a hostname
it must point to a name rather than an address
it contains an extra priority field
Here's an example:
Code:
@ IN MX 5 mail
In this case, the server name is actually "mail.mydomain.com"; the DNS server will automatically append the domain name to any value that doesn't end with a dot ("."), except IP addresses. Had the MX server been in another domain (like if your mail had been handled by your ISP or a "cloud provider" like Microsoft), the record would have looked something like this:
Code:
@ IN MX 5 mail1234.outlook.com.
Notice the trailing dot.
Quote:
Originally Posted by jamiebond
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 ?
Absolutely.
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. 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.
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.
Every few (undetermined) minutes of testing apart, I would get a:
SMTP -> ERROR: Failed to connect to server: Connection refused (111)
Something is killing the amavis daemon process. Once started, it shouldn't be stopping on it's own. In addition to mail.log, I would look in places like syslog, messages, daemon, mail.error and mail.info. Also, see this how-to-forge post about how to check, and if necessary set, the logging function of amavis.
I am also getting the "feeling" that amavis is the issue but I can not confirm that yet.
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.
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?
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?
Thanks. I've looked at mail- sys- daemon- etc logs and don't see any smtp related errors, so yes I think the problem is the router. I just can't proof it yet.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.