Problem with sendmail


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Problem with sendmail
# 1  
Old 03-06-2013
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.
Code:
#(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 pleaseSmilie

Last edited by vbe; 03-06-2013 at 05:30 AM.. Reason: Code tags!!!
# 2  
Old 03-06-2013
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
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

Sendmail problem

Hi experts, I am facing unique issue while sending mails from HP-UX box. Mails are not delivered to mail addresses outside my company domain. For e.g. echo "hi" |mailx -s "test" myemail@mycomapny.com is working fine and delivering mails to my company mail address. but If... (7 Replies)
Discussion started by: sai_2507
7 Replies

2. AIX

Problem with sendmail

Hi there, I have configured sendmail in AIX 6.1 and able to send emails to most of the domains like yahoo and gmail. But certain domains are denying to verify my domain probably due to the masquarding not happening correctly. Following are some logs of sendmail command.... (9 Replies)
Discussion started by: sraj142
9 Replies

3. Solaris

sendmail problem

Hi, when i am trying to send more than 50000 emails by using solaris sendmail utility, server is getting hanged up, needs to restart it once again. but it is sending nearly 20000 emails with out any issues. So what the configuration changes i need to make for the solaris sendmail utility to... (0 Replies)
Discussion started by: anilmanepu
0 Replies

4. Linux

Sendmail problem

I am trying to send mail from my CentOS server. I have made nacessory changes required from sendmail. But it is not working. I am getting following messages in maillog- Dec 17 09:25:12 localhost sendmail: mBH3tCTi016891: fps.company.com did not issue MAIL/EXPN/VRFY/ETRN during... (1 Reply)
Discussion started by: kailas.awchar
1 Replies

5. AIX

sendmail problem

I get the following error while trying to send mail from my AIX box. I have cross checked the sendmail.cf file of this system with a working system (similar h/w and o/s) and found no difference. can somebody sugget?? /etc/sendmail.cf: line 98: readcf: map arith: class arith is not available... (1 Reply)
Discussion started by: gsabarinath
1 Replies

6. UNIX for Dummies Questions & Answers

sendmail problem

I have a user who's email comes out looking like this: From name@domain.com Wed Aug 6 15:36:39 2008 Return-Path: <name@domain.com> X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on it2 X-Spam-Level: * X-Spam-Status: No, score=1.5 required=5.0 tests=AWL,BAYES_20,MISSING_SUBJECT,... (1 Reply)
Discussion started by: photon
1 Replies

7. Red Hat

sendmail problem

Hi everyone... i'm trying to send mail with attachment using /usr/sbin/sendmail and from some reason it's not working for me only from one computer. the command i'm using is: cat /etc/fstab | /usr/sbin/sendmail -t RECIPIENT@MAIL.COM am i doing something wrong? p.s. the OS is RedHat. (6 Replies)
Discussion started by: eliraza6
6 Replies

8. UNIX for Dummies Questions & Answers

Problem with Sendmail

Hi all, I am new to this forums, so please be kind to me :) Anyways, I have this problem when I am trying to send out email using sendmail. I can send an email to gmail.com or other email host, but when I am trying to send an email to email address removed by moderator or anything to the... (2 Replies)
Discussion started by: iluvhk
2 Replies

9. UNIX for Advanced & Expert Users

sendmail problem

Hi, I have some problem with sendmail daemon. Earlier it was working fine as I used to get alert mail through crontab jobs. Two days back it stopped sending alert messages. When I executed mail command from shell prompt, I could read all the pending messages, generated through crontab... (1 Reply)
Discussion started by: amit_sapre
1 Replies

10. UNIX for Dummies Questions & Answers

problem with sendmail, help please!

I run UNIX and PHP I use a forum (ibf) and the mail() function from PHP only allows emails to be sent to an email account that is on my server, so IT doesn't send any emails for example to eden@hotmail.com How can I fix this? I have to edit php.ini???' Please help me Thanks. (3 Replies)
Discussion started by: eden2
3 Replies
Login or Register to Ask a Question