Tuesday, May 12, 2026

msmtp instead of mail

Noticed only today that for some scripts on our internal server, the mail command was commented out and replaced by msmtp like 

#mail -s "Automatic Encoded file Statistics for : date" -t $MAIL_COPY $MAIL_DESTINATION < $MAIL_FILE 

{ echo "To: $MAIL_DESTINATION"; echo "Cc: $MAIL_COPY"; echo "Subject: Automatic Encoded file Statistics: $(date)"; echo; cat "$MAIL_FILE"; } | /usr/bin/msmtp -t

ChatGPT explains,

Yes, on many modern Linux systems, using msmtp directly is now preferred over the traditional mail command, especially for scripts and automated systems.

The reason is that the mail command historically depended on a local Mail Transfer Agent (MTA) such as:

Sendmail
Postfix
Exim

Many newer minimal/server/container installations no longer install or configure a full local MTA.

This was mentioned in this previous post, which mentions a replacement of ssmtp with msmtp. 

Monday, May 11, 2026

UTM and the mouse

When switching between machines using a KVM switch, found that Ubuntu 24.04 running on UTM on Mac, full screen, would ask, "Allow UTM to use the mouse" or something like that. We should choose cancel instead of Yes. If we choose Yes, the mouse cursor would not be seen, though mouse-clicks would be registered correctly on Ubuntu 24.04. If we choose cancel, the mouse would work properly.