Sisima...asMoved(3pm)

✨ NAME ✨

okay bestie, welcome to Sisimai::Reason::HasMoved(3pm) πŸ’… β€” the little Perl module that checks whether a bounce reason is "hasmoved" or not. that's literally the whole job. she's niche, she's specific, she's iconic for it πŸ‘‘


🌸 SYNOPSIS 🌸

vibe check first, here's how you actually use her:

use Sisimai::Reason::HasMoved;
print Sisimai::Reason::HasMoved->match('address neko@example.jp has been replaced by ...');   # 1

like, one use, one call, returns 1. slay ✨


πŸ’– DESCRIPTION πŸ’–

Sisimai::Reason::HasMoved checks if the bounce reason is "hasmoved" or not. that's it, that's the girl. and heads up: this class is called only by the Sisimai::Reason class β€” she does not take walk-ins, she's booked πŸŽ€

so what is "hasmoved"? it's the error you get when the user's mailbox has moved and is not forwarded automatically. rip to that address i guess 😭

Sisimai will set hasmoved as the reason of the email bounce if the value of the Status: field in the bounce email is 5.1.6. no cap, that's the trigger.

check out this absolute mood of an error message:

<kijitora@example.go.jp>: host mx1.example.go.jp[192.0.2.127] said: 550 5.1.6 recipient
    no longer on server: kijitora@example.go.jp (in reply to RCPT TO command)

"recipient no longer on server" β€” bestie didn't just leave, she left the whole building πŸ¦‹


πŸ‘‘ CLASS METHODS πŸ‘‘

πŸ’« text()

text() returns the fixed string "hasmoved". that's the whole method. she's committed to one answer and honestly? respect 🫢

print Sisimai::Reason::HasMoved->text;  # hasmoved

πŸ’« match(string)

match() returns 1 if the argument matched with patterns defined in this class. so you hand her a string, she tells you if it's giving hasmoved energy 🌈

print Sisimai::Reason::HasMoved->match('address cat@example.jp has been replaced by ');   # 1

πŸ’« true(Sisimai::Fact)

true() returns 1 if the bounce reason is "hasmoved". important detail bestie: the argument must be a Sisimai::Fact object, and this method is called only from the Sisimai::Reason class. no random objects, she has standards ⭐


⭐ AUTHOR ⭐

azumakuniyuki β€” the legend themselves πŸ‘‘


Copyright (C) 2015-2016,2018,2020,2021,2024-2026 azumakuniyuki, All rights reserved.


πŸ’œ LICENSE πŸ’œ

This software is distributed under The BSD 2-Clause License.


and that's the page fr fr 🫢 shoutout to perl v5.40.1 and the date 2026-07-05 for making this whole thing official β€” this doc was cooked up on that day, no cap πŸ’–βœ¨

πŸ“¦ where this page comes from