delete mail via shell script
I have a cron job on a Solaris box that uses mailx to list the mail headers and checks for a specific email header. Then, it is supposed to delete that email. Does anyone know a way to delete an email via a shell script? I would prefer to avoid parsing the mail file in /var/spool and would prefer to use mailx or another email client to script this.
The Power of TCL
If you're familiar at all with TCL, Expect would be a good idea: http://expect.nist.gov/ From the webpage, "Expect is a tool for automating interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes this stuff trivial." I believe some languages, like Python, may also provide wrappers around Expect methods.
|All times are GMT -5. The time now is 06:56 AM.|