-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathmail2most.conf
224 lines (209 loc) · 9.96 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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# An example Mail2Most configuration
[General]
# File contains the default file location where mail2most stores its data
File = "data.json"
# RunAsService true:
# check regularly using TimeInterval for new emails
# false:
# just check once when u start - requires to restart mail2most for checking again
RunAsService = true
# 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
# Mail2Most saves the information about already send emails on its own
ReadOnly = true
# ImapTLS allows you to enable / disable tls encryption whithin the imap protocol (disable when using STARTLS)
ImapTLS = true
# StartTLS allows you to enable / disable tls encryption whithin the imap protocol using STARTTLS
StartTLS = true
# VerifyTLS disables certificate validation (only disable for self-signed certs)
VerifyTLS = true
# Limit allows you to limit the amount of emails read from the mail server, if set to 0 its unlimited
Limit = 0
# GenerateLocalUIDs creates a uid from message data instead of fetching the uid from the server
# this can be helpfull when getting Invalid messageset errors since some DoveCot mailserver did not implement IMAP correctly
GenerateLocalUIDs = false
# 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
# BodyOnly will post only the mail body
BodyOnly = false
# SkipEmptyMessages - only post messages with non empty email bodys
SkipEmptyMessages = false
# StripHTML will remove all HTML tags bevor sending a msg to mattermost
StripHTML = true
# ConvertToMarkdown will convert html mails to markdown for better readability in mattermost
# if this option is set to true the StripHTML option is ignored
ConvertToMarkdown = true
# HideFrom allows you to hide the From Address in mattermost messages
HideFrom = false
# HideFromEmail true will only display the username
HideFromEmail = false
# allow posting mail attachments into mattermost
MailAttachments = true
# BodyPrefix adds a prefix to the message body e.g:
# BodyPrefix = "**This content was forwarded by Mail2Most and might be reformatted**"
BodyPrefix = ""
# BodySuffix adds a suffix to the message body e.g:
# BodySuffix = "**Disclaimer: This content was forwarded by Mail2Most and might be reformatted**"
BodySuffix = ""
# 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 by checking the unseen mail flag
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"
# IgnoreMailErrorNotifications sets if Delivery Status Notifications are ignored or not
IgnoreMailErrorNotifications = true
#[[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"
Username = "username"
Password = "password"
# ReadOnly does not change any flags on emails
# Mail2Most saves the information about already send emails on its own
ReadOnly = true
# ImapTLS allows you to enable / disable tls encryption whithin the imap protocol (disable when using STARTLS)
ImapTLS = false
# StartTLS allows you to enable / disable tls encryption whithin the imap protocol using STARTTLS
StartTLS = true
# GenerateLocalUIDs creates a uid from message data instead of fetching the uid from the server
# this can be helpfull when getting Invalid messageset errors since some DoveCot mailserver died not implement IMAP correctly
GenerateLocalUIDs = false
#[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
# BodyOnly will post only the mail body
BodyOnly = 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
# HideFromEmail true will only display the username
HideFromEmail = false
# allow posting mail attachments into mattermost
MailAttachments = true
# BodyPrefix adds a prefix to the message body e.g:
# BodyPrefix = "**This content was forwarded by Mail2Most and might be reformatted**"
BodyPrefix = ""
# BodySuffix adds a suffix to the message body e.g:
# BodySuffix = "**Disclaimer: This content was forwarded by Mail2Most and might be reformatted**"
BodySuffix = ""
#[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 by checking the unseen mail flag
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"
# EmailErrorNotifications sets if Delivery Status Notifications are ignored or not
IgnoreMailErrorNotifications = true
# 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
StartTLS = false
Limit = 10
# 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
BodyOnly = false
BodyPrefix = ""
BodySuffix = ""
# 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