[Dovecot] Antwort: Re: Running a script when a mail arrives

Dennis Becker kmux at guggs.de
Wed Sep 19 16:24:35 EEST 2007


r.lang at scan-plus.de schrieb:
> Hi,
>
>   
>> This sounds like a better task to do at the MTA level. I know Postfix 
>>     
>
> We use qmails 'qmail-command' - feature. For a certain virtual domain all 
> mails
> are filtered/sorted by a filterscript of our own. Check if your incoming 
> mailserver
> or MTA has such a capability. For qmail its as simple as placing a .qmail 
> -File in the
> users home directory with '|./path/to/scipt', the script getting the mail 
> on its
> stdin, and some more useful information via the environment.
>
> Greetz,
> Ruben
>
>   
>> has the capability to do such things. You can write a Perl script for 
>> example and make entries in the main.cf and/or master.cf files and 
>> postfix will pass the e-mail to that script during the rest of it's 
>> processing.
>>
>> Tom
>>
>> Dennis Becker wrote:
>>     
>>> Hi,
>>> I'm trying to execute a script when a mail arrives in a given user's 
>>> mailbox. Something like .dovecot.sieve.
>>> The reason I'm not using sieve itself is that I need to do stuff on 
>>>       
> mail 
>   
>>> arrival, which is beyond sieve's features.
>>>
>>> So is there a way to tell dovecot to run a script when a mail arrives 
>>>       
> in 
>   
>>> a certain mailbox? Optionally a solution to forward the whole mail to 
>>>       
> a 
>   
>>> script would be good too.
>>>
>>>       
>
>   

Thanks to all. I went to the MTA level using a .forward in the user's 
homedir now.

The reason for not doing that in the first place, was that I have 
virtual accounts together with postfix, so there is actually no homedir 
for the mailuser.
What I'm doing now is some kind of workaround. Since i just need to have 
the "passing the mail to a script" capability for one special user I can 
use a mailforward to the system vmail user and use the .forward in that 
homedir.

But I'm still confused why there's no possibility included to execute 
external scripts in a .dovecot.sieve solution.


-- 
Dennis Becker 



More information about the dovecot mailing list