NAME
Mail::Milter::Authentication - A Perl Mail Authentication Milter
DESCRIPTION
A Perl Implementation of email authentication standards rolled up into a single easy to use milter.
SYNOPSIS
Subclass of Net::Server::PreFork for bringing up the main server process for authentication_milter.
Please see Net::Server docs for more detail of the server code.
Please see the output of 'authentication_milter --help' for usage help.
FUNCTIONS
METHODS
- child_init_hook()
-
Hook which runs after forking, sets up per process items.
- run_n_children_hook()
-
Hook which runs in parent before it forks children.
- child_is_talking_hook( $sock )
-
Hook which runs when a child wishes to communicate with the parent.
- process_request()
-
Hook which runs for each request, passes control to metrics handler or process_main as appropriate.
- process_main()
-
Method which runs for each request, sets up per request items and processes the request.
- control($command)
-
Run a daemon command. Command can be one of start/restart/stop/status.
- find_process()
-
Search the process table for an authentication_milter master process
- get_valid_pid($pid_file)
-
Given a pid file, check for a valid process ID and return if valid.
- start($hashref)
-
Start the server. This method does not return.
$hashref = { 'pid_file' => 'The pid file to use', # 'daemon' => 1/0, # Daemonize process? }
- fatal($error)
-
Log a fatal error and die in child
- fatal_global($error)
-
Log a fatal error and die in child and parent
- setup_handlers()
-
Setup the Handler objects.
- load_handler( $name )
-
Load the $name Handler module
- setup_handler( $name )
-
Setup the $name Handler object
- destroy_handler( $name )
-
Remove the $name Handler
- register_callback( $name, $callback )
-
Register the specified callback
- sort_all_callbacks()
-
Sort the callbacks into the order in which they must be called
- sort_callbacks( $callback )
-
Sort the callbacks for the $callback callback into the right order
- destroy_objects()
-
Remove references to all objects
- get_queue_id()
-
Return the queue ID (for logging) if possible.
- logerror( $line )
-
Log to the error log.
- loginfo( $line )
-
Log to the info log.
- logdebug( $line )
-
Log to the debug log.
- enable_extra_debugging()
-
Turn on extra debugging mode, will cause child to exit on close.
- extra_debugging( $line )
-
Cause $line to be written to log if extra debugging mode is enabled.
- child_finish_hook()
-
Hook which runs when the child is about to finish.
- get_client_details()
-
Get the details of the connecting client.
- get_client_path()
-
Get the path of the connecting client.
- get_client_port()
-
Get the port of the connecting client.
- get_client_host()
-
Get the host of the connecting client.
- get_client_proto()
-
Get the protocol of the connecting client.
- pre_loop_hook()
-
Hook which runs in the master before looping.
- pre_server_close_hook()
-
Hook which runs before the server closes.
DEPENDENCIES
English
JSON
Mail::DKIM
Mail::DMARC
Mail::SPF
MIME::Base64
Module::Load
Module::Loaded
Net::DNS
Net::IP
Net::Server
Pod::Usage
Proc::ProcessTable
Sys::Hostname
Sys::Syslog
AUTHORS
Marc Bradshaw <marc@marcbradshaw.net>
COPYRIGHT
Copyright 2017
This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.