-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mortzu
committed
Jun 11, 2022
1 parent
e85ea6a
commit 5675af2
Showing
5 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
nullmailer_remote_server: 'mail.bremen.freifunk.net' | ||
mail_root_target: '[email protected]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
- name: restart nullmailer | ||
service: | ||
name: nullmailer | ||
state: restarted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
- name: Install local mailserver | ||
apt: | ||
name: nullmailer | ||
|
||
- name: Copy nullmailer remote | ||
template: | ||
src: remotes | ||
dest: /etc/nullmailer/remotes | ||
mode: '0640' | ||
owner: root | ||
group: "{{ group }}" | ||
notify: restart nullmailer | ||
vars: | ||
group: "{{ (ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu') | ternary('mail', 'nullmail') }}" | ||
|
||
- name: Copy nullmailer adminaddr | ||
copy: | ||
dest: /etc/nullmailer/adminaddr | ||
content: "{{ mail_root_target }}\n" | ||
mode: 0644 | ||
owner: root | ||
group: root | ||
notify: restart nullmailer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{ nullmailer_remote_server }} smtp{% if nullmailer_remote_user is defined %} --user={{ nullmailer_remote_user }} --pass={{ nullmailer_remote_password }}{% endif %} |