Sponsored Content
Top Forums Shell Programming and Scripting Delete all mails using mailx or mail Post 302095382 by ninjanesto on Monday 6th of November 2006 02:20:51 PM
Old 11-06-2006
Delete all mails using mailx or mail

Hi , ?im a newbie using shell scripts.
Is there any way to write a script that will delete all mails from my mailbox using mail or mailx command

Thanks for your time

E. Festas
 

10 More Discussions You Might Find Interesting

1. Solaris

how to send mails to users on exchange server from sendmail/solaris(mailx)

Hi, Can anyone pls. tell me how to access Active directory from solaris. I am looking at solution by which I can send mail notification from the logs generated by scripts, to the users on Exchange server. I am trying for a Perl-LDAP module , but don't realy know how to go for it (5 Replies)
Discussion started by: ganeshh
5 Replies

2. UNIX for Dummies Questions & Answers

Does Mailx store the mails sent

Hi, I use mailx in a shell script to mail a message to the users. i wanted to know if mailx stores the mail that it sends? for eg in microsoft outlook all mails sent get stored in the outbox. is there such a facility with mailx? if not how i can do this so that for every mail sent, a backup... (6 Replies)
Discussion started by: munira_johar
6 Replies

3. Shell Programming and Scripting

Script to delete all mail in mailx

Hello all, Can some help me write a small script that when executed will delete all mail in mailx? I am having issues where /var is getting full often due to a lot of mail being stored, I would like to run a script on cron which would delete mail every 2 days, any help is much appreciated. (1 Reply)
Discussion started by: sqloyd
1 Replies

4. Debian

cannot send any mails using mailx

hi howto configure mailx ? kind regards ccc (11 Replies)
Discussion started by: ccc
11 Replies

5. Shell Programming and Scripting

mailx is not working outside e-mails

HI i wrote schell script to send e-mail automatically. it works only e-mail for our company.say for example, company name is : abc, example: joe@abc.com every body is receiving with xxx@abc.com (abc.com) if any body from outside of our company like joe@xyz.com.(xyz.com) are not... (3 Replies)
Discussion started by: raosurya
3 Replies

6. Shell Programming and Scripting

mailx- how to delete least of mails

Hi, when i run the mailx command it gives me the least of mails . suppose there are 1- 150 mails and i want to delete 30 to 145 mails . then what command i have to use here? Thanks (6 Replies)
Discussion started by: aish11
6 Replies

7. Shell Programming and Scripting

2 mails from mailx command

hi, While using mailx command i am receiving 2 mails with the same content in both the mails.I am attaching a file to the mailx command. In one mail file is coming as attachement and in other attachment is not there. I am using mailx command in this way. echo "Some content" |mailx... (0 Replies)
Discussion started by: arijitsaha
0 Replies

8. IP Networking

Set default return address for all mails sent from mailx

Hi, I have a question about mailx in Red Hat: If I use 'mail userid@mydomain.com -- -f root@mydomain.com', the return mail address will be root@mydomain.com. How can I make all mails sent from this system use root@mydomain.com as return address by default? Thank you in advance! nz (1 Reply)
Discussion started by: aixlover
1 Replies

9. Red Hat

Problems sending mail: Difference between Mail and Mailx?

Whats the difference between mail and mailx? I'm trying to troubleshoot a problem where I can send mail from server A with this `echo $MESSAGE | mail -s "$SUBJECT" -r $FROM $RECIPIENTS` command but executing the same command from server B throws me this error (Both servers are RHEL) ... (1 Reply)
Discussion started by: RedSpyder
1 Replies

10. HP-UX

Mailx command running successfully but no mails received.

Hi, I am working on a HP-UX box. Mailx command running successfully but no mails received. Here is what I am doing rocfm@comhp73 - mailx -s "subject" abc@gmail.com < abc.txt Null message body; hope that's ok rocfm@comhp73 - echo $? 0 rocfm@comhp73 - echo "something" | mailx -v -s... (1 Reply)
Discussion started by: Sunayna
1 Replies
NEWMAIL(1)							  Mail Utilities							NEWMAIL(1)

NAME
newmail - biff like tool for the terminal SYNOPSIS
newmail [-b] [-h] [-i interval] [-r] [-w] [ mbox [...]] DESCRIPTION
The newmail program monitors a given set of mailboxes and looks for new mail. If new mail is received the sender and subject will be writ- ten on the terminal it was started from. By default newmail puts itself in the background so the console is still usable. newmail is able to monitor arbitrary numbers of mailbox files. If no mailbox was specified on the commandline it will monitor the default mailbox, which may be overwritten by the MAIL environment variable. If more than one mailbox is being monitored, a prefix is printed for each mail line so the user can distinguish between the different mail- box files. By default the prefix is the name of the mailbox without its path. If a mailbox is specified as path=string then string will be used as prefix for mails received in the mailbox denoted by path. newmail is able to decode header lines when non-ascii characters are transported. They will be displayed properly if the locale (LC_CTYPE) is set accordingly. OPTIONS
-b Ring a bell after one or more incoming mails have been detected for at least one mailbox. -h Print a help message. -i interval Set the interval between two mailbox checks to interval seconds. The default is 60 seconds which is suffient for the terminal. For the use inside of a window or dock application a lower value may be prudent. -r Emit raw data from the mail. This will bypass routines to decode character encodings used for mail headers as described in RFC 2047. This may be useful for window applications that want to decode the strings on their own. -w Run as window application. This will prevent newmail from moving itself into the background so its output can be used as input for a window application. This will also change the output format slightly and prevent a bell to be rung after new mail has been received. OUTPUT FORMAT
The output format differs from being read by humans and programs (-w). newmail: >> Mail from <from> - <subject> >> Priority mail from <from> - <subject> >> <folder>: Mail from <from> - <subject> >> <folder>: Priority mail from <from> - <subject> newmail -w: <from> - <subject> Priority: <from> - <subject> <folder>: <from> - <subject> <folder>: Priority: <from> - <subject> It should be easy for third party programs which are interested in such information to parse the output when newmail is running with the -w option. ENVIRONMENT
newmail supports the following environment variables: LANG Locale setting for the output character set. LC_CTYPE Locale setting only for the output character set. MAIL Full path of the user's spool mailbox. NOTES
This program is inspired by the newmail program from the Elm interactive mail program. It is a rewrite from scratch though. Many thanks go to Dave Taylor and the Elm Development Group who have provided me with a great mail program for several years. Many addi- tional thanks go to the former lead developer Dave Taylor who started the program back in 1986. SEE ALSO
locale(7). AUTHOR
Joey Schulze <joey@infodrom.org> Infodrom Oldenburg February 8th, 2006 NEWMAIL(1)
All times are GMT -4. The time now is 06:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy