Need to get return code from mutt if an address is invalid/undeliverable from Unix shell script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need to get return code from mutt if an address is invalid/undeliverable from Unix shell script
# 1  
Old 12-28-2011
Question Need to get return code from mutt if an address is invalid/undeliverable from Unix shell script

I am using mutt on ksh Unix to send emails to addresses plucked from the database. If the "To:" email address is not longer valid and so the email is not sent to the "To:" recipient, but is sent to the valid cc address, I need to be able to get an error code returned to the shell script so that the CC recipient is aware that the "To" user did NOT get the email.. Is this possible? If so, how would I do it?

Thanks!!
Jenifer Smilie
# 2  
Old 12-28-2011
That's the thing. mutt doesn't know if an address is undeliverable. Email doesn't work that way. If there's something wrong with an email, or a mailbox is full or something, you get a bounce message later. Potentially much much later. Something along the chain somewhere might get it into its head to retry for hours or days until it's sure the destination's really dead.
# 3  
Old 12-28-2011
Is there any way to do a lookup in email directory?

---------- Post updated at 01:27 PM ---------- Previous update was at 01:27 PM ----------

Also, I am aliasing the From address so I will not know if it bounced.
# 4  
Old 12-28-2011
Quote:
Originally Posted by jzuber
Is there any way to do a lookup in email directory?
If you had an open directory of valid email addresses, you could sell it to spammers for a fair chunk of cash.

So no.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Email shell script return code

Hi All, I'm new to unix and I have a requirement to execute a shell script and get the return code/Exit code and send it in email. Meaninig we execute a script which in turn execute a shel script and fetches it\s return code and send it to email. I tried the code below as : ... (2 Replies)
Discussion started by: midhun3108
2 Replies

2. Shell Programming and Scripting

Return Code to shell script

Hi, I need to send the return code from a script to the parent shell script. But i am suppressing outputs while calling the child script. Is there any way still to get the return code from the child script with suppress output. Below is my script: I am using :$ while calling return.sh... (5 Replies)
Discussion started by: usrrenny
5 Replies

3. AIX

Mutt from address and hostname

Mutt 1.2.3.1i AIX 5.3.12.1 We need to send email to external addresses. But are having problems with the sent-from hostname. They're going out with @server.mycompany.com. We need them to be @mycompany.com. I'm setting from and hostname with -e 'set from="From... (1 Reply)
Discussion started by: Papa Lee
1 Replies

4. Shell Programming and Scripting

How to exit a shell script if a unix command does not return any value for 10 seconds?

Hi, Can anyone help me how to exit a shell script if a unix command inside does not return any value for 10 seconds? The scenarios is like this. I want to login to a application using shell script where the connection string is mentioned.but suppose this connection string is not... (10 Replies)
Discussion started by: arijitsaha
10 Replies

5. Shell Programming and Scripting

Writing a UNIX script from LOG to provide return code.

Folks - Firstly, I do apologize that my first post here is a question. I am quite familiar with UNIX since our application is running on it. We are trying to automate a few things on our end and I am challenged with a task in hand that requires UNIX scripting. I am totally a newbie in UNIX... (4 Replies)
Discussion started by: sk72
4 Replies

6. Shell Programming and Scripting

how to store the return values of stored procedure in unix shell script.

hi i am calling a oracle stored procedure(in the database) from unix shell scripting (a.sh). the called stored procedure returns some values through OUT variables i want to assign the return values of stored procedure in to unix shell script variable. can you provide me the code. ... (1 Reply)
Discussion started by: barani75
1 Replies

7. HP-UX

return code from oracle to unix script

Hi I'm writing a shell script that connects to oracle database and fires query to check the availability of data in a table. In case of no data found then what will be the return code and how to handle in that in variable. Kindly provide with an example for better understanding... Thanks... (1 Reply)
Discussion started by: ksailesh
1 Replies

8. Shell Programming and Scripting

Need to return fail or pass from shell script on the basis of pl/sql code execution

Hi guys, I am quite new in shell scripting. I am tring to promote some oracle jobs into control-M. In control-M, I am calling a script which establishes a connection with database and execute some procedures. Now I want if that PL/sql Block got failed script should return failure to... (2 Replies)
Discussion started by: alok1301
2 Replies

9. Shell Programming and Scripting

Capture Oracle return code in shell script

I am using the following code in my shell script list=`sqlplus -s $user/$pwd@$dbms<<EOF WHENEVER SQLERROR EXIT SQL.SQLCODE set pagesize 0 feedback off verify off heading off echo off select * from control_tbl where src_nm=$3 and extrct_nm=$4; exit SQL.SQLCODE; EOF` ERROR=$?... (1 Reply)
Discussion started by: Vikas Sood
1 Replies

10. Shell Programming and Scripting

Store return code of shell script in oracle table

Hi friends, I have to do the following things : 1) there should be a shell script returning the returning the return code of the script. and i have to add some more details like on which machine is has run , at what time and other details and then using plsql i have to add a row to Oracle... (3 Replies)
Discussion started by: sveera
3 Replies
Login or Register to Ask a Question