-
Notifications
You must be signed in to change notification settings - Fork 0
/
mailToTelegramForwarder.conf.j2
75 lines (60 loc) · 2.42 KB
/
mailToTelegramForwarder.conf.j2
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
[Mail]
# IMAP user
user: {{ IMAP_USER }}
# IMAP password
password: {{ IMAP_PASSWORD }}
# IMAP server
server: {{ IMAP_SERVER }}
# IMAP port (default: 993)
#port: <IMAP mail server port like 993>
# IMAP connection timout in seconds (default: 60)
#timeout: 60
# use timer in seconds
#refresh: 10
# disconnect after each loop, not recommended for short refresh rates: [True|False]
#disconnect: False
# IMAP folder on server to check, ex.: INBOX (default)
#folder: <IMAP (sub)folder on server>
# This is from IMAP, "ALL" is also useful. Check IMAP specs for more info.
# Placeholder "${lastUID}" is used to process new mails only (since last loop)
# Ex.:
# UID: Mail ID on server
# UNSEEN: Unseen mails, and mark them as seen
# HEADER <header field> "<search string>": Search mails by header, ex.:
search: (UID ${lastUID}:* UNSEEN HEADER Subject "{{ MAIL_SUBJECT }}")
# Default:
#search: (UID ${lastUID}:* UNSEEN)
# Read mails received before application was started (default: False)
# see command line option "-o" or "--read-old-mails" for one-time use
read_old_mails: {{ READ_OLD_MAILS }}
# max length (characters) of forwarded mail content
#max_length: 2000
# ignore inline image by regular expression
#ignore_inline_image: (spacer\.gif)
# Cut string from subject. Useful for automations with the same subject prefix.
# Usually, you don't like to see those prefixes. You need to escape characters
# like "[" or "."
cut_from_subject: {{ CUT_FROM_SUBJECT }}
# Not yet available:
# # use IMAPE IDLE (push) mode [True|False]
# push_mode: False
# Not yet available (see IMAP UNSEEN: If used all found mails will be marked as seen for now):
# # mark forwarded message as read: [True|False]
# mark_as_read: False
[Telegram]
# from @BotFather: Like "<Bot ID:Key>"
bot_token: {{ TELEGRAM_BOT_TOKEN }}
# ID of TG chat or user (<ID>, ex.: 123456) who gets forwarded messages.
# ID can be found by @myidbot (Bot commands: /start + /getid)
forward_to_chat_id: {{ TELEGRAM_CHAT_ID }}
# markdown version: [1|2]
#markdown_version: 2
# prefer HTML messages: [True|False]
# Prefers HTML Content over plain text part of mail and send HTML formatted messages to Telgram
#prefer_html: True
# forward attachments: [True|False]
forward_mail_content: {{ FORWARD_MAIL_CONTENT }}
# forward attachments: [True|False]
#forward_attachment: True
# forward embedded images: [True|False]
#forward_embedded_images: True