-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from cseeger-epages/issue/16
Issue/16
- Loading branch information
Showing
6 changed files
with
278 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,10 +16,70 @@ | |
# Logfile is used if Output is set to "logfile" | ||
Logfile = "mail2most.log" | ||
|
||
# The DefaultProfile defines a set of defaults used in Profiles that do not define the specific section | ||
# if you create an empty Profile the DefaultProfile is used | ||
# if a Profile contains the section Mail, Mattermost or Filter this section will overwrite the sections from the Default Profile | ||
# at least an empty Profile has to be created for the DefaultProfile to be processed | ||
# only defining the DefaultProfile without having a [Profile] defined will not work | ||
[DefaultProfile] | ||
# The DefaultProfile.Mail defines a default mailserver | ||
# if your Profile hast no defined mailserver this information will be used | ||
[DefaultProfile.Mail] | ||
ImapServer = "default.mail.example.com:993" | ||
Username = "username" | ||
Password = "password" | ||
# ReadOnly does not change any flags on emails | ||
ReadOnly = true | ||
# ImapTLS allows you to enable / disable tls encryption whithin the imap protocol | ||
ImapTLS = true | ||
|
||
# The DefaultProfile.Mattermost defines a default mattermost server | ||
# if your Profile has no defined mattermost server this information will be used | ||
[DefaultProfile.Mattermost] | ||
URL = "https://default.mattermost.example.com" | ||
Team = "defaultTeam" | ||
# you can define username password | ||
Username = "username" | ||
Password = "password" | ||
# or accesstoken | ||
AccessToken = "mytoken" | ||
# Channels contains all channels to post your messages | ||
# if no channel is defined nothing is posted into a channel | ||
Channels = ["#default-channel"] | ||
# Users contains all users to post your message to, you can use the username or email address | ||
# if no users are defined nothing is posted to any user | ||
Users = ["bob","[email protected]"] | ||
# SubjectOnly will post only the mail subject | ||
SubjectOnly = false | ||
# StripHTML will remove all HTML tags bevor sending a msg to mattermost | ||
StripHTML = true | ||
# HideFrom allows you to hide the From Address in mattermost messages | ||
HideFrom= false | ||
|
||
# The DefaultProfile.Filter defines a default filter | ||
# if your Profile has no defined filter this information will be used | ||
[DefaultProfile.Filter] | ||
# Folders filters your mails only in specific email folders | ||
Folders = ["some-default-email-folder", "some-other-default-email-folder"] | ||
# Unseen lets you process unseen mails only | ||
Unseen = false | ||
# From filters for defined from addresses | ||
From = ["[email protected]"] | ||
# To filters for defined to addresses | ||
To = ["[email protected]"] | ||
# Subject filters if the email subject contains one of the defined strings | ||
Subject = ["example subject"] | ||
# TimeRange will only process mails that are not older than the defined time range | ||
TimeRange = "24h" | ||
|
||
#[[Profile]] defines a profile, you can have as many as you want | ||
[[Profile]] | ||
# IgnoreDefaults lets you ignore the DefaultProfile settings and forces to set everything in the Profile | ||
# this option should only be used if you try to overwrite a default with an empty value | ||
# the better way is to define the value only in the profile and not in the defaults | ||
IgnoreDefaults = false | ||
|
||
#[Profile.Mail] contains the mail server configuration | ||
#[Profile.Mail] contains the mail server configuration and overwrites the default | ||
[Profile.Mail] | ||
ImapServer = "mail.example.com:993" | ||
Username = "username" | ||
|
@@ -29,22 +89,27 @@ | |
# ImapTLS allows you to enable / disable tls encryption whithin the imap protocol | ||
ImapTLS = true | ||
|
||
#[Profile.Mattermost] contains the mattermost configuration | ||
#[Profile.Mattermost] contains the mattermost configuration and overwrites the default | ||
[Profile.Mattermost] | ||
URL = "https://mattermost.example.com" | ||
Team = "exampleTeam" | ||
# you can define username password | ||
Username = "username" | ||
Password = "password" | ||
# or accesstoken | ||
AccessToken = "mytoken" | ||
# Channels contains all channels to post your messages | ||
Channels = ["#some-channel"] | ||
# Users contains all users to post your message to, you can use the username or email address | ||
Users = ["bob","[email protected]"] | ||
# SubjectOnly will post only the mail subject | ||
SubjectOnly = false | ||
# StripHTML will remove all HTML tags bevor sending a msg to mattermost | ||
StripHTML = true | ||
# HideFrom allows you to hide the From Address in mattermost messages | ||
HideFrom= false | ||
|
||
#[Profile.Filter] contains all filters that are applied to your mails | ||
#[Profile.Filter] contains all filters that are applied to your mails and overwrites the default | ||
[Profile.Filter] | ||
# Folders filters your mails only in specific email folders | ||
Folders = ["some-email-folder", "some-other-email-folder"] | ||
|
@@ -61,6 +126,10 @@ | |
|
||
# you can define multiple profiles by adding another [[Profile]] | ||
[[Profile]] | ||
# IgnoreDefaults lets you ignore the DefaultProfile settings and forces to set everything in the Profile | ||
# this option should only be used if you try to overwrite a default with an empty value | ||
# the better way is to define the value only in the profile and not in the defaults | ||
IgnoreDefaults = false | ||
|
||
# you can use the same mailserver as in the other profile or even another one | ||
[Profile.Mail] | ||
|
@@ -74,21 +143,23 @@ | |
[Profile.Mattermost] | ||
URL = "https://mattermost.example.com" | ||
Team = "anotherTeam" | ||
# you can define username password | ||
Username = "username" | ||
Password = "password" | ||
# or accesstoken | ||
AccessToken = "mytoken" | ||
# you can even post to multiple channels if you want to | ||
Channels = ["#some-other-channel","#some-crazy-channel"] | ||
# Users contains all users to post your message to, you can use the username or email address | ||
Users = ["bob","[email protected]"] | ||
# Broadcast allows you to set @channel, @all, @here etc at the begining fo the message | ||
# Broadcast = ["@channel", "@all"] | ||
Broadcast = [] | ||
SubjectOnly = false | ||
|
||
# you are free to create another set of filters for your new profile | ||
[Profile.Filter] | ||
Folders = ["some-email-folder", "some-other-email-folder"] | ||
Unseen = false | ||
# or filter multiple from to or subjects | ||
From = ["[email protected]", "[email protected]"] | ||
To = ["[email protected]", "[email protected]"] | ||
Subject = ["example subject", "another subject"] | ||
TimeRange = "24h" | ||
# if you dont add for example [Profile.Filter] the filters defined in the [DefaultProfile.Filter] section are used | ||
|
||
|
||
# if you create an empty Profile the defaults were used | ||
[[Profile]] | ||
# setting IgnoreDefaults = true in an empty profile will result in an error since nothing is defined then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.