IM::Alias(3pm)

πŸ“¦
version 153 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– IM::Alias πŸ’–

okay bestie, you found it β€” this is IM::Alias, aka the mail and host alias looking up package, living in the 3pm manual, part of the Internet Message Perl modules squad. she's here to handle your mail aliases AND your host aliases, and honestly? she ate. πŸŽ€


✨ SYNOPSIS ✨

use IM::Alias;

alias_read(mail_alias_files, addrbook_files);
$result = alias_lookup(user_name);
alias_print(alias);

hosts_read(hosts_alias_files);
$result = hosts_completion(mail_address);
hosts_print(alias);

like, that's the whole vibe. read your files, look stuff up, print it. no cap. πŸ¦‹


🌸 DESCRIPTION 🌸

so the tea is: the IM::Alias module handles mail and host aliases. that's it, that's the job, and she does it beautifully. πŸ’…

and just so you know where she came from β€” this module is provided by IM (Internet Message). iykyk. πŸ‘‘


🧚 EXAMPLES 🧚

here's how you'd actually use her, fr fr:

alias_read("$HOME/.im/Aliases", "$HOME/.im/Addrbook");
hosts_read("$HOME/.hostaliases");

$result = alias_lookup('u');
print "$result\n" if ($result);

$result = hosts_completion('u@h');
print "$result\n" if ($result);

and for the print girlies:

  • alias_print("a") displays mail addresses whose alias is "a". πŸ“
  • hosts_print("") displays all host aliases. passing an empty string = show me everything, main character energy. ✨

IM (Internet Message) is copyrighted by the IM developing team. you can redistribute it and/or modify it under the modified BSD license β€” so go off, just do it responsibly. see the copyright file for more details. πŸ“œ


lowkey important reminder: that's the whole copyright situation, no extra clauses hiding anywhere, bestie. πŸ’–

and that's a wrap on the IM::Alias page, mwah 🫢 β€” this gem was served up as version IM153, dated 2016-10-10, and she's still iconic. πŸ’œ

πŸ“¦ where this page comes from