Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a user with a very large mail file (126 MB) which contains some 300 odd e-mails. Unfortuantly this needs to be downloaded over a satellite link. This is very slow and the user is unable to download any mail at all. I don't believe the file to be corrupt as I can look at the mail using the mail command.
Is there a convienent way that I can seperate out the file into mutilple files of say 25 or 50 messages and allow the user to download his mail gradually.
Can I do this with the mail command? I need to specify a range of say 25 or 50 messages. I can create temporary accounts for each batch of messages.
Is there a convienent way I can do this? Has anyone encountered such a problem in the past.
You're assistance is greatly appreciated, sorry kinda new to Linux.
I don't know much about the nature of these files, be they text or binary, however something to keep in mind is simply arbitrarily cutting up the file into 10mb chunks (or whatever size the user needs so they can download it). Also, if you provide the file over an ftp server, they can use a client that can "resume" downloads, allowing them to tackle the file in smaller sessions.
Unfortuantly that wont work as the file needs to be segmented by messages not by size, as this could literally cut an e-mail or attachment in half! Thanks anyways for the suggestion.
Anyways, I've worked out how to resolve this so thought I should tell you all.
If I create another empty file in the /home/spool/mail/ directory (home of the mailboxes) I can use the mail command to move a number of messages into this file. If I then rename this file to the user's mailbox name then the user can download those messages. This is the basis of it! I could use multiple files etc to get all the messages or keep using the same file each time the user has emptied it.
You can issue the "mail -f <mailbox>" command to view a mailbox, then after that you can issue the "s <msg range> <file>" from the mail prompt to move messages to another file, so "s 1-10 user" would move the first 10 messages into a file called 'user' to be downloaded!
Hope this helps anyone who finds themselves in a similar position!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.