LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 03-16-2006, 11:44 PM   #1
sharad
Member
 
Registered: Dec 2005
Posts: 48

Rep: Reputation: 15
script to count the mails in an users folder "/var/spool/mail/user"


I wish to know how to write the shell script to count the mails
in a perticular users mailbox.


please help me to solve this problem.
 
Old 03-16-2006, 11:58 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 328Reputation: 328Reputation: 328Reputation: 328
The easiest way is probably to scan for a unique header:

grep -c "^Return-Path: " mailbox
 
  


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
Shel script mail send ("/" in mail address) problem anaid Linux - Networking 3 08-23-2005 08:41 AM
Mail going to /var/spool/mail/user and not to Thunderbird pracslipkerm Linux - Newbie 4 06-21-2005 06:58 AM
Qmail problem: ISP mail and virtual mail, "sorry no mailbox, here by that user" barryw Linux - Networking 7 05-28-2005 01:43 PM
sendmail error Fetching mail could not lock /var/spool/mail/username sukhdev50 Linux - Networking 0 05-04-2005 04:41 AM
postfix error procmail: Couldn't create "/var/spool/mail/ bentman78 Linux - Software 4 05-26-2004 01:04 AM


All times are GMT -5. The time now is 04:09 PM.

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