f-log

just another web log

26 Mar 2023:
do you need an unicode troppuS

Speaking of email. I saw an odd message in my inbox.

The Subject was listed as troppuS but once opened showed as S u p p o r t

There is a Unicode symbol that once inserted causes all further characters on that line to be printed in reverse.

Scammers assume everyone is using something like Outlook that presumably will show that as Support and filtering software will overlook.

The From address was also strangely formatted, but not backwards, just lots of white-space.

I saved the email and now I have a file with all those dodgy characters in it's file name. Oh well.

26 Mar 2023:
just respond to an email via a script

Another "me" problem.

I needed to be able to respond to emails with a specific template. That part is straight forward enough, but it needed to be sent from a dedicated email address and also not to appear as a "reply".

Claws Mail has a lot of customisation options,including "Actions" .

An Action can be a call to an external program or shell script.

These in turn can be triggered, by email states, such as the from address.

~/scripts/autoresponder.sh %f

will run my autoresponder.sh script with the selected email filename.

#!/bin/bash

filename="$1"
mailbodyfile="reply.mailbody"
fromaddress="noreply@jumpstation.co.uk"
subject="MAIL BOX DECOMISSIONED"

echo "Autoresponder script"

echo "Working on $filename"

RP=$(grep -E "^Return-Path:\s" $filename | sed -re "s/(.+[<])([^>]+)(.*)/\2/")
F=$(grep -E "^From:\s" $filename | sed -re "s/(.+[<])([^>]+)(.*)/\2/")

address=$F
if [[ $RP ]]; then
    address=$RP
fi

mail -s $subject -aFrom:$fromaddress  $address < $mailbodyfile

The main job of the script is to extract the FROM and REPLY-TO addresses from the email file.

Then to send the email.

But the minor job of sending an email from the command line is anything but.

It doesn't help that many Linux users who want to send email from the command line also have their own mail servers.

For us poor plebs the path is littered with posts of how easy this is. * sigh *

First start with a MTA: Message Transport Agent

Do you have a MTA?

Took me a while to realise that Gentoo has a default MTA nullmailer . Gentoo has almost no defaults, so I am guessing this came bundled with something else I have installed. Guessing by the number of Gentoo users who have come to the same conclusion, it must be something pretty common.

ps ax |  grep nullmail

So, I have a MTA and it is running. How to configure it to send via my ISP?

The many many posts that either stated that you should be using GMail or running your own mail server slowed me down.

Eventually I found the wonderful Nullmailer troubleshooter

and configuration is as easy as updating these three files ...

/etc/nullmailer/defaultdomain

/etc/nullmailer/me

/etc/nullmailer/remotes

the first two were easy (after some trial and error)

echo jumpstation.co.uk > /etc/nullmailer/defaultdomain
echo jumpstation.co.uk > /etc/nullmailer/me

The last was the most complex. This was due to the settings language used for SMTP details used in email programs, ISP instructions and the parameters supported in nullmailer.

for my ISP IONOS this sufficed (they used to be called 1and1 )

auth.smtp.1and1.co.uk smtp user=Z pass=ZZ auth-login

(Where the Z s can be replaced with your details).

The trial and error process to get to those remarkably simple final settings was long and arduous.

The Nullmailer troubleshooter for invaluable here. Pointing to the correct file names and how they are used.

When testing, the from address is important. I was using example@example.com and of course my ISP was refusing to send it.

echo "This is a test e-mail..." | mail -s "testing" -aFrom:noreply@jumpstation.co.uk "test.service@jumpstation.co.uk"

To send a test email.

tail -f /var/log/nullmailer/nullmailer.log

To review the status (run this in another terminal and before the previous command)

Resulting in ...

Rescanning queue.
Starting delivery, 1 message(s) in queue.
Starting delivery: host: auth.smtp.1and1.co.uk protocol: smtp file: 167874623.20574
From: <noreply@jumpstation.co.uk> to: <test.service@jumpstation.co.uk>
Message-Id: <167574623.546247.20573.nullmailer@jumpstation.co.uk>
smtp: Succeeded: 250 Requested mail action okay, completed: id=1wQOx-1qQkhp0GhR-00sLea
Sent file.
Can't unlink file: No such file or directory
Delivery complete, 1 message(s) remain.

That shows the request to send an email being collected from the local machine and being sent.

If you have any problems/error you can check the

/var/spool/nullmailer/failed/

I skipped over the whole mail is a link to your mailer debacle.

05 Mar 2023:
where is march

Had an interesting day at work.

Checked my Google calendar and clicked the Join Meeting button, as always.

Strange, I get an error message

Meet doesn't work on your browser

To join the video meeting

Download Chrome

log out of Google and in again ... but no change.

reboot and ... no change.

Check the internets and my colleagues, no one else seems to be having a problem.

Check Chrome version. Hmmm Ubuntu Snap in the version. I HATE snap packages! They always fail in some weird and wonderful way that the native app could never.

Do a lot of Googling and eventually find a bug report from just an hour ago.

(Bug 2008999)

and there is a solution ... hold on to your hats;

Install the User Agent Switcher extension for Chrome by Google

to set the User Agent for Google Chrome to an unpolluted value for Google Chrome , because

Ubuntu want search queries using Google Chrome as snap package to contain a reference to the fact that the user is using Ubuntu Chrome .

So to get past the message when trying to join a Google Meet meeting with Chrome that you need to download Chrome , you have to spoof a Chrome user agent that Google.com recognises as being actual Chrome .

Or just remove the Chrome snap and install from the .pkg directly from Google .

H A T E - S N A P!

loading results, please wait loading animateloading animateloading animate
[More tags]
rss feed

email

root

flog archives


Disclaimer: This page is by me for me, if you are not me then please be aware of the following
I am not responsible for anything that works or does not work including files and pages made available at www.jumpstation.co.uk I am also not responsible for any information(or what you or others do with it) available at www.jumpstation.co.uk In fact I'm not responsible for anything ever, so there!