run a script when a user move an email with IMAP

Discussion for developers using MailEnable.
Post Reply
marco.gazzin
Posts: 2
Joined: Fri Nov 17, 2023 3:10 pm

run a script when a user move an email with IMAP

Post by marco.gazzin »

Hello,

I want to run a script when the user move an email to the Junk folder.
In postfix this is possible with Sieve scripts.
Is this possible in ME?

Admin
Site Admin
Posts: 1097
Joined: Mon Jun 10, 2002 6:31 pm
Location: Melbourne, Victoria, Australia

Re: run a script when a user move an email with IMAP

Post by Admin »

Sorry, there is not a way to do this on the server.

marco.gazzin
Posts: 2
Joined: Fri Nov 17, 2023 3:10 pm

Re: run a script when a user move an email with IMAP

Post by marco.gazzin »

Thanks for your reply.
Suppose I have an external program that does this.
Suppose I have a postoffice with name 'myspamham' and one mailbox with name 'spamham' that has two folders: 'ham' and 'spam'.
If this external program copies .MAI files to the two folders, how can these emails be read through IMAP?
I have made a test and removed _index.xml file but I can see that email only with the web interface, not with IMAP connection.

Admin
Site Admin
Posts: 1097
Joined: Mon Jun 10, 2002 6:31 pm
Location: Melbourne, Victoria, Australia

Re: run a script when a user move an email with IMAP

Post by Admin »

If you add or change a file in the filesystem, you should create a file called _change.dty in that folder. This will instruct the services to update the index file. You don't want to delete the index file since it contains message flags and other things that will be lost if deleted.

Post Reply