Hello Martin.

Martin T wrote in <CAJx5YvHfutSeeMyecg4JsF3OjXJGU=CXJssUWBS7XWnJ4Lz=mA@m\
ail.gmail.com>:
 |> Well.  I will keep working on this and hopefully at some future
 |> day this thing just works.  Until then i hope (again) that you
 |> stay satisfied with your solution, Martin!
 |
 |Yes, native support would be obviously very nice. In addition, there
 |seems to be a slight issue with this hack I described in my previous
 |e-mail. Now the /usr/bin/unattended-upgrade script also uses this
 |wrapper and now some characters in the e-mail body are encoded. For
 |example:
 |
 |Allowed origins are:
 |['origin=3DDebian,codename=3Dstretch,label=3DDebian-Se=curity']
 |
 |The /usr/bin/unattended-upgrade sends the e-mail like this:
 |
 |def _send_mail_using_sendmail(from_address, to_address, subject, body):
 |    # format as a proper mail
 |    msg = Message()
 |    msg['Subject'] = subject
 |    msg['From'] = from_address
 |    msg['To'] = to_address
 |    # order is important here, Message() first, then Charset()
 |    #  then msg.set_charset()
 |    charset = email.charset.Charset("utf-8")
 |    charset.body_encoding = email.charset.QP
 |    msg.set_payload(body, charset)
 |    # and send it away
 |    sendmail = subprocess.Popen(
 |        [SENDMAIL_BINARY, "-oi", "-t"],
 |        stdin=subprocess.PIPE, universal_newlines=True)
 |    sendmail.stdin.write(msg.as_string())
 |    sendmail.stdin.close()
 |    ret = sendmail.wait()
 |    return ret
 |
 |What might cause this? I thought that "/usr/sbin/sendmail -oi -t" and
 |"/usr/bin/mailx -t" are equal.

They never have been equal.  I already had pushed a commit that
makes this clear, it will be in the next release.

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

Reply via email to