I'm trying to do this as well - I use popfile to classify mails into 5 separate categories, so I really want to use 5 folders inside a single user account.
Do you think a scheme like this work?
1) create a 'policy' that will run a program when mail arrives, like an antivirus scanner. This program must launch another process, then return control to mercury so it can finish delivering the mail
2) the process scans the mail headers to work out which user received mail. (optional, with only a few mailboxes you could just do them all)
3) the process waits a minute or two until mercury has finished delivering mail to the user's inbox
4) the process launches one of the perl scripts mentioned earlier, which then use IMAP to connect to the user's inbox and move any new mails it finds to the right folders.
Is there any way to make it more deterministic, i.e. remove the delay? For example, could a mercury daemon launch the perl script after the mail is delivered?
<p>I'm trying to do this as well - I use popfile to classify mails into 5 separate categories, so I really want to use 5 folders inside a single user account.
Do you think a scheme like this work?</p><p>1) create a 'policy' that will run a program when mail arrives, like an antivirus scanner. This program must launch another process, then return control to mercury so it can finish delivering the mail
</p><p>2) the process scans the mail headers to work out which user received mail. (optional, with only a few mailboxes you could just do them all)
</p><p>3) the process waits a minute or two until mercury has finished delivering mail to the user's inbox
</p><p>4) the process launches one of the perl scripts mentioned earlier, which then use IMAP to connect to the user's inbox and move any new mails it finds to the right folders.</p><p>Is there any way to make it more deterministic, i.e. remove the delay? For example, could a mercury daemon launch the perl script after the mail is delivered?</p><p>&nbsp;</p>