Utente:Buccia/Irssi Scripts/mailhilights.pl
Da LinuxVar, il LUG della provincia di Varese.
You're an IRC addict, aren't you? So am I, but I'm actually trying to get off from it. The time wasted on IRC and IM could be far better spent.. in dozens of other ways.. The problem is that sometimes one idles on IRC just because he/she is waiting for something to come up; the truth is that almost never anything relevant comes up.
| mailhilights.pl | |
| Linguaggio: | Perl irssi script |
| Licenza: | |
| Requisiti: | |
| |
| Autore: | Utente:Buccia |
| Mail: | buccia@f0.ath.cx |
| Homepage: | http://linuxvar.it/ |
| TODO: | |
| |
| Download: | Media:Mailhilights.gz |
Being an irssi user, I have a way to detach from the cyber-world, and be notified when some topic that can interest me is raised.
If you find this interesting, you may find also Utente:Buccia/Irssi_Scripts/smshilights.pl a cool script to try out.
Features
The mailhilights.pl script sends an email when the user is away, and an hilight happens. It supports:
- mail ratio limit (so you won't get 200 emails if your dumb buddy pastes his stuff in his query window)
- mail body processing trough an external program (i process it trough gpg --encrypt .. you know..)
- add a custom header to the sent mail (so procmail or similar knows how to handle it)
- custom mail subject
- ignore pattern (don't send mail if the message matches this pattern)
- of course you can customize the program invoked to send the mail
- of course you can customize sender and recipent addresses ..
Usage
in your irssi, type:
/hilight add some_interesting_pattern /script load mailhilights.pl /set mailhilights_to your@mail.address /set mailhilights_from useless@mail.address /set mailhilights_custom_header "List-Id: mailhilights irssi script <irc-crap.luckyland.passione>" /set mailhilights_delay_min 360 /set mailhilights_ignore_pattern IdleRPGBot /set mailhilights_body_alter_command "gpg --encrypt -r 0xb28997c9" /set mailhilights_command "sendmail -oi -t"
Settings
- mailhilights_to is the address the mail will be sent to
- mailhilights_from is the address the mail will appear to come from
- mailhilights_custom_header is a header that will be added to the mail. You can use it to inform procmail or similar programs on the nature of the mail.
- mailhilights_delay_min is the number of seconds the script will wait, after having sent an email, before sending out another one
- mailhilights_subject_chan is the Subject the mail will have when generated from an hilight in a channel.
- mailhilights_subject_query is the Subject the mail will have when generated from a private message
- mailhilights_ignore_pattern is a regular expression which will be checked against (if non-empty) and will block mail sending if matched
- mailhilights_body_alter_command is the command that, if set, the script will pipe the mail body trough. You can for example pipe it trough gpg --encrypt or uuencode or whatever
- mailhilights_command is the command which will be issued to send the mail. A good default is /usr/sbin/sendmail -oi -t

