Commit 3f7f0373 authored by thomas.forbriger's avatar thomas.forbriger

[FIX] (csbackntfy): use simplified mail transfer

With this commit a reasonable default sender address is created from local
data. It was common practice to use sender address strings which not actually
were valid email addresses but just looked like.

csbackntfy no is able to send a message with a minimum number of parameters
provided on the command line:

./csbackntfy.py -D 1 -S /var/log/csback.status  -r thomas.forbriger@kit.edu
parent 1ad4a2fa
......@@ -56,6 +56,8 @@ import sys
import re
import smtplib
import logging
import getpass
import socket
import csbacklog
import datetime as dt
import csbackErrorCodes as eCodes
......@@ -176,7 +178,8 @@ def main(argv=None):
verbose = False
debugMode = False
receivers = []
sender = ''
sender = getpass.getuser() + '@' \
+ socket.gethostbyaddr(socket.gethostname())[0]
port = 25
host = 'localhost'
username = ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment