LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-31-2003, 07:51 AM   #1
ganninu
Member
 
Registered: Jul 2003
Distribution: RH 7.3/8.0/9.0, Debian Stable 3.0, FreeBSD 5.2, Solaris 8/9/10,HP-UX
Posts: 340

Rep: Reputation: 30
Scanning for message sizes from users mailboxes


I'm trying to do a script which will automate these steps:

(1) Scan for each user mailbox
(2) Scan for each message in each user mailbox
(3) Remove messages which are older than somepredetermined date

My problem is in Step (2) where i have to scan for each message and check their size...

Using
> mail -f username

and then:

>size *

will print the size of each message.... But how can I do that from a script?? Also what does the size format mean in the form number1/number2. What is that "/" sign for?

Thanks.
 
Old 08-01-2003, 06:17 AM   #2
shaheen
LQ Newbie
 
Registered: Jul 2003
Location: India
Distribution: Red Hat 7.1
Posts: 27

Rep: Reputation: 15
scanning message sizes

Hi there , i assume you are going to develop a cgi or php program .. anyway im not an expert in this field what interested me was that in linux you have the mailbox located at /var/spool/mail under which there are individual files for individual users .. which actually store the users mail details , now this file collectively holds the mails , how can you get the size of old mails individually , yes of course you can sort out the dates by assigning a regular expression , but how will you get individual mail sizes , do let me know , all the best

Shaheen
 
  


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
Message users on shell? MarleyGPN Linux - Software 1 04-26-2004 02:21 PM
Display Last Login message for users smile_laguna Linux - Newbie 4 02-28-2004 01:40 AM
broadcast message to all users JustinHoMi Linux - Software 1 11-14-2003 08:34 AM
LAN : How to send message to windows users isone Linux - Newbie 5 10-29-2003 01:09 AM
send message to all users on all terminals mrtwice Linux - Newbie 2 06-26-2003 04:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:49 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
Open Source Consulting | Domain Registration