Link to home
Start Free TrialLog in
Avatar of Srobinson08
Srobinson08

asked on

DNS Problem - Webserver not sending mail locally, using Google Mail instead

Hi Folks!

So im triyng to get php mail() working. (On a new webserver using virtualmin). Im not receiving any emails sent using the script and ubuntu's so i ran the below comand and as you can see its having problems connecting to google mail. (Were running this script on a server on our own network in a university.. There rather strict with there network so were assuming that port 25 outbound is restricted! Were waiting for a reply from them to confirm this and possible unblock it) [Mail is being sent to web@sinradio.co.uk)

sonar@radiosonar:~$ mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
DF20517C1C3      399 Wed Jan  6 22:37:53  www-data@radiosonar.solent.ac.uk
       (connect to ASPMX.L.GOOGLE.COM[209.85.219.58]:25: Connection timed out)
                                         web@sinradio.co.uk

-- 0 Kbytes in 1 Request.

I am however, trying to figure out why it is trying to connect to googles mail server to send mail when the DNS on the machine does not tell it too? See below the DNS..

Could this be my problem that it is trying to connect to google mail to send email? Or is this normal and ill have to try and get them to unblock it? :)

SONARTV.CO.UK DNS SERVER SETTINGS (That is all along with googles MX records)
Aliases:      Alias         Actual Domain Name
      sonartv.co.uk         radiosonar.solent.ac.uk
      *.sonartv.co.uk         radiosonar.solent.ac.uk
      mail.sonartv.co.uk         ghs.google.com
      www.sonartv.co.uk         radiosonar.solent.ac.uk

SONARTV.CO.UK LOCAL DNS SETTINGS

      Name       Type       TTL       Values
      sonartv.co.uk.       NS       Default       radiosonar.solent.ac.uk.
      sonartv.co.uk.       A       Default       192.168.2.35
      www.sonartv.co.uk.       A       Default       192.168.2.35
      ftp.sonartv.co.uk.       A       Default       192.168.2.35
      m.sonartv.co.uk.       A       Default       192.168.2.35
      localhost.sonartv.co.uk.       A       Default       127.0.0.1

      Name       Type       TTL       Values
      webmail.sonartv.co.uk.       A       Default       192.168.2.35
      admin.sonartv.co.uk.       A       Default       192.168.2.35
      mail.sonartv.co.uk.       A       Default       192.168.2.35
      sonartv.co.uk.       MX       Default       5 mail.sonartv.co.uk.
      sonartv.co.uk.       SPF       Default       v=spf1 a mx a:sonartv.co.uk ip4:192.168.2.35 ?a
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image


If the mail server is asked to send to sinradio.co.uk it will look up the MX record for that, then deliver according to the directions there.

Is the mail domain local to your network?

Chris
Avatar of Srobinson08
Srobinson08

ASKER

Thanks for the reply!

However im not sure why its trying to connect to google to send mail? sureley it should be sending mail locally if the local DNS records tell it that the mailserver is local?

They are unable to unblock port 25 but are able to offer me another port.

Another port is no good unfortunately.

The records you've shown me up there don't account for sinradio.co.uk, you should be able to see where that would go with:

nslookup -q=mx sinradio.co.uk

Chris
Ahh i see. Thanks! I may be in a bit of a pickle here then..
Ive sent a test email out to a few people and as you can see below it cannot connect because i cannnot get access through port 25.

Im using PHP Mail() which i assumed didnt using SMTP! Is there a way around this problem? :(

5F7D617C1E3      553 Thu Jan  7 18:33:57  www-data@radiosonar.solent.ac.uk
  (connect to ALT2.ASPMX.L.GOOGLE.COM[209.85.222.20]:25: Connection timed out)
                                         scott@srobinson.net

A8ED517C2C6      553 Thu Jan  7 18:33:57  www-data@radiosonar.solent.ac.uk
(delivery temporarily suspended: connect to mx4.hotmail.com[65.55.37.88]:25: Connection timed out)
                                         dan__90@hotmail.com

AD77217C2F6      558 Thu Jan  7 18:33:57  www-data@radiosonar.solent.ac.uk
          (connect to mx4.hotmail.com[65.54.188.110]:25: Connection timed out)
                                         lizadaisey@hotmail.co.uk

0BC7917C1CB      558 Thu Jan  7 18:33:57  www-data@radiosonar.solent.ac.uk
           (connect to mx3.hotmail.com[65.55.92.136]:25: Connection timed out)
                                         ayumusiclove@hotmail.com
ASKER CERTIFIED SOLUTION
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hmm that will be fun! Id like to know what they are aswell sometimes!

Thanks for the help. If all else fails ill send a nice POST to another webserver using HTTPS!
Thanks