Irssi Notify by Mail

Apr 17, 2022

Some time ago I started to use Irssi on a remote server. I keep it running 24/7 on a Screen session.

The problem: Sometimes I do not check irssi for messages over days or weeks. If I receive a private message or a mention on some channel, I will not read them.

To solve this I found the script email_msgs.pl. It was made for sending a mail from irssi host when you receive some kind of messages. Very simple and useful.

Below I show how to use it to send mail when you receive private messages or a mention.

Step 1 - install and enable the script

# apt install irssi-scripts libemail-sender-perl
$ ln -s /usr/share/irssi/scripts/email_msgs.pl ~/.irssi/scripts/autorun

Note: The last command creates a link of email_msgs.pl inside the directory ~/.irssi/scripts/autorun.

Step 2 - configure

$ irssi
/set email_msgs_to_address to@addr.com
/set email_msgs_from_address from@addr.com
/set email_msgs_subject [irssi] message
/set email_msgs_away_only off
/set email_msgs_detailed on
/set email_msgs_interval 300
/set email_msgs_pri_r_msgs on
/set email_msgs_pri_s_msgs on
/set email_msgs_pub_r_msgs off
/set email_msgs_pub_s_msgs off
/set email_msgs_mentions on
/save
/quit

That’s it.

irssiIRCmail

Back to talau's home