LinuxQuestions.org
Visit Jeremy's Blog.
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 01-14-2004, 05:55 PM   #1
sn0wman
LQ Newbie
 
Registered: Aug 2003
Posts: 5

Rep: Reputation: 0
bash script, for deleting a specefic mail


Im on a big mail server, over 14000 users, sometimes i need to delete just one mail from a specefic account.

Is there any easy way to make a script for this in bash?. so i don't need to empty their whole emaildb.

Exim and sendmail are used for mail.
 
Old 01-15-2004, 12:54 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Probably.

What format do you store messages in?

Under what criteria do you want to delete messages?
 
Old 01-15-2004, 03:40 PM   #3
sn0wman
LQ Newbie
 
Registered: Aug 2003
Posts: 5

Original Poster
Rep: Reputation: 0
mbox
 
Old 01-15-2004, 03:47 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Quote:
Originally posted by david_ross
Under what criteria do you want to delete messages?
 
Old 01-15-2004, 03:53 PM   #5
sn0wman
LQ Newbie
 
Registered: Aug 2003
Posts: 5

Original Poster
Rep: Reputation: 0
oh sorry, didn read the whole past message )

Let's say customer X calls, "A mail is blocking all my other mails", the customer is behind 56k6 modem and the mail he's trying to get is about 7mb or more.

I already have tools to lookup wich ordernumber #1 #2 etc. the mail is, but now i wan't a easy way to delete it.

like a script

delmail analoguser2003 #4

all mboxes are under /var/mail/<user>/mail
 
Old 01-16-2004, 01:32 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
You don't really need a script - just run:
echo d 5 | mail -f /path/to/mbox

Where you want to delete message 5 from the mbox file "/path/to/mbox".

If it was me though I think I'd just tell the user to delete it without downloading the message.
 
Old 01-16-2004, 02:40 PM   #7
sn0wman
LQ Newbie
 
Registered: Aug 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Users are stupid

Thanks for the tip, i shall make an php gui for it, so our users can use that.
 
Old 01-16-2004, 02:57 PM   #8
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Why not just get them to telnet to port 110?

If they are using windows (works under wine too) popcorn is a great gui email client program for this type of problem.
 
Old 01-16-2004, 06:20 PM   #9
sn0wman
LQ Newbie
 
Registered: Aug 2003
Posts: 5

Original Poster
Rep: Reputation: 0
Well, i doubt they know what telnet is.
 
  


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
Evolution not deleting POP3 server mail when Getting mail. dummy.1 Linux - Newbie 3 07-13-2004 07:50 AM
Exists a mail-client for Fedora, that can read local mail file without deleting? mxn Linux - Software 1 07-10-2004 12:53 PM
bash script to send mail Cruger Programming 1 03-06-2004 08:25 AM
Need help finishing Bash Script to add new user and map virtual e-mail info. O_Chaos Linux - Newbie 1 02-09-2004 04:06 PM
Deleting Mail tied2 Linux - Newbie 8 09-10-2002 04:17 PM


All times are GMT -5. The time now is 11:08 AM.

Main Menu
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