Maillinks

Print out the URLs of hyperlinks in HTML-mail.

Synopsis

maillinks [mail-file]

or

cat [mail-file] | maillinks

Description

In a plain text email message, you will recognize URLs easily. In HTML-mails they are most of the time part of a link-tag and thus hidden by the caption text which is shown instead. Not only because, nowadays, UBE and UCE are composed with HTML, but in any case, before you take any risks, you should be aware of where the click on such a link will lead you. Hyperlinks may include directives which are likely to be addressed to a remotely running application.

Maillinks will find the URLs “behind” any hyperlink and show it in a footnote below the email-text. You can scrutinize the URL and find information about the destination, before you engage your web-browser or other tool to follow a link.

Integration in mail-clients

You can pipe in an email-file to maillinks and thus create macros, where the functionality is present in a mail-client. In the Mutt user-agent, to define a shortcut, you note the following lines in your .muttrc file:

macro index M "|maillinks -\n" "create link-list"

macro pager M "|maillinks -\n" "create link-list"

Now you can push the M key either in the pager or in the mail index to pipe in a selected mail to maillinks.

Consult the documentation of your own mail-client to find out if, and how macros or similar options can be configured.

Options

Maillinks does currently not interpret any command line arguments other than the name of a mail-file to analyze.

Other Information

Source-code and Development
Maillinks has been developed in Ruby and is published as a Ruby-Gem. If you have installed the program from the Gem-file, then, to access the source-code, find Maillinks in the Gem-directory for your Ruby-version. All source-files found are in the sub-directories /bin and /lib. Alternatively, you can unpack the Gem-file with tar -xf, then decompress the data-archive with tar -xzf.
Version
0.1.2 (May 2017)
License
Maillinks is published under the conditions of the GNU General Public License, version 3.0 or later.
Author
Michael Uplawski <michael.uplawski@uplawski.eu>

Ω