Repository navigation
Expand file tree
/
Copy pathnotifier.env.example
More file actions
87 lines (80 loc) · 4.44 KB
/
Copy pathnotifier.env.example
File metadata and controls
87 lines (80 loc) · 4.44 KB
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
# ==============================================================================
# go-notifier Configuration
# ==============================================================================
# Copy to notifier.env in your site directory (/home/${SITE_USER}/notifier.env)
#
# SECRETS CONFIGURATION (Stored in ./secrets/*.txt):
#
# Mandatory SMTP Secrets (Docker Compose 'secrets:'):
# smtp_host.txt - SMTP server hostname (e.g. smtp.example.com)
# smtp_port.txt - SMTP port (465 for SSL/TLS, 587 for STARTTLS)
# smtp_mail.txt - SMTP login / sender email address
# smtp_password.txt - SMTP password / app password
#
# Optional Messenger & Alert Secrets (Mounted via volume into /etc/notifier/secrets/):
# admin_emails.txt - Admin emails allowed to receive messenger alerts (comma/newline-separated).
# Emails sent to other recipients (e.g. customer orders, password resets)
# are routed exclusively to SMTP to protect user privacy.
#
# Telegram:
# telegram_bot_token.txt - Telegram Bot API token (e.g. 123456789:ABCdefGHIjkl...)
# telegram_chat_id.txt - Target chat, group, or channel ID (e.g. -1001234567890 or 123456789)
#
# Matrix:
# matrix_url.txt - Direct Client-Server API URL to the Synapse / homeserver
# (e.g. https://matrix.example.com or https://synapse.example.com:8448).
# NOTE: go-notifier does not query .well-known/matrix/client; specify
# the direct homeserver endpoint, not the root organization domain.
# Unsure? Check https://matrix.org/.well-known/matrix/client
# and use the base_url.
# matrix_room_id.txt - Internal room ID (e.g. !abcdef:matrix.example.com or !opaque-v12_roomid)
# matrix_access_token.txt - Matrix bot / user access token
#
# ntfy:
# ntfy_url.txt - ntfy server URL (e.g. https://ntfy.sh or https://ntfy.example.com)
# ntfy_topic.txt - Target topic name
# ntfy_token.txt - Optional Bearer token for protected topics
# ==============================================================================
## Site name prefix for outgoing alert subjects (defaults to SITE_NAME or SITE_USER)
# SITE_NAME="My WordPress Site"
## Sender name for SMTP messages (defaults to SITE_NAME)
# SMTP_FROM_NAME="WordPress Notifications"
## Rate limiting settings (0 disables rate limiting)
# NOTIFY_RATE_LIMIT_PER_MINUTE=10
# NOTIFY_BURST=5
## Maximum file attachment size in MB (0 disables limit)
# NOTIFY_MAX_ATTACHMENT_SIZE_MB=10
## Default active channels for admin alerts (comma-separated: smtp,telegram,matrix,ntfy)
## Default: all configured and enabled messenger channels + smtp
# NOTIFY_CHANNELS=smtp,matrix
# ------------------------------------------------------------------------------
# Granular Routing Rules (Subject Regex Matching)
# ------------------------------------------------------------------------------
# You can define an unlimited number of custom routing rules by matching the
# outgoing email subject against regular expressions. Each rule is identified
# by a UNIQUE <NAME> (e.g. WORDFENCE, FORMS, ORDERS, BACKUP) using this pattern:
#
# NOTIFY_RULE_<NAME>_MATCH="<regex>" - Regular expression to match subject
# NOTIFY_RULE_<NAME>_TARGETS="smtp,telegram,..." - Destination channels for matched alerts
# NOTIFY_RULE_<NAME>_ATTACHMENTS=true|false - Forward attachments to messenger channels
#
# IMPORTANT:
# - Each <NAME> MUST be unique (uppercase alphanumeric and underscores).
# - Regular expressions MUST be specific and mutually exclusive. If an email
# subject matches multiple rules, rule evaluation order is non-deterministic.
# - If an email does not match any custom rule, it is routed to NOTIFY_CHANNELS.
#
## Example 1: Route Wordfence and security alerts (text-only):
# NOTIFY_RULE_WORDFENCE_MATCH="Wordfence|Security Alert|Attack"
# NOTIFY_RULE_WORDFENCE_TARGETS="smtp,matrix"
# NOTIFY_RULE_WORDFENCE_ATTACHMENTS=false
#
## Example 2: Route Contact Form submissions (with attachments):
# NOTIFY_RULE_FORMS_MATCH="Job Application|Contact Form|Resume"
# NOTIFY_RULE_FORMS_TARGETS="smtp,ntfy"
# NOTIFY_RULE_FORMS_ATTACHMENTS=true
#
## Example 3: Route E-commerce orders (text-only):
# NOTIFY_RULE_ORDERS_MATCH="New Order|Order #[0-9]+"
# NOTIFY_RULE_ORDERS_TARGETS="smtp,telegram"
# NOTIFY_RULE_ORDERS_ATTACHMENTS=false