I found that my emails were not being processed by imap2script for the last couple of days today and tracked it down to the configuration parameters changing on imap2script.
When stopping and starting the script I got this in the error log:
2021/02/21 17:21:52 [FATAL] Error reading config file $HOME/imap2script/imap2script_config.json: json: cannot unmarshal object into Go value of type main.cfgData
When comparing the instructions here to my configuration script I found that the recommended arguments changed from this:
{
"Host": "mail.us.opalstack.com",
"Port": 993,
"User": "mailuser",
"Pass": "password",
"Folder": "INBOX",
"ScriptPath": "/path/to/mailscript_example.py",
"Timeout": 900
}
to this:
[{
"Host": "mail.us.opalstack.com",
"Port": 993,
"User": "mailuser",
"Pass": "password",
"Folder": "INBOX",
"Scripts": ["/path/to/mailscript_example.py"],
"Timeout": 900,
"DeleteAfter": false
}]
Updating the configuration file fixed the issue and now my emails are being processed again.
I just wanted to alert anyone that comes across the same issue to help save some time.
It would be great if we could subscribe to changes made to the instruction wikis to catch issues like this early.