Compare commits

...

6 Commits

Author SHA1 Message Date
jokob-sk
502a331754 docs 2025-07-05 07:33:42 +10:00
Jokob @NetAlertX
6203c3c257 Merge pull request #1108 from scalerow/bugfix/unifimp_not_running
nax_pyunifi.controller not found
2025-07-05 07:23:00 +10:00
Jan Fredrik Sundblom
c7d9ef97ee nax_pyunifi.controller not found
Could not import nax_pyunifi.controller, pyunifi.controller works as expected.
2025-07-04 15:46:40 +02:00
GitHub Actions
608fc5bbd0 Add release tweet for v25.7.3 - 🌍 Arabic translation and various fixes
Some checks are pending
Code checks / check-url-paths (push) Waiting to run
docker / docker_dev (push) Waiting to run
Deploy MkDocs / deploy (push) Waiting to run
2025-07-03 22:07:40 +00:00
jokob-sk
dbf7104dd0 docs, smtp logging 2025-07-04 07:41:01 +10:00
jokob-sk
1f26de4b76 docs, smtp logging 2025-07-04 07:21:18 +10:00
6 changed files with 72 additions and 30 deletions

4
.github/tweet.md vendored
View File

@@ -1,2 +1,2 @@
🎉 New release: **v25.6.7 - Legacy upgrade removal and Fully Qualified Domain Names 🆎** is live! 🚀
Check it out here: https://github.com/jokob-sk/NetAlertX/releases/tag/v25.6.7
🎉 New release: **v25.7.3 - 🌍 Arabic translation and various fixes** is live! 🚀
Check it out here: https://github.com/jokob-sk/NetAlertX/releases/tag/v25.7.3

View File

@@ -1,6 +1,49 @@
# 📧 SMTP guides
# 📧 SMTP server guides
## Using the GMX SMTP server
The SMTP plugin supports any SMTP server. Here are some commonly used services to help speed up your configuration.
> [!NOTE]
> If you are using a self hosted SMTP server ssh into the container and verify (e.g. via ping) that your server is reachable from within the NetAlertX container. See also how to ssh into the container if you are running it as a [Home Assistant](./HOME_ASSISTANT.md) addon.
## Gmail
1. Create an app password by following the instructions from Google, you need to Enable 2FA for this to work.
[https://support.google.com/accounts/answer/185833](https://support.google.com/accounts/answer/185833)
2. Specify the following settings:
```python
SMTP_RUN='on_notification'
SMTP_SKIP_TLS=True
SMTP_FORCE_SSL=True
SMTP_PORT=465
SMTP_SERVER='smtp.gmail.com'
SMTP_PASS='16-digit passcode from google'
SMTP_REPORT_TO='some_target_email@gmail.com'
```
## Brevo
Brevo allows for 300 free emails per day as of time of writing.
1. Create an account on Brevo: https://www.brevo.com/free-smtp-server/
2. Click your name -> SMTP & API
3. Click Generate a new SMTP key
4. Save the details and fill in the NetAlertX settings as below.
```python
SMTP_SERVER='smtp-relay.brevo.com'
SMTP_PORT=587
SMTP_SKIP_LOGIN=False
SMTP_USER='user@email.com'
SMTP_PASS='xsmtpsib-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxx'
SMTP_SKIP_TLS=False
SMTP_FORCE_SSL=False
SMTP_REPORT_TO='some_target_email@gmail.com'
SMTP_REPORT_FROM='NetAlertX <user@email.com>'
```
## GMX
1. Go to your GMX account https://account.gmx.com
2. Under Security Options enable 2FA (Two-factor authentication)
@@ -21,21 +64,3 @@
SMTP_REPORT_TO='some_target_email@gmail.com'
```
## Using the Gmail SMTP server
1. Create an app password by following the instructions from Google, you need to Enable 2FA for this to work.
[https://support.google.com/accounts/answer/185833](https://support.google.com/accounts/answer/185833)
2. Specify the following settings:
```python
SMTP_RUN='on_notification'
SMTP_SKIP_TLS=True
SMTP_FORCE_SSL=True
SMTP_PORT=465
SMTP_SERVER='smtp.gmail.com'
SMTP_PASS='16-digit passcode from google'
SMTP_REPORT_TO='some_target_email@gmail.com'
```

0
front/php/templates/language/cs_cz.json Normal file → Executable file
View File

View File

@@ -66,14 +66,13 @@ def main():
new_notifications = notifications.getNew()
# mylog('verbose', [f'[{pluginName}] new_notifications: ', new_notifications])
# mylog('verbose', [f'[{pluginName}] SMTP_SERVER: ', get_setting_value("SMTP_SERVER")])
# mylog('verbose', [f'[{pluginName}] SMTP_PORT: ', get_setting_value("SMTP_PORT")])
# mylog('verbose', [f'[{pluginName}] SMTP_SKIP_LOGIN: ', get_setting_value("SMTP_SKIP_LOGIN")])
mylog('verbose', [f'[{pluginName}] SMTP_SERVER: ', get_setting_value("SMTP_SERVER")])
mylog('verbose', [f'[{pluginName}] SMTP_PORT: ', get_setting_value("SMTP_PORT")])
mylog('verbose', [f'[{pluginName}] SMTP_SKIP_LOGIN: ', get_setting_value("SMTP_SKIP_LOGIN")])
# mylog('verbose', [f'[{pluginName}] SMTP_USER: ', get_setting_value("SMTP_USER")])
# mylog('verbose', [f'[{pluginName}] SMTP_PASS: ', get_setting_value("SMTP_PASS")])
# mylog('verbose', [f'[{pluginName}] SMTP_SKIP_TLS: ', get_setting_value("SMTP_SKIP_TLS")])
# mylog('verbose', [f'[{pluginName}] SMTP_FORCE_SSL: ', get_setting_value("SMTP_FORCE_SSL")])
# mylog('verbose', [f'[{pluginName}] SMTP_PASS: ', get_setting_value("SMTP_PASS")])
mylog('verbose', [f'[{pluginName}] SMTP_SKIP_TLS: ', get_setting_value("SMTP_SKIP_TLS")])
mylog('verbose', [f'[{pluginName}] SMTP_FORCE_SSL: ', get_setting_value("SMTP_FORCE_SSL")])
# mylog('verbose', [f'[{pluginName}] SMTP_REPORT_TO: ', get_setting_value("SMTP_REPORT_TO")])
# mylog('verbose', [f'[{pluginName}] SMTP_REPORT_FROM: ', get_setting_value("SMTP_REPORT_FROM")])

View File

@@ -12,7 +12,7 @@ import sys
import requests
from requests import Request, Session, packages
from requests.packages.urllib3.exceptions import InsecureRequestWarning
from nax_pyunifi.controller import Controller
from pyunifi.controller import Controller
# Register NetAlertX directories

View File

@@ -38,6 +38,24 @@ Run the script with the required parameters:
### Example Commands
#### Install Requirements
You will need to install dependencies in the container:
```bash
pip install paramiko
```
You could achieve this by mounting a custom cron file to `/etc/crontabs/root`:
```bash
# Schedule cron jobs
* * * * * /app/back/cron_script.sh
* * * * * /opt/venv/bin/python3 -c "import paramiko" || (/opt/venv/bin/pip install paramiko >/dev/null 2>&1 && sed -i '/pip install paramiko/d' /etc/crontabs/root)
```
Please double check the [default cron file](https://github.com/jokob-sk/NetAlertX/blob/main/install/crontab) hasn't changed.
#### Using Password Authentication
```sh
./script.py --host 192.168.1.1 --username admin --password mypassword --output /tmp/dnsmasq.leases