LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 12-09-2005, 04:28 PM   #1
kevin_obtiva
LQ Newbie
 
Registered: Dec 2005
Posts: 1

Rep: Reputation: 0
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.

TIA.
--Kevin Taylor
 
Old 12-10-2005, 10:24 AM   #2
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 41
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Script to delete mail based on date gquiring Linux - General 8 05-08-2013 10:24 AM
Shell Script to Delete line if pattern exists topcat Programming 22 08-23-2011 05:58 AM
unix shell script:How to delete the first line in a file?? rche3252 Programming 6 03-03-2010 08:32 AM
How to delete a line from a text file with shell script programming Bassam General 1 01-28-2004 09:51 PM
Script to Delete Old Mbox Mail granatica Linux - Software 2 10-06-2003 11:01 AM


All times are GMT -5. The time now is 10:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration