Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I need to store the emails received by postfix in mongodb ,

i red many sites and solution but i didn't find a way to do that.

I saw filters and but i don't know what is the right way to make it and how to do it.

So is there an event handlers or triggers in the postfix to do this.

BTW i'm not an administrator :)

Thanks in Advance

share|improve this question
(facepalm) Why, gawd, why? –  Avery Payne Dec 2 '11 at 20:06

3 Answers 3

I'm not aware of a native way of doing this, so I wrote a LMTP daemon which can receive mail from Postfix and store it in mongodb:

share|improve this answer

If All you need is to store the mail into mongodb, you might want to write a small script with your favorite scripting tool and redirect the mails via /etc/aliases like this:

user: "|/path/to/"
user2: "|/path/to/ --with params"

good luck :)

share|improve this answer

You might find this tutorial using Fluentd as a log collector between Postfix and MongoDB useful. The upshot of this approach is, if you decide to use other storage systems instead of/in addition to MongoDB, it would be a simple configuration file change.

share|improve this answer

Your Answer


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.