2002-07-03 15:10:44 +02:00
|
|
|
package Qpsmtpd::Constants;
|
|
|
|
use strict;
|
2002-07-08 04:30:11 +02:00
|
|
|
require Exporter;
|
|
|
|
|
2004-06-15 00:25:52 +02:00
|
|
|
my (@common) = qw(OK DECLINED DONE DENY DENYSOFT DENYHARD
|
2005-06-18 20:22:16 +02:00
|
|
|
DENY_DISCONNECT DENYSOFT_DISCONNECT CONTINUATION
|
2004-06-15 00:25:52 +02:00
|
|
|
);
|
2004-03-05 13:46:24 +01:00
|
|
|
my (@loglevels) = qw(LOGDEBUG LOGINFO LOGNOTICE LOGWARN LOGERROR LOGCRIT LOGALERT LOGEMERG LOGRADAR);
|
2002-07-08 04:30:11 +02:00
|
|
|
|
|
|
|
use vars qw($VERSION @ISA @EXPORT);
|
|
|
|
@ISA = qw(Exporter);
|
2004-03-05 13:46:24 +01:00
|
|
|
@EXPORT = (@common, @loglevels);
|
2002-07-03 15:10:44 +02:00
|
|
|
|
2005-06-18 20:22:16 +02:00
|
|
|
use constant OK => 900;
|
|
|
|
use constant DENY => 901; # 550
|
|
|
|
use constant DENYSOFT => 902; # 450
|
|
|
|
use constant DENYHARD => 903; # 550 + disconnect (deprecated in 0.29)
|
|
|
|
use constant DENY_DISCONNECT => 903; # 550 + disconnect
|
|
|
|
use constant DENYSOFT_DISCONNECT => 904; # 450 + disconnect
|
|
|
|
use constant DECLINED => 909;
|
|
|
|
use constant DONE => 910;
|
|
|
|
use constant CONTINUATION => 911;
|
2004-06-11 08:06:30 +02:00
|
|
|
|
2002-07-08 04:30:11 +02:00
|
|
|
|
2004-03-05 13:46:24 +01:00
|
|
|
# log levels
|
|
|
|
use constant LOGDEBUG => 8;
|
|
|
|
use constant LOGINFO => 7;
|
|
|
|
use constant LOGNOTICE => 6;
|
|
|
|
use constant LOGWARN => 5;
|
|
|
|
use constant LOGERROR => 4;
|
|
|
|
use constant LOGCRIT => 3;
|
|
|
|
use constant LOGALERT => 2;
|
|
|
|
use constant LOGEMERG => 1;
|
|
|
|
use constant LOGRADAR => 0;
|
2002-07-03 15:10:44 +02:00
|
|
|
|
|
|
|
1;
|
2002-07-04 03:45:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
=head1 NAME
|
|
|
|
|
2003-06-24 09:42:38 +02:00
|
|
|
Qpsmtpd::Constants - Constants for plugins to use
|
2002-07-04 03:45:19 +02:00
|
|
|
|
2003-06-24 09:42:38 +02:00
|
|
|
=head1 CONSTANTS
|
2002-07-04 03:45:19 +02:00
|
|
|
|
2003-06-24 18:04:55 +02:00
|
|
|
See L<README.plugins> for hook specific information on applicable
|
|
|
|
constants.
|
|
|
|
|
2003-06-24 09:42:38 +02:00
|
|
|
Constants available:
|
2002-07-04 03:45:19 +02:00
|
|
|
|
2003-06-24 09:42:38 +02:00
|
|
|
=over 4
|
|
|
|
|
|
|
|
=item C<OK>
|
|
|
|
|
|
|
|
Return this only from the queue phase to indicate the mail was queued
|
|
|
|
successfully.
|
|
|
|
|
|
|
|
=item C<DENY>
|
|
|
|
|
|
|
|
Returning this from a hook causes a 5xx error (hard failure) to be
|
|
|
|
returned to the connecting client.
|
|
|
|
|
|
|
|
=item C<DENYSOFT>
|
|
|
|
|
|
|
|
Returning this from a hook causes a 4xx error (temporary failure - try
|
|
|
|
again later) to be returned to the connecting client.
|
|
|
|
|
|
|
|
=item C<DECLINED>
|
|
|
|
|
|
|
|
Returning this from a hook implies success, but tells qpsmtpd to go
|
|
|
|
on to the next plugin.
|
|
|
|
|
|
|
|
=item C<DONE>
|
|
|
|
|
|
|
|
Returning this from a hook implies success, but tells qpsmtpd to
|
|
|
|
skip any remaining plugins for this phase.
|
|
|
|
|
|
|
|
=back
|
|
|
|
|
|
|
|
=cut
|