|  |  
 |   |   
 NAMEMail::Milter::Authentication::Net::Milter - Local modified copy of Net::Milter VERSIONversion 3.20241024 SYNOPSIS    use Net::Milter;
    my $milter = new Net::Milter;
    $milter->open('127.0.0.1',5513,'tcp');
    my ($milter_version,$returned_actions_ref,$returned_protocol_ref) =
    $milter->protocol_negotiation();
    my (@results) = $milter->send_header('From','martin@localhost');
    foreach (@results) {
      if ($$_{action} eq 'reject')  {exit;}
    }
Also see example in scripts directory. DESCRIPTIONPerl module to provide a pure Perl implementation of the MTA part the milter interface. The goal of this module is to allow other email systems to easily integrate with the various email filters that accept content via milter. This implementation of milter is developed from the description provided by Todd Vierling, cvs.sourceforge.net/viewcvs.py/pmilter/pmilter/doc/milter-protocol.txt?rev=1.2 and from examining the tcp output from Sendmail. Attributes
 Methods
 The default is to allow all actions, setting the value to be '0' of any of these keys in the argument hash informs the filter not perform the action. e.g.     $milter->protocol_negotiation(
        SMFIF_ADDHDRS => 0,
        SMFIF_CHGBODY => 1
        );
informs the filter it is able to change the contents of the message body, but it may not add message headers. Withheld content : 
 The default is to inform the filter to expect everything, setting the value of the key to '1' informs the filter to not expect the content. e.g.     $milter->protocol_negotiation(
        SMFIF_ADDHDRS => 0,
        SMFIF_CHGBODY => 1,
        SMFIP_NOEHO => 1,
        SMFIP_NOCONNECT => 1
    );
informs the filter it is able to change the contents of the message body, but it may not add message headers, it will not receive an end of headers signal, nor will it receive the connection details. The method returns three parameters, the protocol version, an array reference containing all the names of the actions the filter understands it is able to perform, and an array reference containing the names of the content it understands it won't be sent. 
 
 Yes I know most of this is redundant, since other methods repeat this information, but this is what the spec says. e.g.
   For further explanation of macros see : http://people.freenet.de/slgig/op_en/macros.html and http://www.sendmail.com/idemo/prod_guide/switch/switchdemo/helplets/en/Macros.html NAMENet::Milter - Masquerade as the MTA to communicate with email filters through a milter interface. RETURN CODESMany methods return an array of hash references. Each hash describes one response from the filter, a filter may return more than one response to any sent data, such as 'add a header','modify body', 'continue'. The hash keys are : 
 TIPSCall the various methods in the order that they would be called if accepting a SMTP stream, ie send_connect(), send_helo(), send_mail_from(), send_rcpt_to(), send_header(), send_end_headers(), send_body(). Some milter filters expect this and refuse to return values when expected. Equally continuing to send data when a filter has rejected or accepted a message may confuse it, and refuse to return values for subsequent data, so always check the codes returned. In some circumstantes 'read' has not worked, now replaced by 'sysread' which is reported to fix the problem. If this doesn't work, change 'sysread' to 'read' and email me please. Some filters appear to expect a bitwise negation of the protocol field. This is now disabled as default. If you wish to enable this, please set PROTOCOL_NEGATION => 1 SEE ALSOThis module is the Yang to Ying's Sendmail::Milter, which can act as the other end of the communication. NAMINGI choose not to put this module in the Sendmail namespace, as it has nothing to do with Sendmail itself, neither is it anything to do with SMTP, its a net protocol, hence the Net namespace. AUTHORMartin Lee, MessageLabs Ltd. (mlee@messagelabs.com) Copyright (c) 2003 Star Technology Group Ltd / 2004 MessageLabs Ltd. AUTHORMarc Bradshaw <marc@marcbradshaw.net> COPYRIGHT AND LICENSEThis 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. 
 
 |