Storing a log file of delivered mails


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Storing a log file of delivered mails
# 1  
Old 06-25-2010
Storing a log file of delivered mails

Hi,

I have a program which creates some report and sends it to the users. There are around 15000 users . I guess because of this huge number the mail exchange server is unable to deliver all the mails. So i want to create a log to see who are all the user to whom the report was delivered. I am sending the report through mailx command.

Any help is appreciated.

Thanks & Regards,
Goura Nagendra
# 2  
Old 06-25-2010
put the mailx command in a for loop and in the loop use a if condition checking the exist status. something like below :-

Code:
for reci in RECIPIENT_LIST  (where its taking it)
do 
mailx -f " " -s" " " " 
if [[ $? -eq 1 ]] 
then 
echo "the mailx fail to deliver mail  $reci"
eco reci >> not_delivered_list
fi
done

# 3  
Old 06-25-2010
Hi,

Thanks for the suggestion but i dont think mailx does work in that way. Mailx will simply send the mail and return code will be always. Mailx doesnt wait for the mail to be delivered and then exits the command.

Nagendra
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Mail not getting delivered

Hi I seem to have a problem in my solaris 10server, when I type mailx the following pop up: mailx mailx version 5.0 Type ? for help. "/var/mail//moneta": 109 messages 1 new 109 unread U100 Mail Delivery Subs Thu Sep 17 04:34 133/5631 Warning: could not send m U101 moneta ... (2 Replies)
Discussion started by: fretagi
2 Replies

2. Shell Programming and Scripting

How to inform the target that a file was delivered to the FTP directory?

Hi, I have a FTP server and a directory location where i will be FTPing the flat file. My requirement is After the flat file was generated to the location, i need to write some trigger file or something to inform them that the file was delivered to them. Please let me know how i can do... (2 Replies)
Discussion started by: srikanth_sagi
2 Replies

3. UNIX for Advanced & Expert Users

Mail not getting delivered to user

Hi, There is a unix box in production from which mails will be sent to user/group. From this box, many mails will be sent. But only for one mail which is sent from the box, it is showing a message like "Deferred: 421 Microsoft ESMTP MAIL Service, Version: 6.0.3790.4675 ready at Service not... (2 Replies)
Discussion started by: trichyselva
2 Replies

4. UNIX for Dummies Questions & Answers

How to redirect all mails to text file?

Hi, I need to develop one application that reads all my mails (in unix mail box), and write into one txt file, My server is AIX .My mails are in AIX mail box. Any idea? (0 Replies)
Discussion started by: redlotus72
0 Replies

5. UNIX for Dummies Questions & Answers

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... (7 Replies)
Discussion started by: Amruta Pitkar
7 Replies

6. UNIX for Dummies Questions & Answers

how can i recd error log on my sent mails?

I am using the following command to send mail which comprises of a message body (mail_msgbody.txt), Subject(rtf attachment) and a RTF attachment. uuencode ${FILE_NAME} ${FILE_NAME} >> mail_msgbody.txt mailx -s"rtf attachement" aaa@yahoo.com < mail_msgbody.txt When I send mail ...how can I... (0 Replies)
Discussion started by: Amruta Pitkar
0 Replies

7. UNIX for Dummies Questions & Answers

Parse Text file and send mails

Please help. I have a text file which looks something like this aaa@abc.com, c:FilePath\Eaaa.txt bbb@abc.com, c:FilePath\Ebbb.txt ccc@abc.com, c:FilePath\Eccc.txt ddd@abc.com, c:FilePath\Eddd.txt...so on I want to write a shell script which will pick up the first field 'aaa@abc.com' and... (12 Replies)
Discussion started by: Amruta Pitkar
12 Replies

8. Shell Programming and Scripting

How to attach an excel file/ dat file thru unix mails

Hi. I want to attach a .xls or .dat file while sending mail thru unix. I have come across diff attachments sending options, but allthose embeds the content in the mail. I want the attachement to be send as such. Please help me out. regards Diwakar (1 Reply)
Discussion started by: diwakar82
1 Replies

9. Shell Programming and Scripting

how to request a "read" or "delivered" receipt for mails

Dears, I've written a script which allows me to send mails in different formats with different attaches. Now I still want to add a feature to this script. My users would like to be able to receive a "read" or "delivered" receipt for their mails. The script send mails on behalve of an specific... (1 Reply)
Discussion started by: plelie2
1 Replies
Login or Register to Ask a Question