[Dovecot] triggering multiple actions on pop-3 request

Eric S. Johansson esj at harvee.org
Fri Mar 19 21:39:48 EET 2004


Skye Poier wrote:

> Word on the street is Eric S. Johansson said:
> 
>>I figured a fork and exec would probably be what's called for. 
>>Although, I would probably want to cast off the child process and let it 
>>run to completion on its own.
> 
> 
> But, if you don't wait() then the messages it fetches will not be
> avaiable in the first POP LIST.  Which may not matter in your design :)

probably doesn't matter.  I would be concerned about waiting for God 
knows how long while you download 50 billion pieces of spam and filter 
them out of the stream before returning the first list to the user.  On 
the other hand, if it's a relatively quick process, it might not be too 
hideous to wait.  Would certainly make things easier.


>>the best place would be a place for I have all of the necessary 
>>information about the user and is a mainline pass through the code so it 
>>will always be executed. 
> 
> 
> And, after dovecot has changed its UID and chrooted (if the extra
> security is desired)

indeed.  Thank you for the reminder.

And as a general note to the conversation.  I looked into fetchmail as 
daemon and found it wouldn't work.  I would need to have a fetchmail 
processor running for every single user on the machine.  This could get 
really nasty if you have a few hundred+++ accounts all going to 
different pop 3 servers for their source information.

another possibility (assuming I want to use the "make the user wait" 
model) is to create a simple proxy which only handles the authentication 
phase.  it establishes a connection with the remote server based on 
given username and password, runs the pop3 fetch and filter, and drops 
messages into a local maildir.  then, pass the connection to a local 
dovecot, replaying the authentication sequence (or even bypassing given 
that the system authenticated on a "authoritative" source) but now 
connecting the users mail client to the dovecot pop3 server.

might work and doesn't require any modifications to dovecot.  would need 
to figure out how to pass control from the new authentication 
environment/proxy to the dovecot pop3 workhorse.

---eric



More information about the dovecot mailing list