Tag Info

Hot answers tagged

8

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


6

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


6

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

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

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


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


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

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


4

Taken from postfixadmin FAQ 1) Why isn't PostfixAdmin creating my mailbox? PostfixAdmin is only a web interface for storing configuration settings. It does not (by default!) have the ability to create mail folders on disk. In a normal setup, sending the 'Welcome' email accomplishes this task - as Courier/Cyrus/etc do it (and have ...


3

I think it mostly a historical convention which assumes that users have an actual home directory and more access than just to their e-mail. Then it makes sense to have a ~/Maildir/ subdirectory in addition to ~/public_html/ , ~/.ssh/ etc. For virtual mail users there isn't much actual need for such an intermediate ~/Maildir/ directory, but using it doesn't ...


3

I have my own experience with this setup because I'm using dovecot without a ~/Maildir/ subdirectory. It's usually no problem at all, the only thing I noticed is that users can under certain circumstances see system folders in their mail client. In my case, users keep asking me what the 'dovecot' and 'sieve' folders in the folder subscription windows are ...


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

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

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

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

Given that Maildir uses the filesystem exclusively, I feel it should be possible to just mv ~fred/Maildir ~oldemployees/Maildir/fred or similar It depends on dovecot configuration By default dovecot use Maildir++ layout to store the email. ~/Maildir/new, ~/Maildir/cur and ~/Maildir/tmp directories contain the messages for INBOX. The tmp directory ...


3

The first thing to point out is that the solution is not to disable SELinux but to work with it. There are tools that you can use to determine wat you need to do and the good news is that they are much improved in CentOS 7.1 compared to their earlier versions. First run audit2why on the AVC messages you have gathered audit2why <FileContainingMessages ...


3

Since you have dovecot you can do that with doveadm(1). For example deleting mail saved in the Trash folder for user before 30 days: doveadm expunge mailbox Trash savedbefore 30d -u <user> You can use -A flag for all users and if you want to check first for the mails that match use the search/fetch commands - see doveadm-search(1): doveadm search ...


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

Not sure you will find a better solution than mounting the Windows share and running rsync. Is the issue that all files are being re-transferred every time? With the correct rsync options that should only re-transfer files that have changed, and can delete any files in the backup that are no longer in the source. Maildir doesn't require file locking for ...


2

Using rdiff-backup would save you a fair bit of scripting, plus it would be hard to achieve the same level of efficiency with a homegrown solution. You would simply get an archive of changes to the file system you back up, on which you could run cleanup jobs to discard backups older than so or so. If you can start an rdiff-backup server process directly on ...



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