Where did the message go?

Grimble grimble at nomail.afraid.org
Mon Jun 14 09:00:53 EDT 2021


I have two machines running Mageia 8 and Python 2.8.9, They use the same 
Python script to maintain a list of changed packages from dnf update and 
dnf install. In addition the script sends a short email message to my 
main email address. The problem is: the message from machine B arrives, 
the message from machine H does not.
The part of the script that sends the message is:
    with open('email.txt') as fmail:
         msg = EmailMessage()
         msg.set_content(fmail.read())

     msg['Subject'] = 'System update'
     msg['From'] = sysname
     msg['To'] = 'graeme at XXXX.XXXX' (details removed to protect the 
innocent)

     # Send the message via our own SMTP server.
     s = smtplib.SMTP('localhost')
     s.set_debuglevel(True)
     s.send_message(msg)
     s.quit()

The last lines of s.set_debuglevel are
reply: retcode (250); Msg: b'2.0.0 Ok: queued as B57B42C042F'
data: (250, b'2.0.0 Ok: queued as B57B42C042F')
send: 'quit\r\n'
reply: b'221 2.0.0 Bye\r\n'
reply: retcode (221); Msg: b'2.0.0 Bye'

The SMTP part of the system is working (hence this message).
The message from machine B correctly interprets "sysname" as
sysname at sysname.XXXX.XXXX i.e a valid addr4ess.

Where do I look now, please?
-- 
Grimble
Machine 'Haydn' running Plasma 5.20.4 on 5.10.41-desktop-1.mga8 kernel.
Mageia release 8 (Official) for x86_64


More information about the Python-list mailing list