This program was create to post mails received from different mailing list into different Slack channels, so that our members could read and comment on the mails with in our internal communication platform. This program is make to run on linux, don't know if it runs on other operation systems.
The first time you run the program, it will create a config example in the location ~/.config/imap2slack/default.toml.
Edit the default.toml config file. Config the following information
serviceIffalseit only checks for mails ones. Iftrueit continues to check for mails.sleepnumber of minutes to wait before checking for new mail again.mark_mail_as_seenIffalsethe mails will not be marked as read. Iftruethe mails will be marked as read.
ìmapThe url for the imap serverportThe port no. for the imap serverusernameThe usernamepasswordThe password
webhookEnter the url for the Slack inbound hookusernameWhat should the username be?emojiSelect a default or custom emoji
channelThe name of the channel that you want to post the mail inmailboxThe dir to the mail box (no spaces)filterThe name of the filter (optional)
Both contains and does_not_contains have to be satisfied before a mail is posted.
If a filter is mentioned in default.toml, but does not exist in filters.toml a empty instance are created in the config file.
case_sensitiveif case sensitivetrue/falsecontainsa toml array of words that the subject of the mail should containdoes_not_containsa toml array of words that the subject of the mail should not contain