Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I presume I'll want to use Mailman or something, but I don't want to run a mailing list.

What I want to do is point a program at a Maildir containing a bunch of email (plain text files) - and have it generate some sort of threaded HTML pages so I can share that directory on the web.

I'm sure there's some one-liner I can run to do this, right?

share|improve this question

2 Answers 2

I've been looking into mharc. At the moment, I have merely generated simple pages with threaded listings of mailboxes using mhonarc(1) and it works fine for that case. At some point, I will push on to make it prettier, more convenient and automated.

share|improve this answer
    
The above is a bad link –  Bryan Hunt May 28 '12 at 12:26
    
have you used mharc –  Bryan Hunt May 28 '12 at 12:27
up vote 0 down vote accepted

Install needed software

sudo apt-get install mailman
sudo apt-get install procmail

Create the new list

sudo /usr/lib/mailman/bin/newlist
Enter the name of the list: mylist
... 

Now populate a mailspool file, using formail from procmail.

cd Maildir
for i in */*; do formail < $i >> /tmp/mbox; done

Finally generate the mailing list from mailspool file.

sudo /usr/lib/mailman/bin/arch mylist /tmp/mbox
rm -f /tmp/mbox

The archives can be found at the following path

/var/lib/mailman/archives/private/mylist

Postscript

I use notmuch in my day-to-day work. Here's a nice trick you can use.

 notmuch search --output=files from:@example.com or to:@example.com or to:@naughtyclient.com | while read i; do formail < "$i" >> /tmp/mbox; done

You can use the above code to selectively index conversations.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.