Sponsored Content
Top Forums Shell Programming and Scripting mailx- how to delete least of mails Post 302593933 by karthik023 on Monday 30th of January 2012 02:21:03 AM
Old 01-30-2012
'd' command to delete mails, once you are inside mailx (mode) command.
else view 'mbox' file (using vi) in home directory and delete lines '145dd'.

PS: all mails are stored in 'mbox' file at /home/<user>/
mails usually gets deleted once you have read it....unless the SET KEEP option is set.
 

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. Debian

cannot send any mails using mailx

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

4. Shell Programming and Scripting

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 (2 Replies)
Discussion started by: ninjanesto
2 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. UNIX for Dummies Questions & Answers

Delete all mails on Solaris

How do I delete all my mails in the mailbox on Solaris? $mail ? d * Illegal numeric ? d * does not work. Also I want to retain the mailbox. Thanks, Rahul. (3 Replies)
Discussion started by: rahulrathod
3 Replies

7. Solaris

Delete clientmqueue mails

My clientmqueue directory is almost 6.7GB. There are like a thousands of e-mail that are present. Is there any way to delete them or just delete them normally. Also while deleting them, do i need to shutdown my sendmail service? Root FS is almost at 100%. Please help in this. Thanks in... (1 Reply)
Discussion started by: aksijain
1 Replies

8. 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

9. 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

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
pop3d::dbox(n)						      Tcl POP3 Server Package						    pop3d::dbox(n)

__________________________________________________________________________________________________________________________________________________

NAME
pop3d::dbox - Simple mailbox database for pop3d SYNOPSIS
package require Tcl 8.3 package require pop3d::dbox ?1.0.2? ::pop3d::dbox::new ?dbName? dbName option ?arg arg ...? dbName destroy dbName base base dbName add mbox dbName remove mbox dbName move old new dbName list dbName exists mbox dbName locked mbox dbName lock mbox dbName unlock mbox dbName stat mbox dbName size mbox ?msgId? dbName dele mbox msgList storageCmd get mbox msgId _________________________________________________________________ DESCRIPTION
The package pop3d::dbox provides simple/basic mailbox management facilities. Each mailbox object manages a single base directory whose sub- directories represent the managed mailboxes. Mails in a mailbox are represented by files in a mailbox directory, where each of these files contains a single mail, both headers and body, in RFC 822 (http://www.rfc-editor.org/rfc/rfc822.txt) conformant format. Any mailbox object following the interface described below can be used in conjunction with the pop3 server core provided by the package pop3d. It is especially possible to directly use the objects created by this package in the storage callback of pop3 servers following the same interface as servers created by the package pop3d. ::pop3d::dbox::new ?dbName? This command creates a new database object with an associated global Tcl command whose name is dbName. The command dbName may be used to invoke various operations on the database. It has the following general form: dbName option ?arg arg ...? Option and the args determine the exact behavior of the command. The following commands are possible for database objects: dbName destroy Destroys the mailbox database and all transient data. The directory associated with the object is not destroyed. dbName base base Defines the base directory containing the mailboxes to manage. If this method is not called none of the following methods will work. dbName add mbox Adds a mailbox of name mbox to the database. The name must be a valid path component. dbName remove mbox Removes the mailbox specified through mbox, and the mails contained therein, from the database. This method will fail if the speci- fied mailbox is locked. dbName move old new Changes the name of the mailbox old to new. dbName list Returns a list containing the names of all mailboxes in the directory associated with the database. dbName exists mbox Returns true if the mailbox with name mbox exists in the database, or false if not. dbName locked mbox Checks if the mailbox specified through mbox is currently locked. dbName lock mbox This method locks the specified mailbox for use by a single connection to the server. This is necessary to prevent havoc if several connections to the same mailbox are open. The complementary method is unlock. The command will return true if the lock could be set successfully or false if not. dbName unlock mbox This is the complementary method to lock, it revokes the lock on the specified mailbox. dbName stat mbox Determines the number of messages in the specified mailbox and returns this number. This method fails if the mailbox mbox is not locked. dbName size mbox ?msgId? Determines the size of the message specified through its id in msgId, in bytes, and returns this number. The command will return the size of the whole maildrop if no message id was specified. If specified the msgId has to be in the range "1 ... [dbName stat]" or this call will fail. If stat was not called before this call, size will assume that there are zero messages in the mailbox. dbName dele mbox msgList Deletes the messages whose numeric ids are contained in the msgList from the mailbox specified via mbox. The msgList must not be empty or this call will fail. The numeric ids in msgList have to be in the range "1 ... [dbName stat]" or this call will fail. If stat was not called before this call, dele will assume that there are zero messages in the mailbox. storageCmd get mbox msgId Returns a handle for the specified message. This handle is a mime token following the interface described in the documentation of package mime. The token is read-only. In other words, the caller is allowed to do anything with the token except to modify it. The msgId has to be in the range "1 ... [dbName stat]" or this call will fail. If stat was not called before this call, get will assume that there are zero messages in the mailbox. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category pop3d of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. KEYWORDS
internet, network, pop3, protocol, rfc 822 CATEGORY
Networking COPYRIGHT
Copyright (c) 2002 Andreas Kupries <andreas_kupries@users.sourceforge.net> pop3d 1.0.2 pop3d::dbox(n)
All times are GMT -4. The time now is 09:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy