Xml rules format specifications

The xml format used for rules and out of office message by Ovh Mail Migrator is based loosely on Gmail xml filters rules. Below we will describe what the xml should look like.

File format

Xml Description Number allowed (Minimum,Maximum) (Multiple = N), if 1 is minimum node is mandatory
<?xml version='1.0' encoding='UTF-8'?> Header 1,1
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:apps='http://schemas.google.com/apps/2006'> Reference for feed, Mandatory 1,1
<title>Mail Filters</title> Title of the file 0,1
<id>1242</id> id of the file 0,1
<updated>2018-10-18T12:46:43Z</updated> Creation/Update time 0,1
<author> Author of the file 0,1
 <name>Justone test</name> Author name 1
 <email>this@atest.oh</email> Email of the author 0,1
</author> End of author block 0,1
<entry> Header + reference 1,N
 <category term='filter'></category> Category Type can be Filter or Oof 1
 <title>Mail Filter</title> filter Display name 1
 <id>a:1</id> id of the filter 1
 <updated>2018-10-18T12:46:43Z</updated> Creation/Update time 0,1
 <content></content> Content field can be used for description, will be unused by OvhMailMigrator 0,1
 <apps:property name='subject' value='Ovh Mail Migrator'/> Rule to apply 1,N
 <apps:property name='shouldMarkAsRead' value='true'/> Rule to apply 1,N
</entry> end of entry block 1,N
<entry> Header + reference 1,N
 <category term='oof'></category> Category Type can be Filter or Oof 1
 <title>out of office</title> filter Display name 1
 <id>a:1</id> id of the out of office unused by OvhMailMigrator 1
 <updated>2018-10-18T12:46:43Z</updated> Creation/Update time 0,1
 <content></content> Message for out of office 1
</entry> end of entry block 1,N
</feed> end of feed block 1,1

Filter Rules explanations

Every rule come under the format <apps:property name='hasTheWord' value='Test'/> where name is the type of the rule and value is the query used by the rule

Rule Type Description Query modifiers Example
from filter on the sender of the message Query rules <apps:property name='from' value='thisis@atest.ovh'/> filter message sent by thisis@atest.ovh
to filter on the recipients of the message Query rules <apps:property name='to' value='thisis@atest.ovh'/> filter message sent to thisis@atest.ovh
subject filter on the subjet of the message, shortcut for hastheword filter with type subject Query rules <apps:property name='from' value='thisisatest'/> filter message with subject containing thisisatest
hastheword filter on a part of the message with a text, type can be subject,sender,recipient,header,body depending on the type on content you want to filter on Query rules <apps:property name='hastheword' value='thisisatest' type='body'/> filter message with body containing thisisatest
doesNotHaveTheWord filter on a part of the message, type can be subject,sender,recipient,header,body depending on the type on content you want to filter on Query rules <apps:property name='doesNotHaveTheWord' value='thisisatest' type='body'/> filter message with body that doesn't contain thisisatest
date filter on the date of the message Date rules <apps:property name='date' value='20180731'/> filter message with date of 31 july 2018
hasAttachment filter message that have attachments N/A <apps:property name='hasAttachment' value='true'/> filter message with attachments
ismeetingrequest filter message that are meeting request N/A <apps:property name='ismeetingrequest' value='true'/> filter meeting request
ismeetingresponse filter message that are meeting response N/A <apps:property name='ismeetingresponse' value='true'/> filter meeting response
ismeetingresponse filter message that are meeting response N/A <apps:property name='ismeetingresponse' value='true'/> filter meeting response
sensitivity filter message that have a certain value of sensivity, values can be Normal,Personal,Private,Confidential N/A <apps:property name='sensitivity' value='Personal'/> filter message that have 'Personal' sensivity
Size filter on the size of the message Size rules <apps:property name='size' value='45'/> filter message with date of 31 july 2018

Action explanations

Every action come under the format <apps:property name='shouldMarkAsRead' value='true'/> where name is the type of the action and value is the query used by the rule

Action Type Description Example
priority set the priority of the message <apps:property name='priority' value='2'/> set the priority to 2
label/moveto move the message <apps:property name='label' value='Test'/> move the message to the folder
copyto create a copy of the message in a folder <apps:property name='label' value='Test'/> copy the message to the folder
shouldtrash put the message in the deleted items <apps:property name='shouldtrash' value='true'/> move the message to the delete items
shoulddelete delete permanently the message <apps:property name='shoulddelete' value='true'/> delete the message
shouldmarkasread set the read flag on the message <apps:property name='shouldmarkasread' value='true'/> set the read flag on the message
shouldalwaysmarkasimportant
shouldstar
set the important flag on the message <apps:property name='shouldstar' value='true'/> set the important flag on the message
smartlabeltoapply
category
set the category of the message <apps:property name='category' value='test'/> set the category test of on the message
forwardto forward the message to another email <apps:property name='forwardto' value='this@atest.ovh'/> forward the message to this@atest.ovh
redirectto redirect the message to another email <apps:property name='redirectto' value='this@atest.ovh'/> redirect the message to this@atest.ovh
stop
stopprocessingrules
do not process rules if this rule is executed successfuly <apps:property name='stop' value='true'/> stop processing rules after executing this rule successfuly

Out of office explanations

It shoudl be unique or only the last one will be taken into account, it will be applied to internal and external mail.