Artifact
ef25ee84343f771d769ed95eadf41ccb862ca0a03089313ed086873d944939f1:
- File
smtp2tg.toml.example
— part of check-in
[1db9dbe390]
at
2024-11-28 15:44:44
on branch trunk
— This is kindda a HUGE rework. SMTP backend switched from SaMoToP to
mailin-embedded, resulting in:
* LMTP support dropped (I hope just temporary);
* no need to write anything to files as whole processing is done in memory;
* this also means we can return status - whether message was sent, was there
any errors etc, no internal queue exists now, SMTP server should handle
queueing from now on;
* possibility to deny mail to unknown/unconfigured recipients.
(user:
arcade,
size: 705)
[annotate]
[blame]
[check-ins using]
0000: 23 20 54 65 6c 65 67 72 61 6d 20 41 50 49 20 6b # Telegram API k
0010: 65 79 0a 61 70 69 5f 6b 65 79 20 3d 20 22 59 4f ey.api_key = "YO
0020: 55 5f 4b 4e 4f 57 5f 57 48 45 52 45 5f 54 4f 5f U_KNOW_WHERE_TO_
0030: 47 45 54 5f 54 48 49 53 22 0a 23 20 77 68 65 72 GET_THIS".# wher
0040: 65 20 74 6f 20 6c 69 73 74 65 6e 20 6f 6e 20 28 e to listen on (
0050: 73 6f 63 6b 65 74 73 20 61 72 65 20 6e 6f 74 20 sockets are not
0060: 73 75 70 70 6f 72 74 65 64 20 73 69 6e 63 65 20 supported since
0070: 30 2e 33 2e 30 29 0a 6c 69 73 74 65 6e 5f 6f 6e 0.3.0).listen_on
0080: 20 3d 20 22 30 2e 30 2e 30 2e 30 3a 32 35 22 0a = "0.0.0.0:25".
0090: 23 20 77 68 65 74 68 65 72 20 77 65 20 6e 65 65 # whether we nee
00a0: 64 20 74 6f 20 68 61 6e 64 6c 65 20 75 6e 6b 6e d to handle unkn
00b0: 6f 77 6e 20 61 64 72 65 73 73 65 73 0a 23 20 2d own adresses.# -
00c0: 20 72 65 6c 61 79 3a 20 73 65 6e 64 20 74 68 65 relay: send the
00d0: 6d 20 74 6f 20 64 65 66 61 75 6c 74 20 6f 6e 65 m to default one
00e0: 0a 23 20 2d 20 64 65 6e 79 3a 20 64 72 6f 70 20 .# - deny: drop
00f0: 74 68 65 6d 0a 75 6e 6b 6e 6f 77 6e 20 3d 20 22 them.unknown = "
0100: 72 65 6c 61 79 22 0a 0a 5b 72 65 63 69 70 69 65 relay"..[recipie
0110: 6e 74 73 5d 0a 23 20 74 68 65 72 65 20 73 68 6f nts].# there sho
0120: 75 6c 64 20 62 65 20 64 65 66 61 75 6c 74 20 72 uld be default r
0130: 65 63 69 70 69 65 6e 74 2c 20 67 65 74 27 73 20 ecipient, get's
0140: 73 6f 6d 65 20 64 65 62 75 67 20 69 6e 66 6f 20 some debug info
0150: 2b 20 6d 61 69 6c 20 74 68 61 74 20 77 65 0a 23 + mail that we.#
0160: 20 63 6f 75 6c 64 6e 27 74 20 64 65 6c 69 76 65 couldn't delive
0170: 72 20 28 69 66 20 65 6e 61 62 6c 65 64 29 0a 5f r (if enabled)._
0180: 20 3d 20 31 0a 23 20 6d 61 6b 65 20 73 75 72 65 = 1.# make sure
0190: 20 79 6f 75 20 71 75 6f 74 65 20 65 6d 61 69 6c you quote email
01a0: 73 2c 20 61 73 20 22 40 22 20 63 61 6e 27 74 20 s, as "@" can't
01b0: 67 6f 20 74 68 65 72 65 20 75 6e 71 75 6f 74 65 go there unquote
01c0: 64 2e 20 41 6e 64 20 62 79 20 64 65 66 61 75 6c d. And by defaul
01d0: 74 0a 23 20 77 65 20 6e 65 65 64 20 46 51 44 4e t.# we need FQDN
01e0: 73 0a 22 73 6f 6d 65 62 6f 64 79 40 65 78 61 6d s."somebody@exam
01f0: 70 6c 65 2e 63 6f 6d 22 20 3d 20 31 20 23 20 75 ple.com" = 1 # u
0200: 73 65 72 20 69 64 27 73 20 61 72 65 20 70 6f 73 ser id's are pos
0210: 69 74 69 76 65 0a 22 72 6f 6f 74 40 65 78 61 6d itive."root@exam
0220: 70 6c 65 2e 63 6f 6d 22 20 3d 20 2d 31 20 23 20 ple.com" = -1 #
0230: 67 72 6f 75 70 20 69 64 27 73 20 61 72 65 20 6e group id's are n
0240: 65 67 61 74 69 76 65 0a 0a 23 20 74 6f 20 6c 6f egative..# to lo
0250: 6f 6b 20 75 70 20 63 68 61 74 2f 67 72 6f 75 70 ok up chat/group
0260: 20 69 64 20 79 6f 75 20 63 61 6e 20 75 73 65 20 id you can use
0270: 64 65 62 75 67 20 73 65 74 74 69 6e 67 73 20 69 debug settings i
0280: 6e 20 54 65 6c 65 67 72 61 6d 20 63 6c 69 65 6e n Telegram clien
0290: 74 73 2c 0a 23 20 6f 72 20 73 6f 6d 65 20 62 6f ts,.# or some bo
02a0: 74 20 6c 69 6b 65 20 40 67 65 74 69 64 73 62 6f t like @getidsbo
02b0: 74 20 6f 72 20 40 52 61 77 44 61 74 61 42 6f 74 t or @RawDataBot
02c0: 0a .