[
    {
        "filter": [
            {
                "field": "From",
                "match": "e-billet@sncf.fr",
                "mimeType": "message/rfc822",
                "scope": "Ancestors"
            },
            {
                "match": "^i0CV",
                "mimeType": "text/plain",
                "scope": "Descendants"
            }
        ],
        "function": "parsePdf",
        "mimeType": "application/pdf",
        "script": "sncf.js"
    },
    {
        "filter": [
            {
                "match": "^i[01]CV",
                "mimeType": "text/plain",
                "scope": "Current"
            }
        ],
        "function": "parseSncfBarcode",
        "mimeType": "text/plain",
        "script": "sncf.js"
    },
    {
        "filter": [
            {
                "field": "From",
                "match": "UNITTEST-e-billet@sncf.fr",
                "mimeType": "message/rfc822",
                "scope": "Ancestors"
            }
        ],
        "function": "parseSncfPdfText",
        "mimeType": "text/plain",
        "script": "sncf.js"
    },
    {
        "filter": [
            {
                "match": "^2200",
                "mimeType": "application/octet-stream",
                "scope": "Descendants"
            }
        ],
        "function": "parseSecutixPdf",
        "mimeType": "application/pdf",
        "script": "sncf.js"
    },
    {
        "filter": [
            {
                "field": "From",
                "match": "oui.sncf",
                "mimeType": "message/rfc822",
                "scope": "Ancestors"
            },
            {
                "field": "From",
                "match": "noreply@connect.sncf",
                "mimeType": "message/rfc822",
                "scope": "Ancestors"
            }
        ],
        "function": "parseOuiEmail",
        "mimeType": "text/html",
        "script": "sncf.js"
    },
    {
        "filter": [
            {
                "field": "From",
                "match": "ne-pas-repondre@pasngr.ouigo.com",
                "mimeType": "message/rfc822",
                "scope": "Ancestors"
            }
        ],
        "function": "parseOuigoTicket",
        "mimeType": "application/pdf",
        "script": "sncf.js"
    },
    {
        "filter": [
            {
                "field": "From",
                "match": "@ter-sncf.fr",
                "mimeType": "message/rfc822",
                "scope": "Ancestors"
            },
            {
                "field": "From",
                "match": "@ter.fr",
                "mimeType": "message/rfc822",
                "scope": "Ancestors"
            }
        ],
        "function": "parseTerConfirmation",
        "mimeType": "text/html",
        "script": "sncf.js"
    },
    {
        "filter": [
            {
                "field": "From",
                "match": "ne-pas-repondre@pasngr.ouigo.com",
                "mimeType": "message/rfc822",
                "scope": "Ancestors"
            }
        ],
        "function": "parseOuigoConfirmation",
        "mimeType": "text/html",
        "script": "sncf.js"
    },
    {
        "filter": [
            {
                "match": "^h0FV",
                "mimeType": "text/plain",
                "scope": "Current"
            }
        ],
        "function": "parseSncfCarte",
        "mimeType": "text/plain",
        "script": "sncf.js"
    },
    {
        "filter": [
            {
                "match": "^h0FV",
                "mimeType": "text/plain",
                "scope": "Descendants"
            }
        ],
        "function": "parseSncfCartePdf",
        "mimeType": "application/pdf",
        "script": "sncf.js"
    },
    {
        "filter": [
            {
                "match": "^\\x01UcP",
                "mimeType": "application/octet-stream",
                "scope": "Descendants"
            }
        ],
        "function": "parseSncfNormandie",
        "mimeType": "application/pdf",
        "script": "sncf.js"
    }
]
