On 14/06/2021 20:58, dn wrote:
On 15/06/2021 01.00, Grimble wrote:
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'] = 'gra...@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
sysn...@sysname.xxxx.xxxx i.e a valid addr4ess.
Where do I look now, please?
That's machine B, but the issue is with machine H.
Have you compared the contents of the two machines' /var/log/maillog?
Thanks for reminding me of the log files. I've worked out that the
message on machine H (for haydn, which shows my preferred music genre)
was bouncing because haydn.XXXX.XXXX was not a registered subdomain with
my ISP, whereas bach.XXXX.XXXX was registered. Sorted now.
--
Grimble
Registered Linux User #450547
Machine 'Bach' running Plasma 5.20.4 on 5.10.43-desktop-1.mga8 kernel.
Mageia release 8 (Official) for x86_64
--
https://mail.python.org/mailman/listinfo/python-list