Problem with sendmail

Hi,

I have written a sendmail command to mail two HTML files to users. But the command is executing without any errors but it is not sending any mails.

Below is the code snippets.

#(cat <<HERE; cat final.html; cat final1.html) | /usr/sbin/sendmail -oi -t
#From: abc <abc@abc1.com>
#To: abc@abc.com
#Subject: Some file
#Content-Type: text/html; charset=us-ascii
#Content-Transfer-Encoding: 7bit
#MIME-Version: 1.0

#HERE

Can anyone please suggest anything?

Thanks

---------- Post updated at 12:53 PM ---------- Previous update was at 12:20 PM ----------

any suggestions please:confused:

Assuming that the mail tool that users have is not on the unix server, have you got anything in the outgoing mail queue? Many servers have a mailq command to display this.

There are a few configuration things to check:-

  1. Have you defined an onward mail server or relay host?
  2. Can you resolve the name of the mail server?
  3. Can you open the SMTP port to the mail server?
  4. Is there any filtering done further down the line?

Let us consider each in turn.

  1. Have you defined an onward mail server or relay host?
    If you can find your sendmail configuration file (probably sendmail.cf in or under /etc or /etc/sendmail) is there a line that reads DSrelay_server.mycompany.com? You use this to define the next mail server to be able to direct this towards users. There is probably a commented line to remove the leading hash from. There is no space after the DS before you declare your relay server.

  2. Can you resolve the name of the mail server?
    Simply, can you lookup the mail server name you have declared. Use nslookup or host

  3. Can you open the SMTP port to the mail server?
    If you type telnet relay_server.mycompany.com 25 do you get a response? You may need to press ENTER again. After a few seconds, perhaps the command helo will return you an OK response. Type quit to get out again.

  4. Is there any filtering done further down the line?
    Well, if you have got this far, then you can be happy that you are sending the main out from your server. You need to then use whatever mail tracing tools there are on the defined mail server.

I know that this is different on Linux as I'm fighting with RHEL6 at the moment trying to work out what/where to set things up. If i find out, I will post again, but in the meantime, I hope that this helps.

Robin
Liverpool/Blackburn
UK