Mercury Suggestions
IMAP Filtering

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> </p>

Any way to get IMAP filtering added to Mercury ?

I'm currently doing this using Squirrelmail,  but it's quite slow ..

Thanks 

<p>Any way to get IMAP filtering added to Mercury ?</p><p>I'm currently doing this using Squirrelmail,  but it's quite slow ..</p><p>Thanks </p>

The problem isn't the filtering, which would be fairly trivial, but the user interface to allow users to manage it. The only real way that could be done is via HTML, and I simply don't have the skills to design anything other than very basic HTML at this point.

Rest assured, though, that if I can ever get the necessary skills (or find someone I can work with who has them), then this one would be a significant priority.

Cheers!

-- David --

The problem isn't the filtering, which would be fairly trivial, but the user interface to allow users to manage it. The only real way that could be done is via HTML, and I simply don't have the skills to design anything other than very basic HTML at this point. Rest assured, though, that if I can ever get the necessary skills (or find someone I can work with who has them), then this one would be a significant priority. Cheers! -- David --

Could it not be done a little like Global Filters - if the rule is to affect all accounts.

Or specify username, then filter similar to  global filters ??


 

<p>Could it not be done a little like Global Filters - if the rule is to affect all accounts.</p><p>Or specify username, then filter similar to  global filters ??</p><p>  </p>

What sort of filtering are you trying to do?  Perhaps there are people here who could suggest other ways of achieving the same options.

If you are using the squirrelmail filters, is it just clientside filtering you need?


<p>What sort of filtering are you trying to do?  Perhaps there are people here who could suggest other ways of achieving the same options.</p><p>If you are using the squirrelmail filters, is it just clientside filtering you need?</p><p> </p>

squirrellmail imap filtering is very slow..

Server side would be better.

<p>squirrellmail imap filtering is very slow..</p><p>Server side would be better. </p>

I don' t know if my goal is the same as the previous poster's, but it may be.  My biggest headache is dealing with spam.  I need to filter flagged spam into a per-user imap spam folder--no html user interface necessary, since the imap filter would be in place for all users, set up by the admin, and do the same thing for all of them (except it would filter to individual user's folders).

 Is there an existing way to do such a thing server-side?  I thought there was not, but I may have missed something.
 

<p>I don' t know if my goal is the same as the previous poster's, but it may be.  My biggest headache is dealing with spam.  I need to filter flagged spam into a per-user imap spam folder--no html user interface necessary, since the imap filter would be in place for all users, set up by the admin, and do the same thing for all of them (except it would filter to individual user's folders). </p><p> Is there an existing way to do such a thing server-side?  I thought there was not, but I may have missed something.  </p>

[quote user="ghpayne"]

I don' t know if my goal is the same as the previous poster's, but it may be.  My biggest headache is dealing with spam.  I need to filter flagged spam into a per-user imap spam folder--no html user interface necessary, since the imap filter would be in place for all users, set up by the admin, and do the same thing for all of them (except it would filter to individual user's folders).

 Is there an existing way to do such a thing server-side?  I thought there was not, but I may have missed something.
 

[/quote]

 

Nope, can't filter to user folder but you can filter the mail to a secondary account for the user using Mercury/32.  Create a second account called user_spam for each user and then have the user connect to that account using IMAP4.  Works pretty well using those clients where you can have multiple IMAP4 accounts  (Pegasus Mail, OE, Thunderbird, etc.).  This may not help all that much when using SquirrelMail but then they'll not have all that much spam in their primary account anyway if you are using Spamhalter or POPFileD for your spam.

 

[quote user="ghpayne"]<p>I don' t know if my goal is the same as the previous poster's, but it may be.  My biggest headache is dealing with spam.  I need to filter flagged spam into a per-user imap spam folder--no html user interface necessary, since the imap filter would be in place for all users, set up by the admin, and do the same thing for all of them (except it would filter to individual user's folders). </p><p> Is there an existing way to do such a thing server-side?  I thought there was not, but I may have missed something.  </p><p>[/quote]</p><p> </p><p>Nope, can't filter to user folder but you can filter the mail to a secondary account for the user using Mercury/32.  Create a second account called user_spam for each user and then have the user connect to that account using IMAP4.  Works pretty well using those clients where you can have multiple IMAP4 accounts  (Pegasus Mail, OE, Thunderbird, etc.).  This may not help all that much when using SquirrelMail but then they'll not have all that much spam in their primary account anyway if you are using Spamhalter or POPFileD for your spam. </p><p> </p>

I'm still looking at ways of filtering imap email on my server.

Currently the moving of messages into IMAP folders is done using SquirrellMail.
This works OK, but is not that fast and relies on users having logged in via webmail.

I've found a few Perl scripts that will move emails to IMAP folders based on various criteria.
What I need to try and do is get Mercury to run the Perl script and move the email, after Mercury32 has finished processing it.

Any ideas ? ? These are the IMAP filters I have found:

http://www.joeshmoe.com/imapautoarchive/index.html
http://imapfilter.hellug.gr/

If any one can get this to work, please share the info :)


 

<p>I'm still looking at ways of filtering imap email on my server.</p><p>Currently the moving of messages into IMAP folders is done using SquirrellMail. This works OK, but is not that fast and relies on users having logged in via webmail.</p><p>I've found a few Perl scripts that will move emails to IMAP folders based on various criteria. What I need to try and do is get Mercury to run the Perl script and move the email, after Mercury32 has finished processing it.</p><p>Any ideas ? ? These are the IMAP filters I have found:</p><p>http://www.joeshmoe.com/imapautoarchive/index.html http://imapfilter.hellug.gr/</p><p>If any one can get this to work, please share the info :)</p><p>  </p>

Those scripts connect via IMAP to the server to do the filtering.  No reason why you shouldn't run those yourself if they do what you want - they may even be faster that SquirrelMail. :)

If you want them to run automatically, you will have to set them up using the AT scheduler or something similar.  Mercury doesn't have to know that you are running a script - it will appear to be another user connection and be treated the same way.

Let us know how you get on, setting perl up on a Windows pc is straightforward, and there may be quite a few here who might be interested in doing this.

 

<P>Those scripts connect via IMAP to the server to do the filtering.  No reason why you shouldn't run those yourself if they do what you want - they may even be faster that SquirrelMail. :)</P> <P>If you want them to run automatically, you will have to set them up using the AT scheduler or something similar.  Mercury doesn't have to know that you are running a script - it will appear to be another user connection and be treated the same way.</P> <P>Let us know how you get on, setting perl up on a Windows pc is straightforward, and there may be quite a few here who might be interested in doing this.</P> <P mce_keep="true"> </P>

I agree I could do it away from Mercury.

But it would be nice to do it using Mercury, either as part of it or having Mercury trigger an external filter.

<P>I agree I could do it away from Mercury.</P> <P>But it would be nice to do it using Mercury, either as part of it or having Mercury trigger an external filter.</P>

Is it possible to get Mercury to run a filter AFTER it has delivered the message ?

I've found this:
http://www.athensfbc.com/imap_tools/

This works, in that it will move messages between folders. But I would like to do this once the message has been delivered.

Thanks
 

<p>Is it possible to get Mercury to run a filter AFTER it has delivered the message ?</p><p>I've found this: http://www.athensfbc.com/imap_tools/</p><p>This works, in that it will move messages between folders. But I would like to do this once the message has been delivered.</p><p>Thanks  </p>

Anyone thought of a better way of IMAP Filtering ?

Any chance this will be part of Mercury ?
I'm willing to test this if anyone has anything... :)

Thanks

 

<p>Anyone thought of a better way of IMAP Filtering ?</p><p>Any chance this will be part of Mercury ? I'm willing to test this if anyone has anything... :)</p><p>Thanks  </p>

Is it worth setting a challenge !! ?

I would happily donate some thing towards getting IMAP filtering either as part of Mercury or as a Daemon (if this can do it)..

:) :)

<P>Is it worth setting a challenge !! ?</P> <P>I would happily donate some thing towards getting IMAP filtering either as part of Mercury or as a Daemon (if this can do it)..</P> <P>:) :)</P>

[quote user="tomt"]

Is it worth setting a challenge !! ?

I would happily donate some thing towards getting IMAP filtering either as part of Mercury or as a Daemon (if this can do it)..

:) :)

[/quote]

 As it's been stated this is generally a too tough problem right now.  If someone were to do this with scripts even it would be way too specific to their own setup to be useful for general user without some sort of means to modify the scripts in real time.  Having Mercury/32 filter and move to different accounts though is trivial.  Allowing users to have multiple accounts makes it pretty easy for Mercury/32 to move the spam to a separate account.  Most mailers have the capability of connecting to multiple accounts concurrently and so the users would not have all that much of a problem.


 

[quote user="tomt"]<p>Is it worth setting a challenge !! ?</p> <p>I would happily donate some thing towards getting IMAP filtering either as part of Mercury or as a Daemon (if this can do it)..</p> <p>:) :)</p><p>[/quote]</p><p> As it's been stated this is generally a too tough problem right now.  If someone were to do this with scripts even it would be way too specific to their own setup to be useful for general user without some sort of means to modify the scripts in real time.  Having Mercury/32 filter and move to different accounts though is trivial.  Allowing users to have multiple accounts makes it pretty easy for Mercury/32 to move the spam to a separate account.  Most mailers have the capability of connecting to multiple accounts concurrently and so the users would not have all that much of a problem.</p><p>  </p>

I agree it's easy to move mail to other accounts, but it would be nice to be able to move mail to a users IMAP account folder.

 

<P>I agree it's easy to move mail to other accounts, but it would be nice to be able to move mail to a users IMAP account folder.</P> <P mce_keep="true"> </P>

[quote user="tomt"]

I agree it's easy to move mail to other accounts, but it would be nice to be able to move mail to a users IMAP account folder.

 

[/quote]

 

But as stated by David right off the bat not something that that you'll see happen any time soon since it requires some method to control.  Even for others to do this there needs to be some sort of hooks and latches in the program.

[quote user="tomt"]<p>I agree it's easy to move mail to other accounts, but it would be nice to be able to move mail to a users IMAP account folder.</p> <p mce_keep="true"> </p><p>[/quote]</p><p> </p><p>But as stated by David right off the bat not something that that you'll see happen any time soon since it requires some method to control.  Even for others to do this there needs to be some sort of hooks and latches in the program. </p>

I am not sure I do understand you right but if I do you could back up my request for analog spam level markers (http://community.pmail.com/forums/thread/4131.aspx) and use rules like

If expression headers matches "X-SPAM-Level: [ * ][ * ][ * ][ * ][ * ][ * ]*" Move "SPAM"

(remove the spaces in all [ * ])

Rainer

P.S. There is a [ c o d e ]something[ / c o d e ] button missing in here! The above rule posted as plain text reads like this:

If expression headers matches "X-SPAM-Level: [*][*][*][*][*][*]" Move "SPAM"

<P>I am not sure I do understand you right but if I do you could back up my request for analog spam level markers (<A href="http://community.pmail.com/forums/thread/4131.aspx">http://community.pmail.com/forums/thread/4131.aspx</A>) and use rules like</P> <P><EM>If expression headers matches "X-SPAM-Level: [ * ][ * ][ * ][ * ][ * ][ * ]*" Move "SPAM"</EM></P> <P>(remove the spaces in all [ * ])</P> <P>Rainer</P> <P>P.S. There is a [ c o d e ]something[ / c o d e ] button missing in here! The above rule posted as plain text reads like this:</P> <P>If expression headers matches "X-SPAM-Level: [*][*][*][*][*][*]" Move "SPAM"</P>

I was looking at moving to a users IMAP Account but being able to select which sub folder..

So - If expression headers matches "X-SPAM-Level:  Move to UsersMailBox/ IMAP SubFolder3

This is the one thing I really miss in Mercury [:(]
 

<p>I was looking at moving to a users IMAP Account but being able to select which sub folder..</p><p>So - If expression headers matches "X-SPAM-Level:  Move to UsersMailBox/ IMAP SubFolder3</p><p>This is the one thing I really miss in Mercury [:(]  </p>
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft