Hi,
I need to create one KSH which will send mail to set of recipients using "mailx" command like below.
mailx -s "Test mail" "test@yahoo.com, test@gmail.com" <$output.txt
The recipients are in different domains (like yahoo, gmail, etc.).
My requirement is, if any mail is undelivered, then I need to re-direct that notification to admin user (email id).
Please let me know if it is possible to re-direct the undelivered mail notification to another mail id.
Thanks.
---------- Post updated 01-06-11 at 04:41 PM ---------- Previous update was 01-05-11 at 11:25 PM ----------
Found one workaround for this.
mailx -r "admin@domain.com" -s "Email subject" "test@yahoo.com" <Emailbody.txt
This will send the undelivered notification to admin@domain.com email address.
But the note here is, if the recipient email address is valid, then they will receive the email with sender as admin@domain.com.
Please suggest if there are any other workaround available.
Thanks.