[Users] Rewrite URLs in message obfuscated by Outlook's safelinks stuff

George Avrunin avrunin at comcast.net
Tue Mar 19 13:12:32 UTC 2024


On Tue, 19 Mar 2024 08:03:00 +0100
Milan Obuch <claws-mail-users at dino.sk> wrote:


> Hi,
> 
> I'd like to ask some more details about your intended setup. First,
> where is your personal account served? Your mail is sent from
> comcast.net domain, no clue for me here. Also, how should messages get
> forwarded from GMail account to your personal account, protocol-wise,
> and next, how should they being transferred to your home machine?
> Dovecot is just IMAP/POP3 server, probably something else is planned
> for message transfer here.
> 
> My preference for any mail message modification is running some script
> as part of mail delivery process, if you have some possibility to do
> so. I'd expect your home machine is under your complete control, so
> you should be able to do it here. Lacking details, no better
> suggestion could be done at the moment.

These are good points and I probably should have been more specific.
In fact, I'd also like suggestions on this.  I should note that,
although I did a lot of Unix system administration a long time ago when
we were setting up my department's research computing facilities, in
recent years I have relied on the department's professional IT staff
for big things and have just done fairly straightforward stuff on the
Linux machine in my office and my small home network.  So I haven't
thought hard about, and am probably not up to date on, questions about
how to best set up mail servers, etc. 

I have a personal GMail account and the comcast.net account that I'm
sending from. (Comcast is the former name of Xfinity, a major US
cable tv, etc., company that is pretty much the only supplier of high
speed internet connections in my area.)  I am currently setting up a new
home machine and have dovecot running.  At the moment, I have
accounts set up in claws (and in Thunderbird, which can also connect to
my university account) for my personal GMail and comcast accounts and
one to read mail from the dovecot server and send through the Comcast
account; I move messages from the GMail and comcast accounts to folders
in the dovecot server at home using claws and Thunderbird. I have not
configured an MTA on the home machine. In the past, I have run sendmail
as the MTA, though I think if I set up an MTA at home I might switch to
postfix. When I ran sendmail on my home and office machines, I did use
procmail extensively.   (I had to give up running an MTA on the office
machine as part of the university's requirement that we use only their
mail servers; I basically did it on the home machine at the same time.) 

But I'm not sure I could directly forward mail from GMail to a mail
server at home through my home Comcast/Xfinity connection.  I haven't
checked in quite a while, but Comcast used to block various ports and
prevent the straightforward ways of running a full mail server on home
accounts.  I can connect to my home network from outside through
Wireguard (and in particular to the dovecot server so I can read mail
that's stored on the home machine from outside), but I'm not sure I
could forward mail to the home machine.  I haven't looked at using
something like fetchmail, but a quick search suggests that fetchmail
can use OAUTH2 with GMail by setting up a personal project, etc.,
similar to the way claws-mail does it.  So that wouldn't work directly
with my university account, but fetchmail could be used with both of my
personal accounts.

> First, see above - my gut feeling is I would do it as part of mail
> message delivery process. If that's not possible and modifying message
> in mail user agent (Claws Mail in your case) is your only option, it's
> possible. At the moment I have no complete solution for you, only a
> note there is att_remover plugin. I think the way it removes
> attachments is simply complete message rewrite. There is nothing on
> the topic on Claws Mail's web page, and I do not use this plugin, so
> no experience with it.
> 

Thanks.  I've used the att_remover plugin occasionally, but I have no
idea how hard it would be to modify it to do this sort of thing.  

> Python plugin allows you to get filename for a message, in theory you
> could use that info to modify the file any way you like. There is a
> problem, however, if you use IMAP for accessing mailbox, filename is
> just for local cache of your message, and any modification done here
> is probably not transferred to server. My quick tests seem to confirm
> this.

I wondered about that.    I would be satisfied with something that
"only" fixed the URLs while I was using claws-mail (so that I could see
the correct URL and clicking on the link would not send me through
outlook.com) but did not modify the original message.  So perhaps
modifying the local cache would be fine.  I don't understand enough
about what claws is doing internally to know if this is feasible. 


> One comment/question to H. Merijn Brand's response - how is
> rm_disclaim.pl script being used? When does it run? Is it an action
> script for Claws Mail or something else?

I also asked about this in my reply to H. Merijn Brand just now. 

> 
> Regards,
> Milan

Thanks,

  George


More information about the Users mailing list