mail: set FROM address #91

Merged
mg merged 2 commits from mail2 into master 2024-05-27 11:56:10 +02:00
6 changed files with 6 additions and 6 deletions
Showing only changes of commit 8ea958fa4e - Show all commits

View file

@ -4,4 +4,4 @@ Description=Send a Mail in case of an error in cv4pve.service.
[Service]
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
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

View file

@ -5,4 +5,4 @@ Description=Send a Mail in case of an error in youtubedl.service.
[Service]
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]
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]
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]
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 }}'