Hi Maciej,
hi all,
for a long time now I'm looking for a reliable solution to send system
emails to mail relays. It's mostly the same: The critical point is the
default envelope sender. Most mail relays don't allow that envelope
senders differ from sasl user.
So the default debops nullmailer configuration doesn't fit. I found out,
that for nullmailer the configuration file "allmailfrom" was added in
version 1.4.
To use this in debops, we need (with the last item additionally)
nullmailer__configuration_files:
- dest: '/etc/mailname'
content: '{{ nullmailer__mailname }}'
purge: False
- dest: '/etc/nullmailer/adminaddr'
content: '{{ nullmailer__adminaddr
if nullmailer__adminaddr is string
else nullmailer__adminaddr|join(",") }}'
- dest: '/etc/nullmailer/idhost'
content: '{{ nullmailer__idhost }}'
state: '{{ "present" if nullmailer__idhost else "absent"
}}'
- dest: '/etc/nullmailer/helohost'
content: '{{ nullmailer__helohost }}'
state: '{{ "present" if nullmailer__helohost else "absent"
}}'
- dest: '/etc/nullmailer/defaulthost'
content: '{{ nullmailer__defaulthost }}'
state: '{{ "present" if nullmailer__defaulthost else "absent"
}}'
- dest: '/etc/nullmailer/defaultdomain'
content: '{{ nullmailer__defaultdomain }}'
state: '{{ "present" if nullmailer__defaultdomain else
"absent" }}'
- dest: '/etc/nullmailer/maxpause'
content: '{{ nullmailer__maxpause }}'
state: '{{ "present" if nullmailer__maxpause else "absent"
}}'
- dest: '/etc/nullmailer/pausetime'
content: '{{ nullmailer__pausetime }}'
state: '{{ "present" if nullmailer__pausetime else "absent"
}}'
- dest: '/etc/nullmailer/sendtimeout'
content: '{{ nullmailer__sendtimeout }}'
state: '{{ "present" if nullmailer__sendtimeout else "absent"
}}'
- dest: '/etc/nullmailer/allmailfrom'
content: 'mail.gateway(a)datenkollektiv.net'
state: '{{ "present" if nullmailer__allmailfrom else "absent"
}}'
... together wie a new template and a version check.
Overwriting just the "nullmailer__configuration_files:" variable in my
inventory, I wondered if it's possible to just add another item to an
already defined variable from defaults:
like
nullmailer__configuration_files: "{{ nullmailer__configuration_files + \
additional_nullmailer__configuration_files }}"
or something like this.
Kind regards
Jan