LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 11-28-2003, 08:12 AM   #1
JM_Fraser
Newbie
 
Registered: Nov 2003
Location: London, UK
Distribution: RH
Posts: 24

Rep: Reputation: 15
Cool mx records, postfix


I have set up my MX records with my isp but my mail is not being delivered to my server. For smtp, do I just point my mail client to the server running postfix or do I have to put in the external smtp server name.

Also, am I correct in saying that where "relayhost" is defined in main.cf, this points also to my extenal smtp server?
 
Old 11-28-2003, 01:47 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
relayhost should be used it you want to use another server to relay your mail when you dont; want to deliver it yourself.

What error do you get when you send e-mail to your domain?
 
Old 11-28-2003, 03:41 PM   #3
JM_Fraser
Newbie
 
Registered: Nov 2003
Location: London, UK
Distribution: RH
Posts: 24

Original Poster
Rep: Reputation: 15
When I use a webmail client to send my mail back to my domain and the new server, it still sits on the ISP's server! I have set up my "class A records/zone" with them and so all stuff sent to my domain gets pushed to my server. Also, mail that I send out via my server, if I do not specify my external smtp server as relayhost, it just goes out into the Ether; unless you can advise of some Q where it will be sitting.
 
Old 11-28-2003, 03:50 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
What is the domain name?
 
Old 11-28-2003, 08:33 PM   #5
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
It sounds like either the MX record is misconfigured, or your ISP does not allow inbound connections to port 25 (other than to their own mail servers). Also, do you have a firewall running on or in front of your mail server? If so, have you opened port 25/tcp for outside connections?

Please post your domain name and I could tell you what the problem is in a few minutes.
 
Old 11-29-2003, 03:01 PM   #6
jules_fraser
Member
 
Registered: Nov 2003
Location: London, UK
Distribution: Gentoo, RH (and, yes: M$2k)
Posts: 77

Rep: Reputation: 15
mx records, postfix

The domain name is: cybertrex.co.uk. The msg below is what I get when I send stuff externally to the server:

Message from yahoo.com.
Unable to deliver message to the following address(es).

<jules@cybertrex.co.uk>:
216.200.145.38 does not like recipient.
Remote host said: 550 <jules@cybertrex.co.uk>: Recipient address
rejected: This user does not have an account here (MTA:imta32)
Giving up on 216.200.145.38.

--- Original message follows.

Return-Path: <mitchellstudd@yahoo.com>
Message-ID: <20031129205815.94022.qmail@web41503.mail.yahoo.com>
Received: from [212.104.155.248] by web41503.mail.yahoo.com via HTTP;
Sat, 29 Nov 2003 20:58:15 GMT
Date: Sat, 29 Nov 2003 20:58:15 +0000 (GMT)
From: =?iso-8859-1?q?Mitchell?= <mitchellstudd@yahoo.com>
Subject: sat
To: jules@cybertrex.co.uk
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit



Any ideas?
 
Old 11-29-2003, 03:11 PM   #7
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
I'm taking a guess but I think your MX record is pointing to the wrong server - it seems to point directly to an easyspace server.
 
Old 11-29-2003, 03:19 PM   #8
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
Well it appears that you have multiple different problems. For starts, your MX record is not pointed at your own machine. Observe below...

Locate the authoritative DNS server:
Code:
-bash-2.05b$ dig cybertrex.co.uk ns

; <<>> DiG 9.2.3 <<>> cybertrex.co.uk ns
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1603
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; QUESTION SECTION:
;cybertrex.co.uk.               IN      NS

;; ANSWER SECTION:
cybertrex.co.uk.        172446  IN      NS      ns3.easypost.com.
cybertrex.co.uk.        172446  IN      NS      ns1.easypost.com.

;; ADDITIONAL SECTION:
ns3.easypost.com.       21256   IN      A       216.167.71.24

;; Query time: 2 msec
;; SERVER: 10.8.1.3#53(10.8.1.3)
;; WHEN: Sat Nov 29 13:09:03 2003
;; MSG SIZE  rcvd: 97
Now that we have authoritative DNS, ask it about cybertrex.co.uk:
Code:
-bash-2.05b$ dig @ns3.easypost.com cybertrex.co.uk any

; <<>> DiG 9.2.3 <<>> @ns3.easypost.com cybertrex.co.uk any
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27718
;; flags: qr aa rd; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;cybertrex.co.uk.               IN      ANY

;; ANSWER SECTION:
cybertrex.co.uk.        3600    IN      SOA     ns1.easypost.com. hostmaster.easyspace.com. 2003112979 10800 3600 3600000 3600
cybertrex.co.uk.        3600    IN      MX      5 ismtp.easyspace.everyone.net.
cybertrex.co.uk.        3600    IN      NS      ns1.easypost.com.
cybertrex.co.uk.        3600    IN      NS      ns3.easypost.com.
cybertrex.co.uk.        3600    IN      A       212.104.155.248

;; Query time: 97 msec
;; SERVER: 216.167.71.24#53(ns3.easypost.com)
;; WHEN: Sat Nov 29 13:09:15 2003
;; MSG SIZE  rcvd: 198
OK, now we see that the MX record (Mail eXchanger, i.e. where all inbound mail goes) is pointed at ismtp.easyspace.everyone.net. Sensibly enough, that server only accepts mail for accounts that it is configured to host (cybertrex.co.uk is not one of them). I assume you mean for your MX record to be pointed at your own machine, so you need to get your DNS changed to remove ismtp.easyspace.everyone.net and replace it with cybertrex.co.uk (you could also create another host in your DNS, such as mail.cybertrex.co.uk and point that host at 212.104.155.248, then set your MX to mail.cybertrex.co.uk, just to be less confusing).

After making those changes, your DNS might look something like this:
Code:
cybertrex.co.uk.        3600    IN      SOA     ns1.easypost.com. hostmaster.easyspace.com. 2003112979 10800 3600 3600000 3600
cybertrex.co.uk.        3600    IN      MX      5 mail.cybertrex.co.uk.
cybertrex.co.uk.        3600    IN      NS      ns1.easypost.com.
cybertrex.co.uk.        3600    IN      NS      ns3.easypost.com.
cybertrex.co.uk.        3600    IN      A       212.104.155.248
mail.cybertrex.co.uk.   3600    IN      A       212.104.155.248
NOTE: mail.cybertrex.co.uk would not show up in the query I did. You would need to do dig @ns3.easypost.com mail.cybertrex.co.uk in order to see it.

OK, so that is why incoming mail is not going to you. Let's see if we could actually send mail to you if your DNS was right. I tried telnet'ing to 212.104.155.248 on port 25 and I got the following banner: 220 frodo.cybertrex.co.uk ESMTP Postfix, which seems correct. However, if I tried to initiate the SMTP session with an EHLO command, the connection was closed by your server. If I tried HELO instead of EHLO, I was able to get as far as RCPT TO: when the connection was again closed by your server. Additionally, some times the connection would just hang indefinitely before displaying the SMTP banner. Do you have some kind of IPS (Intrusion Prevention System), like Port Sentry? Do you have spamd or some similar type of system running? It seems that your server is being unusually hostile to incoming SMTP connections.

Last edited by chort; 11-29-2003 at 03:24 PM.
 
Old 11-29-2003, 04:06 PM   #9
jules_fraser
Member
 
Registered: Nov 2003
Location: London, UK
Distribution: Gentoo, RH (and, yes: M$2k)
Posts: 77

Rep: Reputation: 15
I don't know about any Intrusion Prevention system but I have got a firewall on my router which rejects ping requests. Perhaps I should disbale the firewall on the server for the moment until this gets sorted out.

When you say "create another host in your DNS, such as mail.cybertrex.co.uk" do you mean set up another index in my router or with my ISP? Either can be done, just that I thought the ISP was already sorted.

As so far as the ISP index is concerned, I list the following:

name: cybertrex.co.uk
type: A
priority: "not listed"
point to addr: 212.104.155.248

I thought this was correct....

Am very impressed by your thorough answer and assistance. Much appreciated.
 
Old 11-29-2003, 04:18 PM   #10
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
To receive mail you will need to create an MX record with your dns provider that points to an existing A record that resolves to the IP of your machine.
 
Old 11-29-2003, 04:23 PM   #11
jules_fraser
Member
 
Registered: Nov 2003
Location: London, UK
Distribution: Gentoo, RH (and, yes: M$2k)
Posts: 77

Rep: Reputation: 15
OK. My adsl line/dns provider is eclipse.co.uk.but easyspace.com provided my domain name. I have already setup my MX records with easyspace, do I now have to go to eclipse.co.uk and ask them to point to the A record of easyspace?
 
Old 11-29-2003, 04:35 PM   #12
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
No, your DNS needs to be setup with easyspace. Right now they do have an MX record setup (please review my post above) but it's not pointed to the correct host. You do already have an A record for your domain name, you also have an A record for www.cybertrex.co.uk, and I just discovered you have a CNAME for mail.cybertrex.co.uk which again points to easyspace (similar to the MX record).

In order to receive mail to your own server, your MX record needs to point to yourself. Now, you could set it up like this (using existing hostnames):
cybertrex.co.uk. IN MX 5 cybertrex.co.uk.

Or you could create a new A record in DNS to use:
inbound.cybertrex.co.uk. IN A 212.104.155.248
cybertrex.co.uk. IN MX 5 inbound.cybertrex.co.uk.

Either way, you need to have your DNS changed with your hosting provider. By the way, your www.cybertrex.co.uk A record points to your hosting provider. I don't know if this is what you intended or not.

The short story is your DNS is not setup correctly. You may find it beneficial to do some Googling on DNS basics.
 
Old 11-29-2003, 06:08 PM   #13
Robert0380
Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
just to try to put it in simple terms:

with your current setup, if i email you, it goes to a machine called:

ismtp.easyspace.everyone.net

when it needs to go to:

cybertrex.co.uk

your ISP is not in this loop right now and you shouldnt even think of them right now.
you have to fix that MX record 1st, then if your mail doesnt get to your box, either you have to config postfix correctly, or you have to see if you ISP blocks incomming on port 25.

Last edited by Robert0380; 11-29-2003 at 06:09 PM.
 
Old 11-29-2003, 06:12 PM   #14
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Quote:
Originally posted by Robert0380
your ISP is not in this loop right now and you shouldnt even think of them right now.
you have to fix that MX record 1st, then if your mail doesnt get to your box, either you have to config postfix correctly, or you have to see if you ISP blocks incomming on port 25.
Port 25 seems ok (see above) I think he just needs his MX record changed.
 
Old 11-29-2003, 10:24 PM   #15
jules_fraser
Member
 
Registered: Nov 2003
Location: London, UK
Distribution: Gentoo, RH (and, yes: M$2k)
Posts: 77

Rep: Reputation: 15
Sure, I understand. I have already emailed my ISP to query as to why this MX record has not been setup correctly. But it may be a few days before I here anything back. Thanks for your great efforts, all of you. Will advise just as soon as I get more info. Jules
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Concept behind MX records wwnexc Linux - Networking 7 10-27-2005 09:28 PM
DNS and MX Records... jademan83 Linux - Networking 1 07-09-2005 11:02 AM
Old DNS records Matir Linux - Networking 2 02-11-2005 12:44 PM
nat records alaios Linux - Networking 2 06-09-2004 02:20 AM
MX Records Terri Linux - Networking 2 01-21-2002 07:06 AM


All times are GMT -5. The time now is 11:22 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration