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. |
Probably.
What format do you store messages in? Under what criteria do you want to delete messages? |
mbox
|
Quote:
|
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 |
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. |
Users are stupid :)
Thanks for the tip, i shall make an php gui for it, so our users can use that. |
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. |
Well, i doubt they know what telnet is.
|
All times are GMT -5. The time now is 12:06 PM. |