-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaccounts.example.ini
111 lines (89 loc) · 4.32 KB
/
accounts.example.ini
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
# Copyright 2020 Adam Chalkley
#
# https://github.com/atc0005/check-mail
#
# Licensed under the MIT License. See LICENSE file in the project root for
# full license information.
############################################
# About
############################################
# This example file provides the supported configuration file settings for
# using the Client Credentials OAuth2 flow to connect to an IMAP server. See
# other example config files for alternative authentication options (e.g.,
# Basic Authentication).
#
# See https://en.wikipedia.org/wiki/INI_file for additional information
# regarding the format of this configuration file.
# NOTE:
#
# As of Q3 2022 Microsoft Office 365 (O365) has disabled basic authentication.
# OAuth2 authentication is required for O365.
# TODO:
#
# 1) Rename this file to accounts.ini
# 2a) Place within a location supported by the list-emails application to be
# automatically recognized (see README.md)
# 2b) Place the accounts.ini file anywhere you like and use the CLI flag to
# specify its location.
###################################################################
# GLOBAL SETTINGS
###################################################################
[DEFAULT]
# auth_type is one of "basic" for Basic Authentication (username/password) or
# "oauth2" for an OAuth2 Client Credentials flow. This example configuration
# file illustrates using the OAuth2 Client Credentials Flow, so this value is
# set to oauth2 to match that intent.
auth_type = oauth2
# Change this to whatever your primary email server is named
server_name = outlook.office365.com
# This shouldn't need to be changed as most IMAP servers listen on this port
server_port = 993
# client_id is the ID associated with the application registration. This is
# provided by the Azure AD administrator who registered the application for
# you.
#
# The example value was pulled from
# https://www.oauth.com/oauth2-servers/client-registration/client-id-secret/
client_id = ZYDPLLBWSK3MVQJSIYHB1OR2JXCY0X2C5UJ2QAR2MAAIT5Q
# client_secret is the client secret or "password" created upon application
# registration. This is provided by the Azure AD administrator who registered
# the application for you.
#
# The example value was pulled from
# https://fusionauth.io/blog/2020/08/06/securely-implement-oauth-vuejs
client_secret = _djgA8heFo0WSIMom7U39WmGTQFHWkcD8x-A1o-4sro
# scopes is a comma-separated list of permissions needed by the application.
# If using the scopes defined by the application registration you must use the
# RESOURCE/.default format.
scopes = "https://outlook.office365.com/.default"
# endpoint_token_url is as the OAuth2 provider's token endpoint URL. The
# example below assumes Microsoft Office 365 (O365). Note that the example
# tenant_id value is embeded between the base URL and sub-URI components of
# the URL. Other OAuth2 providers use generic endpoint URLs.
endpoint_token_url = "https://login.microsoftonline.com/6029c1d9-aa2f-4227-8f7c-0c23224a0fa9/oauth2/v2.0/token"
###################################################################
# ACCOUNTS
###################################################################
# Each email account that you wish to monitor requires a separate section
# that begins with a section header of [account_name]. For each account you
# may specify multiple folders to check. Each folder name should be
# double-quoted and comma separated. See the sample entries below for an
# example.
#
# NOTE: Specifying username or password key/value pairs is not supported when
# using OAuth2 authentication.
[email1]
shared_mailbox = [email protected]
# Here is an example of three folders that need to be checked. The last folder
# is found beneath the Inbox folder on the account. That hierarchy is denoted
# here by naming the Inbox folder followed by a slash and then the subfolder
# name. The Inbox folder is not case-sensitive, but all other folders *are*
# case-sensitive.
folders = "Inbox", "Junk EMail", "Trash", "INBOX/Current Reporting"
[email2]
shared_mailbox = [email protected]
# As noted previously, all folder names aside from Inbox are case-sensitive.
# If the folder is shown in your mail client as Junk EMail, it should be
# listed below (double-quoted) in exactly the same way. If it is instead Junk
# Email (not the lowercase letter m), that exact string must be used here.
folders = "Inbox", "Junk EMail"