Where did the message go?

dn PythonList at DancesWithMice.info
Mon Jun 14 15:58:51 EDT 2021


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'] = '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?

That's machine B, but the issue is with machine H.
Have you compared the contents of the two machines' /var/log/maillog?
-- 
Regards,
=dn


More information about the Python-list mailing list