Wednesday, 21 August 2013

Postfix redirect mails to script and deliver locally

Postfix redirect mails to script and deliver locally

I am trying to develop an application that, I think, can help to system
administrators that have to manage a big amount of servers. With it, I
will try to show LOG messages from syslog (i have yet solved this), and
show emails delivered locally (for example, those from cron, rotatelogs,
etc.), and not have to go server by server checking this. The mails wil be
piped to a script, that will send them to a webservice.
What I need now i to configure Postfix (and probably some other mail
servers like Exim) to make the messages be delivered to a script, and
optionally locally, if desired. I have read a lot of tutorial, but each
one uses a method, so I would like to know which of them is the most
standard. In short, this is what I would need:
Select wich system users their mail will be delivered to the script (no
user, just one user, some specific users).
Be able to configure if, apart from the script, the mail will be delivered
locally or not.
My base is a standard local only mail installation (i am using debian, but
the configuration should be compatible with other distributions, as
CentOS, Red Hat, Ubuntu, etc.).
Can anyone tell some advices, or guide to the process of this configuration?
Regards and thanks in advance.

No comments:

Post a Comment