I have a main server where are placed the DNS records for a domain (eg: example.com), but this domain has another server only for webmail. The DNS setup is working fine: I can access example.com through the browser and the webmail can send/receive emails (from webmail.example.com - A/MX DNS records are ok).
The problem is that on example.com there's a page where I send emails to contact#example.com and this is not being delivered - it works with anything else (Gmail, Hotmail etc).
I've tried some different things I found on Google/StackOverflow to fix it but without success.
exim -bt noreply#example.com (returns: router = localuser, transport = local_delivery)
exim -bt contact#example.com (returns: contact#example.com is undeliverable: Unrouteable address)
Where noreply# was created on the main server to send the emails from that page and contact# was created at the second server (webmail server). It looks like Exim4 is always looking for internal email addresses for this domain, even though the MX record is setup for another server.
How I could fix it? Exim4 should look for the MX record instead of trying to deliver it locally.
Thank you.
you have set example.com as a local domain. don't do that except on the MX server for example.com.
Related
i have a mail server behind CloudFlare and when i check some logs and other DNS tools i seen a MX dc-abefc4aaxxxxx that isn't registered in my dns configuration in cloudflare. I tryed checking SOA and always shows cloudflare's name servers.
How can i really see where is this register being pushed?
Finally i solved this issue. Ocurrs when A record to Mail server is proxied and MX not. To solve this unproxy A record.
Here is the solution
https://support.cloudflare.com/hc/en-us/articles/360020296512-DNS-Troubleshooting-FAQ
I want to make mail() of PHP work in my Windows Server 2012 R2. To this end, I first installed SMTP by following this page.
One thing that confuses me is the Full-qualified domain name. WIN-RFELH8GM0KN is what it proposes by default. My server hosts several websites, does anyone know which website I should specify here?
I did not change this, as a consequence, mail www.google.com in nslookup returns DNS request timed out. So is it an error?
Of cause, my test.php does not send the mail:
<?php
mail('mymail#gmail.com', 'title', 'content');
?>
Could anyone help?
Update 1 Following the answer of #LittleAI , I started SMTP, but DNS request timed out is still there:
Update 2 Here is php.ini:
telnet localhost 25 returns the follows:
Update 3 Here was a test, which worked well: I did receive the test mail in the inbox of softtitmur#gmail.com. However, if I redo the test in Update 1, there is still DNS requested time out.. And test.php still cannot send the mail...
Update 4 I just realised that in the page I followed, it is mail.vsysad.com under nslookup (I thought it was mail vsysad.com, that is why i tried mail www.google.com which did not make sense). So it works also in my server, and there is no DNS request timed out.
Then, I double checked php.ini, I realised that sendmail_from was not uncommented. So I uncommented it and set sendmail_from = softtimur#gmail.com, as a result, mail() of php works now, so the problem is solved, though I still don't understand FQDN and its default value (ie, WIN-RFELH8GM0KN)...
The first thing I noticed is that your SMTP Virtual service in IIS is not in a starting state so this would cause an issue. Make sure this service is in a starting state before testing.
The FQDN name is mainly used for the SMTP banner which the sender will be presented when connecting over port 25 to your server.
It maybe worth installing the DNS role onto your server and create a forward lookup zone referencing a fake domain e.g test.com and create an a record within this zone called SMTP using your servers IP. Make sure to then set your server to use 127.0.0.1 as the DNS provider so it can check record before delegating the reponse to root hints/external dns forwarder.
You need to do an SMTP request using Telnet to confirm SMTP is listening on port 25. You can do this by using the localhost ip address (127.0.0.1) as shown below:
telnet 127.0.0.1 25
helo test.com
MAIL FROM: ****YOUR EMAIL ACCOUNT****
RCPT TO: ****SENDERS ADDRESS****
DATA
You would probably not receive the email from your relay to GMAIL due to SPF Record which is in place that only allows certain IP/hostnames to send as google.com, but for testing you should see your server receive the mail after data has been inputted.
Here is the guide for using telnet on your server. Just make sure you have telnet feature installed as this is not installed by default.
http://www.yuki-onna.co.uk/email/smtp.html
Additional:
telnet localhost 25
After the SMTP banner type the following command in but make sure not to make any mistakes or else you'll need to probably start your sesssion all over again.
helo test.com
You should then see a 250 response to say the server is listening
The type the following:
MAIL FROM: test#test.com
It should respond with OK. If so, then type:
RCPT TO: ***YOU EMAIL ADDRESS OF CHOICE****
Again, it should respond with OK. If so, type the following:
DATA
Press enter after the DATA command. Your now into the body of the email. For testing purposes we will miss the subject bar and just add some data to the body.
This is a test email.
Then to complete the email you need to leave a blank line by pressing return, then a full stop, then return again like so.
***BLANK LINE****
.
***Hit Return****
Screenshot all the commands but you can blank out the email so I can see the output.
In this moment, I am learning how the DNS and domains resolutions work and I have a question.
Let's take a.test.com for example.
As I understand it, first of all, the intermediary ISP DNS server is called. If it has the domain IP in cache, it returns it. Otherwise, it does consecutively these following tasks :
It calls a root DNS server which returns a com DNS server IP
It calls that top level DNS server which returns the test.com DNS server IP
It calls that DNS server to finally get a.test.com's IP
Is it correct ?
And now what does it happen when we resolve a.b.c.test.com ?
Does it call another DNS server or does the c.test.com's DNS server contain the a.b.c.test.com's IP ?
Thanks
Yes, you are pretty much correct. Nothing different will happen in next steps: c.test.com will respond with a referral to more authoritative server (the one for b.c.test.com), or if itself is authoritative then it will respond with an answer.
When troubleshooting DNS issues (specifically whether a domain is resolving), what is the proper way to check so that you get accurate results? DNS info is cached throughout the internet, and different machines (like local machine) or service (like pingdom) has different results.
How to check the DNS so that you know what you will get after it propagates?
Working with Heroku and CloudFlare.
In most common cases you can use tools such as: dig or host. Both tools are made for query name servers to retrieve info. You can also use a simple "ping something.domain.com" in order to see if IP has changed. But I suggest you to use different DNS's on the computer you're using to test. Actually Google DNS replicate so fast ( 8.8.8.8 ).
Not on purpose DNS poisoning: Keep in mind if you're pinging something that is recently configured/changed on your name server and still not propagated you'll "poison" the DNS's cache and this data is going to expire, but later...( Always depending on domain name TTL's of course ).
Using a new DNS wich never has known that domain you're sure the request is made for the first time and it's going to be made without asking any cache.
Example:
To get all the DNS servers for domain.com:
$ host -t ns domain.com
domain.com name server ns2.domain.com.
domain.com name server ns3.domain.com.
To ask a domain name for something.domain.com:
$ dig #nameserver something.domain.com
You can also ask for TXT, CNAME types and so on...
Examples:
AXFR retrieval test:
$ dig #domainname domain.com AXFR
Or get all Mail Exchange (MX) server for a domain:
$ host -t MX domain.com
domain.com mail is handled by 10 smtp.godo.com.
domain.com mail is handled by 20 smtp2.godo.com.
Hope it helps.
Cheers! :)
http://en.wikipedia.org/wiki/Nslookup
To get a "Non-authoritative" answer from your local name server that would be e.g.:
nslookup test.com
To check the name server where the domain is listed that would be e.g.:
nslookup test.com nameServerOfTest.com
My Question
Hello All! Man, I love Stack Overflow :)
Anyway, I am configuring my first ever Mail Server and want to do it right.
The actual server is configured and working great so just need a bit of help with the rdns & SFP public records of my domains. I have spent days researching but I am utterly confused so could do with a much appreciated hand.
Using this sample data below:
Domains the mail server handles: example.com, example.co.uk, example.net
Mail Server IP (For IMAP and SMTP): 123.123.123.123 for all domains
Website Server IP (A Record / For Port 80 HTTP): 101.101.101.101 = .com, 102.102.102.102 = .co.uk, 103.103.103.103 = .net
How do I setup the records?
My best guesses
rdsn set correct so emails not rejected as spam
Am I right in thinking that rdns is configured around the domains A records as follows:
rdns 101.101.101.101 = example.com
rdns 102.102.102.102 = example.co.uk
rdns 103.103.103.103 = example.net
And that the mail server on IP 123.123.123.123 can rdns to whatever my ISP decides? Or does the mail server IP rdsn have to point to one of the same IPs above (say 101.101.101.101 for the .com) in which case, whatabout the .co.uk and the .net? Is'nt RDNS set only one domain per IP? I've read a lot of conflicting information on all of this.
spf set correct so emails not rejected as spam
Do I set the below the same for each domain?
v=spf1 mx:example.com mx:example.co.uk mx:example.net ~all
Or do I need a new domain which points straight to my mail server? Say:
mail.example.com (A Record / For Port 80 HTTP): 123.123.123.123
&
v=spf1 mx:mail.example.com ~all
Set as the SPF for example.com, example.co.uk and example.net?
Any help on the above MUCH MUCH MUCH loved and appreciated. Thanks a lot. And ignore my best guesses if they are way off, only shown to display what I have learnt so far.
Also please note I have full control over rdsn, dns and MX records and spf txt etc on all my domains and IPs so whatever needs doing - i'll do it!
Many thanks. :)