Mail::MIMEDefang::Actions - actions methods for email filters
Mail::MIMEDefang::Actions are a set of methods that can be called from mimedefang-filter to accept or reject the email message.
Sets a flag telling MIMEDefang to rebuild message even if it is unchanged.
Makes a note to add a part to the message. 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.
Makes a note to add a part to the message. 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.
Actually adds requested parts to entity. Ensures that entity is of type multipart/mixed.
Makes a note for milter to insert a header in the message in the specified position. May not be supported on all versions of Sendmail; on unsupported versions, the C milter falls back to action_add_header.
Makes a note for milter to add a header to the message.
Makes a note for milter to change a header in the message.
Makes a note for milter to delete a header in the message.
Makes a note for milter to delete all instances of header.
Makes a note for milter to accept the current part.
Makes a note for milter to accept the current part, but add a warning to the message.
Method that returns True if message has been rejected (with action_bounce or action_tempfail), false otherwise.
Makes a note for milter to drop the current part without any warning.
Makes a note for milter to drop the current part and add a warning to the message.
Makes a note for milter to drop the current part and replace it with a warning.
Makes a note for milter to defang the current part by changing its name, filename and possibly MIME type.
Pipes the part through the UNIX command $cmd
, and replaces the
part with the result of running the filter.
Makes a note for milter to drop the current part, emails the MIMEDefang administrator a notification, and quarantines the part in the quarantine directory.
Asks Sendmail to quarantine message in mqueue using Sendmail\'s smfi_quarantine facility.
Method that returns the configured quarantine directory.
Method that puts a copy of the entire message in the quarantine directory.
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.
Method that causes the entire message to be silently discarded without without notifying anyone.
Method that sends an email to the sender containing the $msg
.
Method that sends an email to MIMEDefang administrator containing
the $msg
.
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.
$dbh is a DBI handle connected to the greylist database. $dbh object should be initialized in filter_initialize sub. $min_delay and $max_delay are the minimum and maximum retry delays respectively, those parameters are optional (default values are 300 and 14400 seconds). If an SMTP client tries to deliver email faster, it will continue to be greylisted. $ip, $sender and $recipient are used to identify a unique connection. If it waits longer, it will begin the greylisting test from scratch. $ip is the IP address of the connecting SMTP client, to greylist an entire subnet you can pass the subnet instead. In filter_cleanup sub, the database connection should be closed. 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.
Signals to MIMEDefang to add a recipient to the envelope.
Signals to MIMEDefang to delete a recipient from the envelope.
Signals to MIMEDefang to change the envelope sender.
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.