Skip to content

Commit 504a8e6

Browse files
authored
Merge pull request #45 from NethServer/sdl-6939
Update expand-smarthost script to use hostname as sender email NethServer/dev#6939
2 parents 72013f7 + a45eb7a commit 504a8e6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

imageroot/bin/expand-smarthost

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66
#
77

88
import os
9-
import json
109
import agent
1110
import agent.tasks
12-
import sys
1311

1412
from jinja2 import Environment, FileSystemLoader, select_autoescape
1513

@@ -36,7 +34,7 @@ if receiver_emails and smtp['enabled']:
3634
"smtp_username": smtp['username'],
3735
"smtp_password": smtp['password'],
3836
"smtp_port": smtp['port'],
39-
"sender_email": smtp['username'],
37+
"sender_email": os.environ['MODULE_ID']+'@'+agent.get_hostname(),
4038
"receiver_emails": receiver_emails.split(","),
4139
"encryption_type": "none" if smtp['encrypt_smtp'] == "none" else "starttls" if smtp['encrypt_smtp'] == "starttls" else "ssltls",
4240
"auth_type": "login",

0 commit comments

Comments
 (0)