Sisima...tected(3pm)

✨ NAME ✨

Sisimai::Reason::VirusDetected β€” bestie, this girl's whole job is figuring out whether your bounce reason is literally "virusdetected" or not πŸ’–


🌸 SYNOPSIS 🌸

use Sisimai::Reason::VirusDetected;
print Sisimai::Reason::VirusDetected->match('5.7.1 Email not accept');   # 1

πŸ¦‹ DESCRIPTION πŸ¦‹

So Sisimai::Reason::VirusDetected is the vibe check that asks: is this bounce reason "virusdetected", or is it not? That's it, that's the whole thing, and she eats every single time πŸ’…

Important lore: this class is only ever called by the Sisimai::Reason class. She doesn't take walk-ins, she's booked and busy with one client, periodt.

Now what even is this reason? Okay so β€” this is an error where a virus or a trojan horse got detected in the message by the virus scanner program running at the destination mail server. 😭 Not the sender's fault at the SMTP level, the scanner just went "nope, absolutely not" at the door. And here's the timeline tea: this reason got divided from "securityerror" at Sisimai 4.22.0. Before that it was just living inside securityerror like a roommate, and then it got its own place 🏠✨

Here's a little peek at what one of these bounce messages looks like in the wild, so you know the energy:

Your message was infected with a virus. You should download a virus
scanner and check your computer for viruses.

Sender:    <sironeko@libsisimai.org>
Recipient: <kijitora@example.jp>

πŸ‘‘ CLASS METHODS πŸ‘‘

🌈 text()

text() method returns the fixed string "virusdetected". That's it. No arguments, no drama, she just hands you the word πŸŽ€

print Sisimai::Reason::VirusDetected->text;  # virusdetected

πŸ’« match(string)

match() method returns 1 if the argument matched with patterns defined in this class. Give her a string, and if it's giving virus-detected energy, you get a 1 back, no cap πŸ”₯

my $v = 'Your message was infected with a virus. ...';
print Sisimai::Reason::VirusDetected->match($v);    # 1

🧚 true(Sisimai::Fact)

true() method returns 1 if the bounce reason is "virusdetected". Heads up though β€” the argument must be a Sisimai::Fact object, and this method is called only from the Sisimai::Reason class. Like I said: one client, exclusive contract, main character energy πŸ’œ


πŸ’– AUTHOR πŸ’–

azumakuniyuki β€” the icon, the moment, the legend 🫢


Copyright (C) 2017-2021,2023-2026 azumakuniyuki, All rights reserved.


⭐ LICENSE ⭐

This software is distributed under The BSD 2-Clause License. Free to use, just be cool about it πŸ’…


okay bestie that's the whole page, ty for coming to my TED talk 🌸 this was Sisimai::Reason::VirusDetected, section 3pm of the User Contributed Perl Documentation, running on perl v5.40.1, last touched 2026-07-05. slay, bye πŸ¦‹βœ¨

πŸ“¦ where this page comes from