I've setup mail notification correctly and i receive mails and i've read the documentation about third party notification.
I've used this script that i've put in /usr/share/openmediavault/notification/sink.d/20discord
script:
Bash
#!/bin/bash
#CREATED BY XMON FOR OpenMediaVault
DISCORD_WEBHOOK='PUT YOUR WEBHOOK LINK HERE'
generate_post_data() {
cat <<EOF
{
"content": "",
"embeds": [{
"title": "${OMV_NOTIFICATION_SUBJECT}",
"description": "$(cat ${OMV_NOTIFICATION_MESSAGE_FILE})",
"color": "45973",
"footer": {
"text": "${OMV_NOTIFICATION_DATE}",
"icon_url": ""
}
}]
}
EOF
}
curl -H "Content-Type: application/json" -X POST -d "$(generate_post_data)" $DISCORD_WEBHOOK
Display More
When i hit the test button i receive the notification correctly both on discord and on email while the other daily notifications only arrive via email.
Nothing strange in the logs that I attach anyway
I had installed the flashmemory plugin but I uninstalled it
journalctl -u postfix@-.service
Code
-- Boot 07b10ae1a35e412892491ec22a7280ea --
gen 19 07:51:48 openmediavault systemd[1]: Starting postfix@-.service - Postfix Mail Transport Agent (instance -)...
gen 19 07:51:48 openmediavault postfix/postfix-script[1060]: starting the Postfix mail system
gen 19 07:51:48 openmediavault postfix/master[1066]: daemon started -- version 3.7.11, configuration /etc/postfix
gen 19 07:51:48 openmediavault systemd[1]: Started postfix@-.service - Postfix Mail Transport Agent (instance -).
gen 19 07:56:50 openmediavault postfix/pickup[1070]: 3DA742D40A25: uid=0 from=<root>
gen 19 07:56:50 openmediavault postfix/cleanup[6114]: 3DA742D40A25: message-id=<20250119065650.3DA742D40A25@openmediavault.local>
gen 19 07:56:50 openmediavault postfix/qmgr[1071]: 3DA742D40A25: from=<mail@gmail.com>, size=640, nrcpt=2 (queue active)
gen 19 07:56:50 openmediavault postfix/pipe[6116]: 3DA742D40A25: to=<openmediavault-notification@localhost.localdomain>, relay=omvnotificationfilter, delay=0.24, dela>
gen 19 07:56:51 openmediavault postfix/smtp[6117]: 3DA742D40A25: replace: header Subject: Anacron job 'cron.daily' on openmediavault: Subject: [openmediavault.local] >
gen 19 07:56:52 openmediavault postfix/smtp[6117]: 3DA742D40A25: to=<mail@gmail.com>, orig_to=<root>, relay=smtp.gmail.com[64.233.167.109]:587, delay=2.2, del>
gen 19 07:56:52 openmediavault postfix/qmgr[1071]: 3DA742D40A25: removed
gen 19 11:49:00 openmediavault postfix/pickup[39141]: DC97C2D40D9B: uid=0 from=<root>
gen 19 11:49:00 openmediavault postfix/cleanup[46463]: DC97C2D40D9B: message-id=<20250119104900.DC97C2D40D9B@openmediavault.local>
gen 19 11:49:00 openmediavault postfix/qmgr[1071]: DC97C2D40D9B: from=<mail@gmail.com>, size=436, nrcpt=2 (queue active)
gen 19 11:49:01 openmediavault postfix/pipe[46465]: DC97C2D40D9B: to=<openmediavault-notification@localhost.localdomain>, relay=omvnotificationfilter, delay=0.45, del>
gen 19 11:49:01 openmediavault postfix/smtp[46466]: DC97C2D40D9B: replace: header Subject: Test message from openmediavault: Subject: [openmediavault.local] Test mess>
gen 19 11:49:02 openmediavault postfix/smtp[46466]: DC97C2D40D9B: to=<mail@gmail.com>, relay=smtp.gmail.com[66.102.1.108]:587, delay=1.4, delays=0.01/0.03/0.5>
gen 19 11:49:02 openmediavault postfix/qmgr[1071]: DC97C2D40D9B: removed
Display More
omv-salt deploy run postfix
Code
debian:
----------
ID: configure_postfix_main
Function: file.managed
Name: /etc/postfix/main.cf
Result: True
Comment: File /etc/postfix/main.cf is in the correct state
Started: 11:53:47.512854
Duration: 81.319 ms
Changes:
----------
ID: configure_postfix_master
Function: file.managed
Name: /etc/postfix/master.cf
Result: True
Comment: File /etc/postfix/master.cf is in the correct state
Started: 11:53:47.594255
Duration: 68.759 ms
Changes:
----------
ID: configure_postfix_recipient_bcc
Function: file.managed
Name: /etc/postfix/recipient_bcc
Result: True
Comment: File /etc/postfix/recipient_bcc is in the correct state
Started: 11:53:47.663095
Duration: 68.368 ms
Changes:
----------
ID: run_postmap_recipient_bcc
Function: cmd.run
Name: postmap /etc/postfix/recipient_bcc
Result: True
Comment: State was not run because none of the onchanges reqs changed
Started: 11:53:47.732020
Duration: 0.002 ms
Changes:
----------
ID: configure_postfix_recipient_canonical
Function: file.managed
Name: /etc/postfix/recipient_canonical
Result: True
Comment: File /etc/postfix/recipient_canonical is in the correct state
Started: 11:53:47.732077
Duration: 73.609 ms
Changes:
----------
ID: run_postmap_recipient_canonical
Function: cmd.run
Name: postmap /etc/postfix/recipient_canonical
Result: True
Comment: State was not run because none of the onchanges reqs changed
Started: 11:53:47.805902
Duration: 0.003 ms
Changes:
----------
ID: configure_postfix_sasl_passwd
Function: file.managed
Name: /etc/postfix/sasl_passwd
Result: True
Comment: File /etc/postfix/sasl_passwd is in the correct state
Started: 11:53:47.805947
Duration: 69.156 ms
Changes:
----------
ID: run_postmap_sasl_passwd
Function: cmd.run
Name: postmap /etc/postfix/sasl_passwd
Result: True
Comment: State was not run because none of the onchanges reqs changed
Started: 11:53:47.875314
Duration: 0.002 ms
Changes:
----------
ID: configure_postfix_sender_bcc
Function: file.managed
Name: /etc/postfix/sender_bcc
Result: True
Comment: File /etc/postfix/sender_bcc is in the correct state
Started: 11:53:47.875357
Duration: 71.656 ms
Changes:
----------
ID: run_postmap_sender_bcc
Function: cmd.run
Name: postmap /etc/postfix/sender_bcc
Result: True
Comment: State was not run because none of the onchanges reqs changed
Started: 11:53:47.947220
Duration: 0.003 ms
Changes:
----------
ID: configure_postfix_sender_canonical
Function: file.managed
Name: /etc/postfix/sender_canonical
Result: True
Comment: File /etc/postfix/sender_canonical is in the correct state
Started: 11:53:47.947262
Duration: 68.793 ms
Changes:
----------
ID: run_postmap_sender_canonical
Function: cmd.run
Name: postmap /etc/postfix/sender_canonical
Result: True
Comment: State was not run because none of the onchanges reqs changed
Started: 11:53:48.016264
Duration: 0.002 ms
Changes:
----------
ID: configure_postfix_smtp_header_checks
Function: file.managed
Name: /etc/postfix/smtp_header_checks
Result: True
Comment: File /etc/postfix/smtp_header_checks is in the correct state
Started: 11:53:48.016315
Duration: 26.997 ms
Changes:
----------
ID: configure_postfix_transport
Function: file.managed
Name: /etc/postfix/transport
Result: True
Comment: File /etc/postfix/transport is in the correct state
Started: 11:53:48.043382
Duration: 26.738 ms
Changes:
----------
ID: run_postmap_transport
Function: cmd.run
Name: postmap /etc/postfix/transport
Result: True
Comment: State was not run because none of the onchanges reqs changed
Started: 11:53:48.070313
Duration: 0.002 ms
Changes:
----------
ID: remove_postfix_cron
Function: file.absent
Name: /etc/cron.hourly/openmediavault-flushmailq
Result: True
Comment: File /etc/cron.hourly/openmediavault-flushmailq is not present
Started: 11:53:48.070353
Duration: 0.435 ms
Changes:
----------
ID: postfix_set_permissions
Function: cmd.run
Name: postfix set-permissions
Result: True
Comment: Command "postfix set-permissions" run
Started: 11:53:48.070849
Duration: 270.002 ms
Changes:
----------
pid:
47733
retcode:
0
stderr:
stdout:
----------
ID: start_postfix_service
Function: service.running
Name: postfix
Result: True
Comment: The service postfix is already running
Started: 11:53:48.934228
Duration: 18.218 ms
Changes:
Summary for debian
-------------
Succeeded: 18 (changed=1)
Failed: 0
-------------
Total states run: 18
Total run time: 844.064 ms
Display More