NAME Mail::Milter::Authentication - A Perl Mail Authentication Milter VERSION version 4.20261122 SYNOPSIS Subclass of Net::Server::PreFork for bringing up the main server process for authentication_milter. This class handles the server aspects of Authentication Milter. For individual Protocol handling please see the Mail::Milter::Authentication::Protocol::* classes For request handling please see Mail::Milter::Authentication::Handler Please see Net::Server docs for more detail of the server code. Please see the output of 'authentication_milter --help' for usage help. DESCRIPTION A Perl Implementation of email authentication standards rolled up into a single easy to use milter. METHODS preload_modules( $from, $matching ) Preload (pre-fork) lazy loading modules. Takes a Package Name and a Base module, and loads all modules which match. write_to_log_hook() Hook which runs to write logs idle_loop_hook() Hook which runs in the parent periodically. post_bind_hook() Hook which runs in the parent after binding, before privileges are dropped. Sets the mode of each unix socket from the umask configured for its connection. The process umask is not changed, so it does not apply to other files we create. pre_loop_hook() Hook which runs in the parent before looping. run_n_children_hook() Hook which runs in parent before it forks children. child_init_hook() Hook which runs after forking, sets up per process items. child_finish_hook() Hook which runs when the child is about to finish. pre_server_close_hook() Hook which runs before the server closes. dequeue() Call the dequeue handlers get_client_proto() Get the protocol 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_path() Get the path of the connecting client. get_client_details() Get the details of the connecting client. 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. send_exception_email() Send an email to the administrator with details of a problem. 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. 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. logerror( $line ) Log to the error log. loginfo( $line ) Log to the info log. logdebug( $line ) Log to the debug log. FUNCTIONS get_installed_handlers() Return an array ref of installed handler modules. unix_socket_umasks( $config ) Returns a hashref of unix socket paths to the umask configured for each. Connections without their own umask, including metrics without metric_umask, use the top level umask. This matches the earlier behaviour, where the top level umask was applied to the process and so to every socket. send_panic_email() Send an email to the administrator with details of a problem. Called from the parent process if the server exits. get_valid_pid($pid_file) Given a pid file, check for a valid process ID and return if valid. find_process() Search the process table for an authentication_milter parent process control($command) Run a daemon command. Command can be one of start/restart/stop/status. start($hashref) Start the server. This method does not return. $hashref = { 'pid_file' => 'The pid file to use', # 'daemon' => 1/0, # Daemonize process? } AUTHOR Jemma Bradshaw COPYRIGHT AND LICENSE This software is copyright (c) 2026 by Jemma Bradshaw. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.