1

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

1
  • (facepalm) Why, gawd, why? Dec 2, 2011 at 20:06

3 Answers 3

2

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:

https://github.com/romanbsd/received

1

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

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .