Mail::...tector(3pm)

πŸ“¦
version 1.04 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Mail::ListDetector β€” the manual, but make it cute ✨

okay so bestie, the page header up top says Mail::...tector(3pm) (the title got truncated, it's giving "mysterious"), and the actual module we're talking about is Mail::ListDetector β€” a Perl extension for detecting mailing list messages. yes. that's the whole vibe. let's go πŸ¦‹


🌸 NAME 🌸

Mail::ListDetector β€” a Perl extension for detecting mailing list messages πŸ’Œ


✨ SYNOPSIS ✨

use Mail::ListDetector;

that's it. that's the whole setup. slay πŸ’…


🧚 DESCRIPTION 🧚

So this module analyzes mail objects in any of the classes handled by Email::Abstract. And then? It hands you back a Mail::ListDetector::List object that represents the mailing list. iconic behaviour honestly πŸ‘‘

Now, the RFC2369 mailing list detector? She's also capable of matching some Mailman and Ezmlm messages. But here's the tea: she is deliberately checked last so that the more specific Mailman and Ezmlm parsing gets to happen first, and so the type of mailing list involved gets identified more accurately. order matters, periodt πŸ”₯


πŸŽ€ METHODS πŸŽ€

new

This method is the core of the module. Pass it a mail object and it will either return a Mail::ListDetector::List object that describes the mailing list that the message was posted to, or undef if it appears not to have been a mailing list post. two outcomes, no in-between, main character energy πŸ’œ

register_plugin($plugin_name)

Registers a new plugin module that might recognise lists. It should be a subclass of Mail::ListDetector::Detector::Base, and it should provide the same interface as the other detector modules. consistency is the vibe 🫢

⚠️ okay but real talk: you can eval arbitrary perl code with this. so like. don't do that if that's not what you want. fr fr πŸ’€

πŸ“ EMAILS USED πŸ“

This module includes a number of sample emails from various mailing lists. In all cases, mails are used with permission of the author, and they must not be distributed separately from this archive. okay? okay. πŸ™ˆ

And if you believe I may have accidentally used your email or content without permission β€” contact me, and if this turns out to be the case I will immediately remove it from the latest version of the archive. no drama, just fixing it πŸ’–


πŸ’€ BUGS πŸ’€

  • A lot of the code applies fairly simple regular expressions to email address to extract information. This may fall over for really weird email addresses, but I'm hoping no-one will use those for names of mailing lists. fingers crossed bestie 🀞
  • The majordomo and smartlist recognisers don't have much to go on, and therefore are probably not as reliable as the other detectors. This is liable to be hard to fix. 😭
  • Forwarding messages (for example using procmail) can sometimes break the Sender: header information needed to recognise some list types. rude of them honestly 🌧️

πŸ‘‘ AUTHORS πŸ‘‘

  • Michael Stevens β€” michael@etla.org.
  • Andy Turner β€” turner@mikomi.org.
  • Adam Lazur β€” adam@lazur.org.
  • Peter Oliver β€” p.d.oliver@mavit.freeserve.co.uk
  • Matthew Walker β€” matthew@walker.wattle.id.au
  • Tatsuhiko Miyagawa β€” miyagawa@bulknews.net
  • johnnnnnn β€” john@phaedrusdeinus.org
  • Mik Firestone β€” mik@racerx.homedns.org
  • Simon Cozens β€” simon@simon-cozens.org

the whole squad. legends only πŸ’…βœ¨


🌈 SEE ALSO 🌈

perl(1). And also the Mail::Audit::List module, which is a convenient way of using Mail::Audit and Mail::ListDetector together. dynamic duo behaviour πŸ¦‹


and that's the page!! perl v5.36.0, dated 2022-11-29 β€” ty for coming to my ted talk bestie, go detect some lists, ily πŸ«ΆπŸ’–βœ¨

πŸ“¦ where this page comes from