Sendmail::Milter(3pm)

✨ Sendmail::Milter ✨

okay so bestie, welcome to Sendmail::Milter β€” the compatibility interface for Sendmail::PMilter 🫢 it lives in the User Contributed Perl Documentation corner of your man pages and it's literally just here to make your old scripts feel seen πŸ’…


🌸 SYNOPSIS 🌸

use Sendmail::Milter;

Sendmail::Milter::auto_setconn(NAME);
Sendmail::Milter::register(NAME, { CALLBACKS }, FLAGS);
Sendmail::Milter::main();

that's the whole vibe. three lines, iconic behavior, no notes ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

so this is a compatibility interface that emulates the "standard" Sendmail::Milter API. that's it, that's the job. it's giving "I'm the translator at the group hang so everyone gets along" 😌


πŸ‘‘ FUNCTIONS πŸ‘‘

here's what you get, bestie. and listen β€” unlike Sendmail::PMilter, this interface involves a single, global instance of milter data, so you call these functions without an object reference. no $self, no ->, just raw function calls. periodt.

for each function, go read the description of its object-based counterpart in Sendmail::PMilter β€” that's where the real lore is πŸ“–

  • Sendmail::Milter::auto_getconn(NAME[, CONFIG])
  • Sendmail::Milter::auto_setconn(NAME[, CONFIG])
  • Sendmail::Milter::main([MAXCHILDREN[, MAXREQ]])
  • Sendmail::Milter::register(NAME, CALLBACKS[, FLAGS])
  • Sendmail::Milter::setconn(DESC)

πŸŽ€ One extension function is provided by this implementation πŸŽ€

like, this implementation went above and beyond, and honestly? we love that for it πŸ’–

  • Sendmail::Milter::get_milter() β€” returns the Sendmail::PMilter instance underlying this emulation layer. this lets mostly-unmodified milter scripts set PMilter extensions (such as dispatcher and sendmail.cf values).
⚠️ but real talk bestie: it is recommended, however, that new code use the object instance methods described in Sendmail::PMilter. the compat layer is a nostalgia tour, not a new build 🫢

🌈 EXPORTS 🌈

to preserve compatibility with the standard Sendmail::Milter interface, all SMFI* constants described in Sendmail::PMilter are exported into the caller's namespace by default. you didn't ask, they just showed up, and they're staying πŸ’…

πŸ™ˆ (note that Sendmail::PMilter itself does not export these symbols by default. so like… yeah. different house rules, different house.)

and that's the page, bestie!! πŸ¦‹πŸŒΈβœ¨ this was Sendmail::Milter(3pm) from the User Contributed Perl Documentation, shipped with perl v5.32.1 and dated 2021-12-26 β€” go forth, set those connections, and slay πŸ’–πŸŽ€πŸ‘‘

πŸ“¦ where this page comes from