The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
segmnetation fault by pthread_mutex_unlock on a successfully locked mutex jonas.gabriel High Level Programming 2 04-18-2008 06:07 AM
Kudda has successfully solved the downloading problems for numerous video web angelstar UNIX and Linux Applications 0 04-10-2008 02:41 AM
how could I check whether ftp a file is successfully done or not rinku Shell Programming and Scripting 1 11-19-2007 10:34 PM
Where we can get the logs for a command execution successfully? susinthaa SUN Solaris 4 07-09-2007 09:35 PM
Successfully Installed Solaris 8 after all. abidmalik UNIX for Dummies Questions & Answers 0 12-17-2002 11:56 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-21-2006
Registered User
 

Join Date: Aug 2006
Posts: 54
Mail delivered successfully?

Hi
Is there any way I can know whether my mail has been delivered successfully or not....?
I am using a shellscript which configures the header and the message body and also includes configurations for attachments. I use 'sendmail' to send the mails....
I have to resend the failed emails after 24 hrs again to my client as a reminder...How do I get to know which emails bounced back ?? and How do I resend them again ?

Thanks
Amruta Pitkar
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 08-21-2006
Registered User
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 923
Quote:
Originally Posted by Amruta Pitkar
Hi
Is there any way I can know whether my mail has been delivered successfully or not....?
I am using a shellscript which configures the header and the message body and also includes configurations for attachments. I use 'sendmail' to send the mails....
I have to resend the failed emails after 24 hrs again to my client as a reminder...How do I get to know which emails bounced back ?? and How do I resend them again ?
When they bounce back, you get an email back saying it bounced.
Reply With Quote
  #3 (permalink)  
Old 08-21-2006
Moderator
 

Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,420
As Corona688 said, the only way is to poll the postmaster mailbox for bounce messages. As mail are sent from a queue and sent asynchronously, your script will only know that it is accepted for delivery by sendmail, that puts the mail into the queue, but it doesn't mean it can be sent. Worse still, if the recipient machine has problems, even though a mail has been received by the receiving server it may not actually deliver the message.
Reply With Quote
  #4 (permalink)  
Old 08-21-2006
Registered User
 

Join Date: Aug 2006
Posts: 54
Hi Guys

Thanks.....
But the bounced back email will be stored where? what location ?

Amruta.
Reply With Quote
  #5 (permalink)  
Old 08-21-2006
Moderator
 

Join Date: Sep 2002
Location: Hong Kong, China
Posts: 1,420
You may be able to find it in the mbox file /var/spool/mail/root. I will probably find a library to open the mailboxes if I am to do it, as I don't bother to write these all myself.

Actually, I think your task is just too complex to do by shell scripting. You may consider using a language with more libraries of this kind of libraries available, such as Perl, or Python.
Reply With Quote
  #6 (permalink)  
Old 08-21-2006
Registered User
 

Join Date: Aug 2006
Posts: 54
Thanks.....Again.

Amruta
Reply With Quote
  #7 (permalink)  
Old 08-22-2006
Registered User
 

Join Date: Nov 2002
Location: Singapore
Posts: 128
vi $HOME/.forward file as root user.
Add in your email address in the .forward file

You will get the bounced mail
Reply With Quote
Google UNIX.COM
Reply

Tags
sendmail

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:28 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0