forked from Virtomize/mail2most
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmail2most.conf
165 lines (150 loc) · 6.83 KB
/
mail2most.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# An example Mail2Most configuration
[General]
# File contains the default file location where mail2most stores its data
File = "data.json"
# global time interval for checking mails in seconds
TimeInterval = 10
[Logging]
# Loglevel = ["info", "debug", "error"]
Loglevel = "info"
# LogType = ["json", "text"]
LogType = "text"
# Output = ["stdout", "logfile"]
Output = "stdout"
# 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","alice@example.com"]
# 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 = ["test@example.com"]
# To filters for defined to addresses
To = ["info@example.com"]
# 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 and overwrites the default
[Profile.Mail]
ImapServer = "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
#[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","alice@example.com"]
# 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 and overwrites the default
[Profile.Filter]
# Folders filters your mails only in specific email folders
Folders = ["some-email-folder", "some-other-email-folder"]
# Unseen lets you process unseen mails only
Unseen = false
# From filters for defined from addresses
From = ["test@example.com"]
# To filters for defined to addresses
To = ["info@example.com"]
# 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"
# 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]
ImapServer = "mail.example.com:993"
Username = "username"
Password = "password"
ReadOnly = true
ImapTLS = true
# same with mattermost if you have another mattermost server you can use them or the same as in the profile before
[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","alice@example.com"]
# Broadcast allows you to set @channel, @all, @here etc at the begining fo the message
# Broadcast = ["@channel", "@all"]
Broadcast = []
SubjectOnly = false
# 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