@@ -8,7 +8,6 @@ For example we are using this application, to send push notifications via [ntfy]
8
8
messages. The example callback script [ ` callback/ntfy.sh ` ] ( callback/ntfy.sh ) illustrates, how to send those push
9
9
notifications for incoming emails.
10
10
11
-
12
11
## How to install
13
12
14
13
Make sure, you have ** Python 3** and ** virtualenv** installed. Clone the repository, enter the repository root and
@@ -27,7 +26,6 @@ the example file to any location you like and make your changes.
27
26
28
27
You might setup ** as many IMAP accounts** as you like within one configuration file.
29
28
30
-
31
29
## How to setup the callback script
32
30
33
31
In your ` config.ini ` you should provide for each mail account a callback script, that is called for each newly received
@@ -41,23 +39,23 @@ can be used to see all passed environment variables.
41
39
42
40
These environment variables with informations about the incoming message are passed to the callback script:
43
41
44
- | variable | example value | description |
45
- | -----------------------| -------------------------------| -----------------------------------------------------|
46
- | ` MESSAGE_ID ` | < [email protected] > | ` Message-Id ` header value
|
47
- | ` MESSAGE_REPLY_TO_ID ` | < [email protected] > | ` In-Reply-To ` header value
|
48
- | ` MESSAGE_DATE ` | 2023-07-12 23:31:07 | message date |
49
- | ` MESSAGE_SENDER ` | John Doe
< [email protected] > | complete
` Sender ` header value
|
50
- | ` MESSAGE_SENDER_NAME ` | John Doe | name part of ` Sender ` header value |
51
- | ` MESSAGE_SENDER_MAIL ` | [email protected] | mail part of
` Sender ` header value
|
52
- | ` MESSAGE_FROM ` | John Doe
< [email protected] > | complete
` From ` header value
|
53
- | ` MESSAGE_FROM_NAME ` | John Doe | name part of ` From ` header value |
54
- | ` MESSAGE_FROM_MAIL ` | [email protected] | mail part of
` From ` header value
|
55
- | ` MESSAGE_AUTHOR ` | John Doe
< [email protected] > | either
` MESSAGE_FROM ` or
` MESSAGE_SENDER ` |
56
- | ` MESSAGE_AUTHOR_NAME ` | John Doe | either ` MESSAGE_FROM_NAME ` or ` MESSAGE_SENDER_NAME ` |
57
- | ` MESSAGE_AUTHOR_MAIL ` | [email protected] | either
` MESSAGE_FROM_MAIL ` or
` MESSAGE_SENDER_MAIL ` |
58
- | ` MESSAGE_TO ` | Frank Doe
< [email protected] > | complete
` To ` header value
|
59
- | ` MESSAGE_TO_NAME ` | Frank Doe | name part of ` To ` header value |
60
- | ` MESSAGE_TO_MAIL ` | [email protected] | mail part of
` To ` header value
|
42
+ | variable | example value | description |
43
+ | -----------------------| --------------------------------- | -----------------------------------------------------|
44
+ | ` MESSAGE_ID ` | \ <[email protected] \ > | ` Message-Id ` header value
|
45
+ | ` MESSAGE_REPLY_TO_ID ` | \ <[email protected] \ > | ` In-Reply-To ` header value
|
46
+ | ` MESSAGE_DATE ` | 2023-07-12 23:31:07 | message date |
47
+ | ` MESSAGE_SENDER ` | John Doe
\ <[email protected] \ > | complete
` Sender ` header value
|
48
+ | ` MESSAGE_SENDER_NAME ` | John Doe | name part of ` Sender ` header value |
49
+ | ` MESSAGE_SENDER_MAIL ` | [email protected] | mail part of
` Sender ` header value
|
50
+ | ` MESSAGE_FROM ` | John Doe
\ <[email protected] \ > | complete
` From ` header value
|
51
+ | ` MESSAGE_FROM_NAME ` | John Doe | name part of ` From ` header value |
52
+ | ` MESSAGE_FROM_MAIL ` | [email protected] | mail part of
` From ` header value
|
53
+ | ` MESSAGE_AUTHOR ` | John Doe
\ <[email protected] \ > | either
` MESSAGE_FROM ` or
` MESSAGE_SENDER ` |
54
+ | ` MESSAGE_AUTHOR_NAME ` | John Doe | either ` MESSAGE_FROM_NAME ` or ` MESSAGE_SENDER_NAME ` |
55
+ | ` MESSAGE_AUTHOR_MAIL ` | [email protected] | either
` MESSAGE_FROM_MAIL ` or
` MESSAGE_SENDER_MAIL ` |
56
+ | ` MESSAGE_TO ` | Frank Doe
\ <[email protected] \ > | complete
` To ` header value
|
57
+ | ` MESSAGE_TO_NAME ` | Frank Doe | name part of ` To ` header value |
58
+ | ` MESSAGE_TO_MAIL ` | [email protected] | mail part of
` To ` header value
|
61
59
62
60
The variables ` MESSAGE_AUTHOR ` , ` MESSAGE_AUTHOR_NAME ` and ` MESSAGE_AUTHOR_MAIL ` are some kind of special. By default
63
61
they contain the ` From ` header value. But if the ` From ` header is not present, the ` Sender ` header value is used
@@ -81,7 +79,6 @@ ANOTHER_ADDITIONAL_VARIABLE=test2
81
79
Take a look at [ ` callback/ntfy.sh ` ] ( callback/ntfy.sh ) as an example, how to send push notifications for incoming email
82
80
messages (via [ ntfy] ( https://ntfy.sh/ ) ) by using some of the provided environment variables.
83
81
84
-
85
82
## How to run
86
83
87
84
Assuming your configuration file is called ` config.ini ` , you might test the settings first via:
@@ -101,9 +98,9 @@ configured account.
101
98
102
99
If the callback mechanism works as expected, feel free to setup a cronjob or Systemd service.
103
100
104
-
105
101
## FAQ
106
102
107
103
### Does it work with gmail or other providers using OAuth?
108
104
109
- OAuth is currently not supported as we don't need it for our daily work. Feel free to provide a pull request. We also take donations for improvements like that.
105
+ OAuth is currently not supported as we don't need it for our daily work. Feel free to provide a pull request. We also
106
+ take donations for improvements like that.
0 commit comments