Hi, Here's the scenario. I want to set up a mailbox so that when mail sent to the address is piped to a processing application, instead of going to a mailbox. One way I can do this is to set up a mailbox and then have an application that checks to see if there's mail and then processes it. (Old school Unix script) Is there a way to set it up with dovecot? (Cleaner solution) Thx -Mike
If you don't need the message in the actual mailbox you can do that with your MTA instead. In postfix for example you setup a custom transport in the master.cf file that calls your application. Then you setup a transport record for that particular address which is delivered to your custom transport. -----Original Message----- From: dovecot-bounces+jkrejci=usinternet.com at dovecot.org [mailto:dovecot-bounces+jkrejci=usinternet.com at dovecot.org] On Behalf Of dovecot at segel.com Sent: Wednesday, February 25, 2009 2:29 PM To: dovecot at dovecot.org Subject: [Dovecot] Quick question... Hi, Here's the scenario. I want to set up a mailbox so that when mail sent to the address is piped to a processing application, instead of going to a mailbox. One way I can do this is to set up a mailbox and then have an application that checks to see if there's mail and then processes it. (Old school Unix script) Is there a way to set it up with dovecot? (Cleaner solution) Thx -Mike
dovecot at segel.com wrote:> Hi, > > Here's the scenario. > > I want to set up a mailbox so that when mail sent to the address is piped to > a processing application, instead of going to a mailbox. > > One way I can do this is to set up a mailbox and then have an application > that checks to see if there's mail and then processes it. > (Old school Unix script) > > Is there a way to set it up with dovecot? > (Cleaner solution) > > Thx > > -Mike > >I am sure this can be done with sieve but I am starting to learn it now .... With procmail it's just trivial .... After making sure it is a mail destined to your application, you just pipe it there # Last delivering recepie after spam cheks etc .... :0 | /path/to/my/processing/application You might also have a look at ripmime ( rips mime attachements from a mail ) ... so you can combine all .... Cheers Harry.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, Feb 25, 2009 at 02:28:50PM -0600, dovecot at segel.com wrote:> Hi, > > Here's the scenario. > > I want to set up a mailbox so that when mail sent to the address is piped to > a processing application, instead of going to a mailbox.Conceptually, when a mail arrives there are two processes involved: the mail transfer agent (MTA) and the mail delivery agent (MDA). The mail transfer agent takes the mail from "the net" (typically from another MTA) and decides whether the mail has to be delivered locally (then it passes it on to the MDA) or remotely (then it passes it on to another MTA). Note that Dovecot doesn't enter this picture at all (yet). Its primary job is serving up mail to end-users when it has already been delivered. All that said, most MTAs (Postfix, Exim, Sendmail, Qmail, you name it) bring along with them delivery functions (can fill in the role of MDAs). The dovecot distribution brings along with it a delivery agent (deliver) which you can configure to play many tricks on delivery via a language designed explicitly for that (called Sieve), and there are quite powerful "third party" delivery agents (e.g. procmail). So, to sum up your best bet would be: - if the requirements are simple, like "pipe all mail going to this user through this program", do as Justin said and tell your mail transfer agent to do that. To be able to give you any hints, I should at least know the beast by name ;-) - if the task is more complex (e.g. depending on other headers, time of day, you name it), then just tell the MTA to push it to the MDA (most come preconfigured to do that anyway, if circumstances are right) and tweak the MDA configuration to achieve that. Hope that helps. Things can be a bit confusing at the beginning. Regards - -- tom?s -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFJpi4yBcgs9XrR2kYRAmOkAJ9XExiCQYVbD6TrSf38qN4IxXuD5wCcDpEa Af0M7SFSpUwVhreUmozaGEk=Vni1 -----END PGP SIGNATURE-----