GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Mail::Milter::Authentication::Tester::HandlerTester(3) User Contributed Perl Documentation Mail::Milter::Authentication::Tester::HandlerTester(3)

Mail::Milter::Authentication::Tester::HandlerTester - Class for testing handlers

version 3.20241024

Emulates an Authentication Milter environment with methods for testing Handlers.

Can snapshot and restore state at any point.

Make testing of Authentication Milter Handler modules easier.

Mail::Milter::Authentication::Tester::HandlerTester - Test harness for testing Authentication Milter Handlers

Instantiate a new HandlerTester object.

$args is a hashref with the following entries.

Required

The Prefix path containing the authentication milter config file(s). This should contain all configuration files required for your test, the main authentication_milter.json file can be overridden by the handler_config option (see below).

This location should, for example, contain a valid mail-dmarc.ini for any tests using the DMARC handler.

If present, the config will be built from a generic default SMTP environment, with the given HASHREF substituted as the Handler configuration. This eliminates the need to have a config file for each handler configuration you wish to test.
The zonefile data for use with Net::DNS::Resolver::Mock
A zonefile for use with Net::DNS::Resolver::Mock

Save a snapshot with the given name
Restore state from the given snapshot
Returns the Handler object
Call the connect callbacks with the given data.

Returns the value of get_return()

Call the helo callbacks with the given data.

Returns the value of get_return();

Call the envfrom callbacks with the given data.

Returns the value of get_return();

Call the envrcpt callbacks with the given data.

Returns the value of get_return();

Call the header callbacks with the given data.

Returns the value of get_return()

Call the end_of_headers callbacks.

Returns the value of get_return()

Call the body callbacks with the given data.

Returns the value of get_return()

Call the eom callbacks.

Returns the value of get_return()

Call the close callbacks.

Returns the value of get_return()

Call the abort callbacks.
Call the addheader callbacks.
Run with a given set of data as defined in $args hashref.

Dies if the mail would be rejected.

Arguments of $args are.

The name of the connecting server.
The ip address of the connecting server.
The helo string.
The envelope MAILFROM address.
Arrayref of the envelope RCPTTO addresses.
The email body.
Returns the value of get_return() from the current handler object.
Returns the value of get_reject_mail() from the current handler object.
Returns a dummy authservid servername.
Returns a Mail::AuthenticationResults::Header object representing the authentication results header which would be added to the message.

  Carp
  Clone
  Mail::AuthenticationResults::Header
  Mail::AuthenticationResults::Header::AuthServID
  Mail::Milter::Authentication
  Mail::Milter::Authentication::Protocol::Milter
  Mail::Milter::Authentication::Protocol::SMTP
  Mail::Milter::Authentication::Config
  Module::Load
  Net::DNS::Resolver::Mock

Marc Bradshaw <marc@marcbradshaw.net>

Copyright 2018

This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

Marc Bradshaw <marc@marcbradshaw.net>

This software is copyright (c) 2020 by Marc 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.

2024-10-24 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.