Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: svetlo56 on June 10, 2007, 04:13:42 AM

Title: Not receiving any mail!
Post by: svetlo56 on June 10, 2007, 04:13:42 AM
My mail user@domain.us has worked up to a couple of weeks ago, and then abruptly stopped. When I send a mail to myself form SME server it arrives properly. When I try from anywhere else (eg. user@yahoo.com) not a trace of email seen like it sank to a black hole, and yahoo also does not complain of undeliverable messages. I am totally stumped. Checked filters, disabled all, and checked every other option I can think of, but my email stays mute (except as I said above, when I send a message to myself from my email).

Everything else on my SME server works.
Title: Not receiving any mail!
Post by: mmccarn on June 10, 2007, 05:46:45 AM
Try using tail -f /var/log/qpsmtpd/current while you send yourself a message from yahoo -- if yahoo ever tries to contact your server you should see something.

If yahoo never tries to contact your server, you probably have a DNS issue...

try nslookup -type=mx <yourdomain>.us 4.2.2.1  If you get an error, you have a dns problem that you need to fix with your dns registrar or hosting service.

If you do get an answer, it will probably look like 'mail.<yourdomain>.us' -- now check the address for that with nslookup mail.<yourdomain>.us 4.2.2.1.  If this doesn't return the wan ip for your sme, you have a dns problem...
Title: DNS server
Post by: svetlo56 on June 10, 2007, 09:13:06 AM
I also have a web server active on my SME server, and it's working fine, ie when I type http://domain.us I do get my web site properly. This indicates to me that the DNS server is working properly. I also checked the port forwarding settings in my router (FVS318 Netgear) and all seems OK. And again, when I send email from SME server to user@domain.us it works fine. From outside it does not work fine. I am stumped big time.
Title: Not receiving any mail!
Post by: mmccarn on June 10, 2007, 02:42:09 PM
Mail uses MX records.  Browsing uses A records.

Watch your log files while you send yourself a message from off-site and tell us what happens.

Or don't.
Title: Not receiving any mail!
Post by: svetlo56 on June 10, 2007, 11:37:07 PM
Quote from: "mmccarn"
Mail uses MX records.  Browsing uses A records.

Watch your log files while you send yourself a message from off-site and tell us what happens.

Or don't.


Which log file should I watch? There are many, including mailllog (which is empty) and under View log files there are many, too many to look each one individually without knowing what to look for.
Title: Not receiving any mail!
Post by: mmccarn on June 10, 2007, 11:49:25 PM
http://forums.contribs.org/index.php?topic=37375.0
Title: Not receiving any mail!
Post by: svetlo56 on June 11, 2007, 12:05:00 AM
Quote from: "mmccarn"
Try using tail -f /var/log/qpsmtpd/current while you send yourself a message from yahoo -- if yahoo ever tries to contact your server you should see something.

If yahoo never tries to contact your server, you probably have a DNS issue...

try nslookup -type=mx <yourdomain>.us 4.2.2.1  If you get an error, you have a dns problem that you need to fix with your dns registrar or hosting service.

If you do get an answer, it will probably look like 'mail.<yourdomain>.us' -- now check the address for that with nslookup mail.<yourdomain>.us 4.2.2.1.  If this doesn't return the wan ip for your sme, you have a dns problem...



This is what I got running these:
[root@linux ~]# nslookup -type=mx mydomain.us 4.2.2.1
Server:         4.2.2.1
Address:        4.2.2.1#53

Non-authoritative answer:
*** Can't find mydomain.us: No answer

Authoritative answers can be found from:
mydomain.us
        origin = ns12.zoneedit.com
        mail addr = soacontact.zoneedit.com
        serial = 1087274716
        refresh = 14400
        retry = 7200
        expire = 950400
        minimum = 7200

[root@linux ~]#


[root@linux ~]# tail -f /var/log/qpsmtpd/current
@40000000466c6de00e5624a4 3238 peers plugin: Compiling tnef2mime
@40000000466c6de00fb7663c 3238 peers plugin: Compiling queue/qmail-queue
@40000000466c6de00fcae66c 3238 peers hooking connect
@40000000466c6de00fdaad7c 3238 Listening on port 25
@40000000466c6de00fee7014 3238 Running as user qpsmtpd, group qpsmtpd
@40000000466c6de00ff6bd14 3238 Initializing spool_dir
@40000000466c6de00fff9a9c 3238 trying to get config for spool_dir
@40000000466c6de010993abc 3238 Permissions on spool_dir /var/spool/qpsmtpd/ are not 0700
@40000000466c6de010a35894 3238 trying to get config for size_threshold
@40000000466c6de010adf754 3238 size_threshold set to 0

and remains deaf after I send a message from Yahoo....

So I guess I might have a DNS error. I am using Comcast and Zoneedit. Nothing has changed there as far as I know, or maybe has. I can access my website from away, so the DNS must be working, or there is other problem that I do not know.

Stumped even more.
Title: Not receiving any mail!
Post by: pfloor on June 11, 2007, 12:31:24 AM
Quote from: "svetlo56"
[This is what I got running these:
[root@linux ~]# nslookup -type=mx mydomain.us 4.2.2.1
Server:         4.2.2.1
Address:        4.2.2.1#53

Non-authoritative answer:
*** Can't find mydomain.us: No answer

That pretty much tells you that you won't be able to receive email if the sender can't find the server.

Quote
I can access my website from away, so the DNS must be working...

Are you sure that you are not behind the server when you attempt this.  Also, if you are trying from a remote machine, are you sure the client isn't just using a cached dns record?

Have you looked at the dns record and made sure it matches your IP address and is set up properly?
Title: Not receiving any mail!
Post by: svetlo56 on June 11, 2007, 01:58:13 AM
Quote from: "mmccarn"
Mail uses MX records.  Browsing uses A records.

Watch your log files while you send yourself a message from off-site and tell us what happens.

Or don't.



mmccarn, you were right!!!!! Here's what i found on http://www.dnsreport.com/:
MX    FAIL   MX Category   ERROR: I couldn't find any MX records for mydomain.us. If you want to receive E-mail on this domain, you should have MX record(s). Without any MX records, mailservers should attempt to deliver mail to the A record for boskov.us. I can't continue in a case like this, so I'm assuming you don't receive mail on this domain.
Mail    FAIL   Connect to mail servers   ERROR: I could not find any mailservers for mydomain.us.

Everything else passes more or less.

Now what can I do to fix this MX stuff? Must it be something with Zoneedit?
Title: Not receiving any mail!
Post by: JonB on June 11, 2007, 12:53:34 PM
It should be noted that RFC 2821 does not require you to have a MX record to have mail delivered to your SMTP server.

- Once the domain is identified SMTP must perform a DNS lookup and first attempt to locate an MX record.
- If no MX records are found but an A record is found, it is treated as if it was associated with an implicit MX record with a preference of 0 pointing to that host - also known as the "implicit MX" rule.
- Further, if MX records are indeed found but mail delivery to these fails, the "implicit MX" rule to use the A record should not be used and the situation reported as an error, unless one of the the MX records actually points to the host in the A Record.
- Finally, if more than one MX records are found with same preference values, an SMTP sender should rotate between these.

So if you do not have a MX record but have a valid A record that points to an IP that has a SMTP server then mail should be delivered.

I would actually be starting with the real basics here first before worrying about MX records.

Can you access your mail server from the internet?

From any machine on the internet get into command prompt or command line and type

telnet your.domain.com 25

You should receive a response from your mail server

220 your.domain.com ESMTP

type quit to exit

If you do not get to your mail server then port 25 is blocked somewhere, either on a router that is before the SME server i.e not forwarded to the SME server or your ISP has decided to block incoming port 25 (not usual but some ISP's have been known to do it on residential broadband connections along with incoming port 80)

Once you have established that you can connect to your mail server on port 25 from outside your network then you should be getting mail and you can start looking at setting up MX records.

Jon
Title: Not receiving any mail!
Post by: mmccarn on June 11, 2007, 12:53:57 PM
Yes, from what you've shown us you'll need to create an MX record for your domain at zoneedit.

You may have another problem, though - Comcast blocks all traffic on port 25 for their 'residential' class subscribers.  If you fall into this category you will not be able to connect to your system from off-site on port 25.

You can test this (from off-site) using telnet a.b.c.d 25 where a.b.c.d is your SME's public IP address.  You *should* get something like this:
Code: [Select]
220 sme.mydomain.us ESMTP where "sme.mydomain.us"  will be replaced with whatever you have configured on your sme server.  (Type "quit" and press Enter to close this test connection).

If your ISP is blocking port 25 you will need to use either fetchmail or an email redirector; here's a link to a how-to: http://wiki.contribs.org/PortRedirect
Title: Not receiving any mail!
Post by: JonB on June 11, 2007, 01:00:17 PM
Snap  :lol: