mail: set FROM address
All checks were successful
ci/woodpecker/push/gitleaks Pipeline was successful
ci/woodpecker/pr/gitleaks Pipeline was successful
ci/woodpecker/pr/ansible-lint Pipeline was successful
ci/woodpecker/push/ansible-lint Pipeline was successful

This commit is contained in:
Michael Grote 2024-05-27 10:55:54 +02:00
parent 3b918415d9
commit 8ea958fa4e
6 changed files with 6 additions and 6 deletions

View file

@ -4,4 +4,4 @@ Description=Send a Mail in case of an error in cv4pve.service.
[Service] [Service]
Type=oneshot Type=oneshot
ExecStart=/bin/bash -c '/bin/systemctl status cv4pve.service | mail -s "[ERROR] cv4pve - %H" {{ my_mail }}' ExecStart=/bin/bash -c '/bin/systemctl status cv4pve.service | mail -aFROM:cv4pve-autosnap@mgrote.net -s "[ERROR] cv4pve - %H" {{ my_mail }}'

View file

@ -9,5 +9,5 @@
- name: send testmail # noqa no-changed-when - name: send testmail # noqa no-changed-when
ansible.builtin.shell: ansible.builtin.shell:
cmd: "set -o pipefail && echo 'postfix ist eingerichtet' | mail -s '{{ ansible_hostname }} - postfix' {{ my_mail }}" cmd: "set -o pipefail && echo 'postfix ist eingerichtet' | mail -aFROM:postfix@mgrote.net -s '{{ ansible_hostname }} - postfix' {{ my_mail }}"
executable: /bin/bash executable: /bin/bash

View file

@ -5,4 +5,4 @@ Description=Send a Mail in case of an error in youtubedl.service.
[Service] [Service]
Type=oneshot Type=oneshot
ExecStart=/bin/bash -c '/bin/systemctl status youtubedl.service | mail -s "[ERROR] youtubedl" {{ my_mail }}' ExecStart=/bin/bash -c '/bin/systemctl status youtubedl.service | mail -aFROM:youtubedl@mgrote.net -s "[ERROR] youtubedl" {{ my_mail }}'

View file

@ -5,4 +5,4 @@ Description=Send a Mail in case of an error in sanoid.service.
[Service] [Service]
Type=oneshot Type=oneshot
ExecStart=/bin/bash -c '/bin/systemctl status sanoid.service | mail -s "[ERROR] sanoid - %H" {{ my_mail }}' ExecStart=/bin/bash -c '/bin/systemctl status sanoid.service | mail -aFROM:sanoid@mgrote.net -s "[ERROR] sanoid - %H" {{ my_mail }}'

View file

@ -5,4 +5,4 @@ Description=Send a Mail for sanoid service after error or success sanoid.service
[Service] [Service]
Type=oneshot Type=oneshot
ExecStart=/bin/bash -c '/usr/bin/journalctl -u syncoid.service -n 30 | mail -s "syncoid - %H" {{ my_mail }}' ExecStart=/bin/bash -c '/usr/bin/journalctl -u syncoid.service -n 30 | mail -aFROM:syncoid@mgrote.net -s "syncoid - %H" {{ my_mail }}'

View file

@ -5,4 +5,4 @@ Description=Send a Mail in case of an error in zpool-scrub@.service.
[Service] [Service]
Type=oneshot Type=oneshot
ExecStart=/bin/bash -c '{{ zfs_extra_path_zpool }} status | mail -s "[ERROR] zpool scrub - %H" {{ my_mail }}' ExecStart=/bin/bash -c '{{ zfs_extra_path_zpool }} status | mail -aFROM:zpool-scrub@mgrote.net -s "[ERROR] zpool scrub - %H" {{ my_mail }}'