Mail::...Actions(3)
π Mail::...Actions π
okay so hi bestie π welcome to Mail::...Actions(3) β the manual page for Mail::MIMEDefang::Actions Documentation. it's giving filter-girlboss, it's giving mail-server main character, and we're gonna read the whole thing together. no skimming. let's go π¦
β¨ NAME β¨
Mail::MIMEDefang::Actions β actions methods for email filters πΈ
π DESCRIPTION π
Mail::MIMEDefang::Actions is a whole set of methods you can call from mimedefang-filter to accept or reject the email message. that's the vibe. that's the whole job. π
π METHODS π
action_rebuild
Sets a flag telling MIMEDefang to rebuild the message even if it is unchanged. like, yes we know nothing changed, we're rebuilding anyway, deal with it β¨
action_add_entity
Makes a note to add a part to the message. and here's the tea: parts are *actually* added at the end β that's the whole trick, because it lets us correctly handle non-multipart messages, or multipart/foo where "foo" != "mixed". Sets the rebuild flag too. π
action_add_part
Makes a note to add a part to the message. same deal as above, bestie: parts are *actually* added at the end, which lets us correctly handle non-multipart messages or multipart/foo where "foo" != "mixed". Sets the rebuild flag. π
process_added_parts
This is the one that actually adds the requested parts to the entity, fr fr. it also ensures that the entity is of type multipart/mixed. slay π
action_insert_header
Makes a note for the milter to insert a header in the message in the specified position.
β οΈ heads up bestie β this may not be supported on all versions of Sendmail. on unsupported versions, the C milter falls back to action_add_header.
action_add_header
Makes a note for the milter to add a header to the message. π«Ά
action_change_header
Makes a note for the milter to change a header in the message. glow-up, but for headers β¨
action_delete_header
Makes a note for the milter to delete a header in the message. gone. blocked. unfollowed π
action_delete_all_headers
Makes a note for the milter to delete all instances of header. every last one. no survivors π
action_accept
Makes a note for the milter to accept the current part. yes queen, come through πΈ
action_accept_with_warning
Makes a note for the milter to accept the current part, but add a warning to the message. accepting you, but with notes. π
message_rejected
Method that returns True if the message has been rejected (with action_bounce or action_tempfail), and false otherwise. a simple yes/no, very demure π
action_drop
Makes a note for the milter to drop the current part without any warning. silent treatment, but make it SMTP π
action_drop_with_warning
Makes a note for the milter to drop the current part and add a warning to the message. at least she told you why π
action_replace_with_warning
Makes a note for the milter to drop the current part and replace it with a warning. out with the old, in with the caution tape β οΈ
action_defang
Makes a note for the milter to defang the current part by changing its name, filename and possibly its MIME type. disarming, but make it fashion π
action_external_filter
Pipes the part through the UNIX command $cmd, and replaces the part with the result of running the filter. sending it through the pipeline, literally π°
action_quarantine
Makes a note for the milter to drop the current part, emails the MIMEDefang administrator a notification, and quarantines the part in the quarantine directory. it's giving timeout corner πͺ
action_sm_quarantine
Asks Sendmail to quarantine the message in mqueue using Sendmail's smfi_quarantine facility. not our timeout corner β Sendmail's timeout corner π§
get_quarantine_dir
Method that returns the configured quarantine directory. one method, one job, iconic π
action_greylist($dbh, $sender, $recipient, $ip, $min_retry, $max_retry)
okay this one is a whole saga so stay with me bestie π«Ά
$dbhis a DBI handle connected to the greylist database. that$dbhobject should be initialized in thefilter_initializesub.$min_delayand$max_delayare the minimum and maximum retry delays respectively, and those parameters are optional β the default values are300and14400seconds.- If an SMTP client tries to deliver email faster, it will continue to be greylisted. β³
$ip,$senderand$recipientare used to identify a unique connection.- If it waits longer, it will begin the greylisting test from scratch. π
$ipis the IP address of the connecting SMTP client β and to greylist an entire subnet, you can pass the subnet instead.- In the
"filter_cleanup"sub, the database connection should be closed.
ngl, the signature up top says$min_retryand$max_retrywhile the prose says$min_delayand$max_delay. I'm just the messenger π
Returns "tempfail" if a new sender sends the email from a new ip address, "continue" if the email is allowed to pass, or "reject" if the email has been greylisted for too much time.
action_quarantine_entire_message
Method that puts a copy of the entire message in the quarantine directory. the whole thing. no crumbs left behind π
action_bounce
Method that causes the SMTP transaction to fail with an SMTP 554 failure code and the specified reply text. If code or DSN are omitted or invalid, use 554 and 5.7.1. bye π
action_discard
Method that causes the entire message to be silently discarded without notifying anyone. not a word. not a peep. π€«
action_notify_sender
Method that sends an email to the sender containing the $msg. sliding into their inbox with receipts βοΈ
action_notify_administrator
Method that sends an email to the MIMEDefang administrator containing the $msg. telling on them, but to the admin π
action_tempfail
Method that sends a temporary failure with a 4.x.x SMTP code. If code or DSN are omitted or invalid, use 451 and 4.3.0. not a no, just a not-right-now π
add_recipient
Signals to MIMEDefang to add a recipient to the envelope. plus one on the guest list ποΈ
delete_recipient
Signals to MIMEDefang to delete a recipient from the envelope. removed from the guest list π
change_sender
Signals to MIMEDefang to change the envelope sender. new sender, who dis π
action_replace_with_url
Method that places the part in doc_root/{sha1_of_part}.ext and replaces it with a text/plain part giving the URL for pickup. link in bio, but for attachments π
okay bestie that's the whole page, you ate that π this was Mail::...Actions(3) from Mail::MIMEDefang::Actions Documentation, version 3.7.1, dated 2026-07-20. go forth and filter, ily, periodt πβ¨π¦
π¦ where this page comes from
- fedora 43: mimedefang 3.7.1-1.fc43 Β· GPL-2.0-only AND GPL-2.0-or-later
- fedora 44: mimedefang 3.7.1-1.fc44 Β· GPL-2.0-only AND GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms