Tag Info

Hot answers tagged

5

While I haven't checked out ext4 yet, I'm using xfs with LVM almost everywhere. You get the snapshots, you get online partition growing, and instant fsck if you do crash. When my mail spool fills up, I'm happy to know its a 30 seconds procedure to fix - assuming your LVM volume group has some free space in it.


5

According to the documentation, mailbox_command takes precedence over home_mailbox. Either disable the former, or set up your .procmailrc to deliver to Maildir (by suffixing the mailboxes with a slash, if memory serves).


4

It's not a one-liner, but you could copy chunks like this (in csh): foreach file (`ls | head -n 1000`) mv $file /tmp/new/dir end I'm not 100% sure that pipe will work with the number of files you've got, but it's worth a shot. Also, you might be able to do 500 at a time with this command, just change that 1000 to 500.


4

Your first guess was pretty close :-) I made a bash script to scan a whole maildir against spam #!/bin/bash DIR="/home/vmail/example.net/exampleuser/cur/" for f in $(ls $DIR); do spamassassin -Le "$DIR/$f" > /dev/null ERR=$? echo $ERR if [ $ERR -gt 0 ]; then mv "$DIR/$f" /tmp/spam/ else echo "This was no spam." ...


4

There are projects like libpst allowing access to PST files from within Linux, but I doubt that anything aside from Microsoft's tools themselves will give you a "clean" PST output. I cannot see though why you could not connect to the IMAP server using Outlook from your machine and simply copy the messages to one or more PST stores mounted in Outlook - this ...


4

You use Dovecot, so each file in the maildir folder that has :2,S near the end of the file name means it has been flagged as "Seen" or "Read". More useful info about Maildir formats: http://wiki.dovecot.org/MailboxFormat/Maildir http://cr.yp.to/proto/maildir.html An example file name from my Maildir: ...


4

Yes In this particular case, you are using a 'Maildir' format mailbox. In Maildir, it's safe to use 'rm' to remove an individual piece of email, to use 'mv' to move an individual mail between folders on the same file system, etc. With other mail storage types, it may not be safe to rm a single email. More about Maildir: ...


3

In bash you can use the ${} substring match to get a single letter from a string: coredump@anita:~$ x="john"; echo ${x:0:1} j coredump@anita:~$ x="john"; echo ${x:1:1} o coredump@anita:~$ x="john"; echo ${x:2:1} h So in your script you can assign those letters to variables and use it on the mkdir commands to create your directory structure, something like ...


3

The 2 indicates that each character following the comma is a flag. The S flag means "seen" (i.e. the message has been read). http://cr.yp.to/proto/maildir.html


3

Postfix does not care, mostly. It just stuffs the mail into some file. The intersting part comes when you want to fetch the mail from the machine via IMAP (or POP3). Most IMAP-servers (I tried) prefer Maildirs, as these are easier extendable with various meta-data the IMAP-server could want, while still maintaining a basic "this is a Maildir" structure, so ...


3

consider a tar pipe like this one : tar cf - . | ssh remote "cd /backup; tar xf -" I would also be looking at bbcp. I realise the page about bbcp is enormous and confusing, but take the time to read it because I feel its probably the best solution here. http://www.slac.stanford.edu/~abh/bbcp/ I've done bbcp transfers on a variety of networks and found ...


3

I think I jumped the gun asking this question. I went ahead and gave it a try with an unimportant account. I simply copied files from the old server new directory to the new server new directory, and my mail client downloaded them without any issues. Problem solved!


3

I used XFS for a mail server setup (has been ext3 before) and definitely noticed an improvement with all the small files but it has been a while back and IIRC there are/were some "issues" with XFS and power-cuts (or any abrupt disruption to disk access for that matter) leaving all opened files filled with "0" and similar. But as mention by others: testing ...


3

ext3 can be tuned to better handle large directories run this: tune2fs -O dir_index /dev/hdXY then this: e2fsck -D -f /dev/hdXY The first one enables it for all future directories. The second one crawls through all your existing directories and builds the hash trees. That may take a good long while, so plan for some downtime.


3

LVM running ReiserFS - managed a server storing in the region of 20,000,000 quarantined messages and never skipped a beat. Plus for reasons I never worked out, the LVM on hardware RAID was faster than native file system access. There is the potential for an issue with flock, non syncronous updates and Reiser but I never actually ran into it in the best ...


2

It sounds like you want Vritual mailbox delivery. This is well-documented at the Postfix website, and will do exactly what you are asking. Note that you will need to do some lookup tables for this, although the official docs do mention that you can use a SQL backend at some point, should it all become too unmanageable.


2

I agree with Michiel. I have the same setup, with procmail doing local delivery. I have the following in both /etc/procmailrc and my local .procmailrc files: MAILDIR=$HOME/Maildir/ DEFAULT=$MAILDIR


2

Sorry to respond to such an old question - I'm sure the above answers and comments are a good solution - but I'd like to point to tnef (http://sourceforge.net/projects/tnef/ and https://github.com/verdammelt/tnef) which perhaps could be used to script a solution. (Full disclosure: I am the author/maintainer of that tool).


2

One major problem, maildirs use colons in their filenames. On Windows, a semicolon ; is often used in Maildirs. Since offlineimap is written in Python, it shouldn't be hard to make it do the same. Can I make a file into a partition somehow? There should be a program that can do that. (I know there's VFDwin for floppy disk emulation.) If not, ...


2

Consider using Thunderbird as an intermediate conversion tool -- it in theory can read PST files for you into it's native format (mbox), then you can use it to connect to your Dovecot IMAP server to drag & drop the bits upstream from "Local Folders" to the "Server IMAP" account. See this KB: http://kb.mozillazine.org/Import_.pst_files Thunderbird works ...


2

Here's something that should work ok. I've based it off the standard "local delivery" router/transports, but added in conditions on the X-Spam-Flag header, which I'm setting earlier in the relevant ACL. If you don't know how to do that, let me know and I'll amend the answer. I do something similar, but at a domain level, and my setup probably won't work ...


2

mutt also uses a global muttrc file. Typically it's in /etc/Muttrc or /usr/local/etc/Muttrc if you compiled it separately from the distro. You can just put the Maildir settings there. This mutt & Maildir Mini-HOWTO should give you an idea of what settings you need to change. Essentially you need to set folder and mbox and spoolfile to all point to ...


2

I agree with the above recommendations. Testing is very important. Do also consider ReiserFS. One of its design goals was for efficient handling of large numbers of small (< 4KiB) files, which is what a typical maildir implementation has to deal with. Wikipedia has an informative article about it, highlighting both its pros and cons.


2

Yes, this structure is for one user. The structure for the whole domain will be for example: /home/vuser/your_domain/ user1 user2 user3 Inside each user dir, you the structure of Maildir. Usually, the email servers such as courier are very flexible. You can customise the structure if you want. The prefix /home/vuser can be any path.


2

Is your question about how the attachment is encoded in the mail stored in the Maildir directory ? If yes, have a look at http://en.wikipedia.org/wiki/MIME (and also http://en.wikipedia.org/wiki/Base64). Mail body + attachment(s) are in the same file.


2

Dovecot does exactly this (Single Instance Storage) now with their dbox maildir format.


2

If you're using NFS, do not use mbox under any circumstances whatsoever. And if you want a scalable solution, Maildir is the way to go. The main problem with mbox is that of file locking - if you have more than one mail server, or more than one process trying to access the mailbox at the same time, you run a large risk of getting a corrupted mailbox. It's ...


2

Are you using Maildir storage with IMAP? If so, it should possible to just move the messages into the new folders. It should also be possible to use a mail client to copy between the two IMAP folders. It is important the the messages have a Date header, as this is usually the preferred date. Some clients will prefer the Delivery-date instead. If all ...


2

Here is a Perl script that sets the file date to the value in the Date: line in the message header. http://www.athensfbc.com/public/fix_msg_dates Usage: fix_msg_dates.pl <path to message directory> -Rick


2

You are looking for the autocreate plugin http://wiki.dovecot.org/Plugins/Autocreate



Only top voted, non community-wiki answers of a minimum length are eligible