Solved

SMTP not sending because of my domain address !

Posted on 2010-11-26
25
1,688 Views
Last Modified: 2012-05-10
OK..
I use Ubuntu Server 8.04 with mdadm controlling a RAID 1 setup, been running great for 3 years.. In my setup I use nullmailer as a simple relay only SMTP for any messages from mdadm in the event of any problems, it has worked superb in the past warning me of impending failures.. Now it appear it can no longer send messages to my ISP as I get failure messages as seen here
Failed to send mail : SMTP command mail from: <john@Amybeth> failed : 553 Amybeth.ispmail.ntl.com does not exist.

It appears as if the problem is (BUT I COULD CERTAINLY BE TOTALLY WRONG !!) with the domain name it is using, obviously Amybeth.ispmail.ntl.com does not exist as Amybeth is only the local name of my server.. I have no idea how to resolve this problem, help would be greatly appreciated !

Thanks
John
0
Comment
Question by:mrmad1966
  • 12
  • 11
  • +1
25 Comments
 
LVL 6

Expert Comment

by:fluk3d
Comment Utility
Server cannot resolve Amybeth.ispmail.ntl.com so in which case you would need to create a DNS entry/Host record entry on the machine so it can lookup that host

The hosts file is located under /etc/hosts so put an entry such as

1.1.1.1/private-ip-address of server      Amybeth.ispmail.ntl.com       Amybeth.ispmail.ntl.com

Once that is completed ping Amybeth.ispmail.ntl.com and ensure you have replies.
0
 
LVL 9

Expert Comment

by:Barry Gill
Comment Utility
that won't work.
The 553 error is coming from the ISP's mail servers.

you have 4 options.
1. create a DNS entry for the host.
2. ask your ISP to set an exception
3. masquerade (change the from domain - should  be the easiest)
4. set forced routing so that mail only gets delivered to YOUR server directly and does not go through the ISP
0
 
LVL 1

Author Comment

by:mrmad1966
Comment Utility
Thanks for the replies.. I think I should mention that when nullmailer was setup the first time ( when it all worked great !) I did not have to implement any of those tactics ! Essensially "it just worked" ..

HTH
J
0
 
LVL 9

Expert Comment

by:Barry Gill
Comment Utility
thats because the ISP has decided that they will not relay mail from people who have non existant domains. this is not uncommon. They end up with large blocks of mail in queues that cannot be bounced because the senders domain is not valid. Wastes their resource.
Not many will allow this these days and it is considered best practise anyways.
0
 
LVL 4

Expert Comment

by:AbhisekSanyal
Comment Utility
Hi,
   What the posters above said is the right way to solve the problem you are facing.

   However, there could be another way to solve this problem. (Try it and see if it works)
   I am basing this on your older post - http://www.experts-exchange.com/OS/Linux/Distributions/Ubuntu/Q_25121375.html
   
   Assuming you are still sending the alerts to your Gmail Id and your ISP does not block outgoing connections to port 465 (If the command "telnet smtp.gmail.com 465" works, then you are fine and can proceed.)
  Install a tool called "stunnel" in your Ubuntu Server.
  Configure the configuration file "stunnel.conf" (It should be in the /etc directory) and add the following entries

client = yes
debug = debug

[smtps]
accept = 127.0.0.1:465
connect = smtp.gmail.com:465

  Start the stunnel service on your Ubuntu Server.
 
  Update the configuration file "/etc/nullmailer/remotes" with the following entry
127.0.0.1 smtp --port=465 --user=yourgmailid@gmail.com --pass=yourgmailpassword

   Restart the Null Mailer Service.

Basically, in the above case Null Mailer is going to connect to the local Ubuntu Server on port 465 where the application "stunnel" is listening. Stunnel in turn will promptly forward the connection to smtp.gmail.com (port 465) over a SSL connection. Your Authentication details saved in Null Mailer Configuration will be provided to Gmail SMTP Server which will then proceed to accept your Email and send it to the To: Address as seen in the EMail being transmitted.

NOTE : Take backups before changing the existing configuration
NOTE : You may want to create a new Gmail Email Address just for this purpose (of relaying). It is not advisable to have your personal Gmail Address saved on a Linux Mail Server.
NOTE : You should also update the parameter MAILFROM in your mdadm.conf file and put a proper From Email Address (You can put your Gmail Address there as well, this should take care of any bounce Emails).
0
 
LVL 1

Author Comment

by:mrmad1966
Comment Utility
OK thank  you everyone.. not had a lot of time to try all suggestions but I am a little further forward.. By changing hostname & mailname  then the from address from john@amybeth to the servers new name amybeth.local i did send a successful test message from john@amybeth.local using Webmin but still nullmailer refused to send ... AGHH !
0
 
LVL 9

Expert Comment

by:Barry Gill
Comment Utility
amybeth.local is not a valid domain name.
Now if amybeth.com or server.amybeth.com was a real name then you should be fine.

If you choose to use stunnel as Abhisek has recommended, be sure to whitelist as these messages will end up in your gmail spam folder :)
0
 
LVL 1

Author Comment

by:mrmad1966
Comment Utility
I am aware that amybeth is not a valid domain name but it is an acceptable naming schema for networks that will NOT be connected directly to the public domain..

The purpose of changing the name was to see if i could determine if ntlworld.com's servers were 'blocking' (virginmedia) mail from non existant domains as per your post earlier your quoue:-

 "thats because the ISP has decided that they will not relay mail from people who have non existant domains"

Sending a test mesage sucessfully from webmin suggests to me that they are not blocking non existant domain relay messages..

Oh and just for clarification inside my /etc/nullmailer/remotes the username & password I am using is my ntlworld one so I think this is why it was passed through ! I am sending TO a gmail address not from one !!
0
 
LVL 9

Expert Comment

by:Barry Gill
Comment Utility
what do your logs say?
is null mailer the relay for your webmin too? or is that calling a sendmail binary to deliver?
0
 
LVL 1

Author Comment

by:mrmad1966
Comment Utility
To be honest it is the first time I have sent a message from the webmin console.. I do not think nullmailer is relaying these messages but how could I confirm that ?
0
 
LVL 9

Expert Comment

by:Barry Gill
Comment Utility
I would check the logs.
tail -f /var/log/maillog
or tail -f /var/log/messages

and send mail, you will see what process is reporting the logs.

Also have a look at nullmailer-inject, it will allow you to change the format of the messages you are sending...
http://manpages.ubuntu.com/manpages/lucid/man1/nullmailer-inject.1.html
0
 
LVL 1

Author Comment

by:mrmad1966
Comment Utility
Thank you..hopefully get a look at all this tomorrow !
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 1

Author Comment

by:mrmad1966
Comment Utility
Just a sample of the latest messages in my mail log !


Nov 29 14:48:50 amybeth nullmailer[4538]: Starting delivery: protocol: smtp host: ntlworld.com file: 1290332481.12636
Nov 29 14:51:59 amybeth nullmailer[4538]: Sending process crashed or was killed.
Nov 29 14:51:59 amybeth nullmailer[4538]: Starting delivery: protocol: smtp host: ntlworld.com file: 1290308541.8656
Nov 29 14:55:08 amybeth nullmailer[4538]: Sending process crashed or was killed.
Nov 29 14:55:08 amybeth nullmailer[4538]: Starting delivery: protocol: smtp host: ntlworld.com file: 1290270681.1832
Nov 29 14:58:17 amybeth nullmailer[4538]: Sending process crashed or was killed.
Nov 29 14:58:17 amybeth nullmailer[4538]: Starting delivery: protocol: smtp host: ntlworld.com file: 1290296242.6853
Nov 29 15:01:26 amybeth nullmailer[4538]: Sending process crashed or was killed.
Nov 29 15:01:26 amybeth nullmailer[4538]: Starting delivery: protocol: smtp host: ntlworld.com file: 1290257422.32220
Nov 29 15:04:35 amybeth nullmailer[4538]: Sending process crashed or was killed.
Nov 29 15:04:35 amybeth nullmailer[4538]: Starting delivery: protocol: smtp host: ntlworld.com file: 1290145282.27384
Nov 29 15:07:44 amybeth nullmailer[4538]: Sending process crashed or was killed.
Nov 29 15:07:44 amybeth nullmailer[4538]: Starting delivery: protocol: smtp host: ntlworld.com file: 1290483441.7900
Nov 29 15:10:53 amybeth nullmailer[4538]: Sending process crashed or was killed.
Nov 29 15:10:53 amybeth nullmailer[4538]: Starting delivery: protocol: smtp host: ntlworld.com file: 1290059121.21319
Nov 29 15:14:02 amybeth nullmailer[4538]: Sending process crashed or was killed.
Nov 29 15:14:02 amybeth nullmailer[4538]: Starting delivery: protocol: smtp host: ntlworld.com file: 1290326182.11706
0
 
LVL 9

Expert Comment

by:Barry Gill
Comment Utility
looks liek you are suffering from a nullmailer bug
kill your nullmailer process and restart it
kill -9 4538
0
 
LVL 9

Expert Comment

by:Barry Gill
Comment Utility
have you updated any of your packages?
It looks like most of these bugs got fixed about a year ago (some about 2 years ago) yet you say it has been running for 3 years?
0
 
LVL 1

Author Comment

by:mrmad1966
Comment Utility
I had updated yes... I have just ran another webmail email test and this time it failed so I have now ran sudo apt-get remove sendmail and the reply said that sendmail was not installed ! Should I some how remove all existing config files for any previous sendmail/nullmailer installs ? If so what would be the command ?
Thanks for sticking with me
0
 
LVL 9

Expert Comment

by:Barry Gill
Comment Utility
you may find that postfix is installed as part of the ubuntu default and not sendmail.
have you tried updating nullmailer?
did you try killing the nullmailer process as I mentioned?
0
 
LVL 1

Author Comment

by:mrmad1966
Comment Utility
Yes I killed the process...  no postfix installed either so I have just removed then reinstalled nullmailer but still no luck I think I may need to try another simple relay package
0
 
LVL 9

Expert Comment

by:Barry Gill
Comment Utility
postfix.
english language conf file, VERY easy to understand, VERY easy to lock down.
just edit the main.cf file - it is a breeze
0
 
LVL 1

Author Comment

by:mrmad1966
Comment Utility
I have remove all known email progs.. sendmail, postfix, nullmailer, exim4 the intention it try to start from scratch..
Webmin still sends email fine when I use my email address supplied by ntlworld, do you know what program is responsible for sending webmins emails ?
Thanks
0
 
LVL 9

Expert Comment

by:Barry Gill
Comment Utility
it is most likely using a binary.
it should be using the default system mailer, but is configurable.
It may also be using phpmailer...
Again, search the logs...
0
 
LVL 9

Expert Comment

by:Barry Gill
Comment Utility
oh, your system *SHOULD* have an MTA onboard to facilitate all sorts of stuff.
Install postfix, it is quick easy and simple to setup
0
 
LVL 1

Accepted Solution

by:
mrmad1966 earned 0 total points
Comment Utility
Folks.. Seems all solved, I ended up removing ALL mail programs & decided I needed JUST a simple MTA hence sendmail, postfix all to much for my needs, so I choose ssmtp same errors were occuring BUT once I changed the permission on the config file all worked fine so I removed ssmtp installed nullmailler tested again with correct permissions on file & life is good !!

Wish I could award points to everyone who helped but sadly the cause (file permissions) were not suggested !
Thanks Again
0
 
LVL 9

Expert Comment

by:Barry Gill
Comment Utility
glad it is fixed
0
 
LVL 1

Author Closing Comment

by:mrmad1966
Comment Utility
Sadly I sorted this myself !
0

Featured Post

Are end users causing IT problems again?

You’ve taken the time to design and update all your end user’s email signatures, only to find out they’re messing up the HTML, changing the font and ruining the imagery. What can you do to prevent this? Find out how you can save your signatures from end users today.

Join & Write a Comment

Resolve DNS query failed errors for Exchange
Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now