Take the 2-minute tour ×
Server Fault is a question and answer site for professional 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 master.cf 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
add comment

2 Answers

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

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/script.sh"
user2: "|/path/to/script.sh --with params"

good luck :)

share|improve this answer
add comment

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.