diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-18 05:52:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-18 05:52:27 +0000 |
commit | 3b0807ad7b283c46c21862eb826dcbb4ad04e5e2 (patch) | |
tree | 6461ea75f03eca87a5a90c86c3c9a787a6ad037e /ansible_collections/community/general/plugins/callback/mail.py | |
parent | Adding debian version 7.7.0+dfsg-3. (diff) | |
download | ansible-3b0807ad7b283c46c21862eb826dcbb4ad04e5e2.tar.xz ansible-3b0807ad7b283c46c21862eb826dcbb4ad04e5e2.zip |
Merging upstream version 9.4.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/community/general/plugins/callback/mail.py')
-rw-r--r-- | ansible_collections/community/general/plugins/callback/mail.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ansible_collections/community/general/plugins/callback/mail.py b/ansible_collections/community/general/plugins/callback/mail.py index 9e8314baf..1b847ea34 100644 --- a/ansible_collections/community/general/plugins/callback/mail.py +++ b/ansible_collections/community/general/plugins/callback/mail.py @@ -71,6 +71,16 @@ options: ini: - section: callback_mail key: bcc + message_id_domain: + description: + - The domain name to use for the L(Message-ID header, https://en.wikipedia.org/wiki/Message-ID). + - The default is the hostname of the control node. + type: str + ini: + - section: callback_mail + key: message_id_domain + version_added: 8.2.0 + ''' import json @@ -131,7 +141,7 @@ class CallbackModule(CallbackBase): content += 'To: %s\n' % ', '.join([email.utils.formataddr(pair) for pair in to_addresses]) if self.cc: content += 'Cc: %s\n' % ', '.join([email.utils.formataddr(pair) for pair in cc_addresses]) - content += 'Message-ID: %s\n' % email.utils.make_msgid() + content += 'Message-ID: %s\n' % email.utils.make_msgid(domain=self.get_option('message_id_domain')) content += 'Subject: %s\n\n' % subject.strip() content += body |