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).


5

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: ...


5

Don't manage mailboxes from postfix. Never. Redirect messages for delivery via POP/IMAP server that has appropriate functionality. In case of dovecot there is dovecot-lda aka deliver that do everything and much more, like user-controlled message filtering, quota management, autoreplying and so on. Anyway maildir is newer and preferrable format due to the ...


4

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 ...


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

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

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!


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 ...


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

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 ...


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 ...


3

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.


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

I've made some significant improvements to Kevin's script mentioned above, and he was kind enough to accept my pull requests. Eventually we split this off into a dedicated project which you can find here: https://github.com/kdeldycke/maildir-deduplicate


3

for generic files in linux, I use fdupes utils to remove duplicate files. I found it also works for Maildir messages.


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

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 ...


2

Since you've already configured Dovecot, the easiest solution to your problem is to use deliver from Dovecot as the mail delivery agent (MDA). This could be done by adding this line to main.cf (paths may vary according to your distribution, on Debian it's /usr/lib/dovecot/dovecot-lda): mailbox_command = /usr/libexec/dovecot/dovecot-lda -f "$SENDER" -a ...


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

Your Google Fu is lacking. One easy solution is a sendmail style ~/.forward file where you pipe | the message directly to your script, before it even gets written to your Mailbox. Your script then does its thing and writes the mail mesage to disk afterwards. Similarly but you get a bit more flexibility when you configure procmail as the mail delivery ...


2

You're better off to not compress the data. rdiff-backup does analyze files for differences, but if they're compressed archives, it may not be able to find any differences and thus be forced to store the entire new file again. Also, you can use ssh -C to compress the ssh connection and save some bandwidth. Finally, if possible, you should get some more ...


2

You're probably not sharing the same mailbox location/folder and/or mailbox delivery style (MBOX vs. MDIR) in both Postfix and Dovecot. As a result, Postfix is (correctly) writing under "/home/mailuser/Maildir" (where you see your mail arriving, under the "new" subfolder), but as dovecot is searching somewhere else... it doesn't find such mails (so you get a ...


2

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


2

Your problem has nothing to do with maildir, and everything to do with bad mail routing. The key is the error message "mail for domain.com loops back to myself". You've setup MX records such that mail for domain.com points to your own mail server, but you haven't configured said mail server to actually accept and deliver mail. Set mydestination (or the ...



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