You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.
You don't have an account yet? Just get one: Register
Forgotten your password? Get a new one: Send new password
This is the list of hooks that qpsmtpd provides.
You may also want to read about the Plug-in API.
For now, the best documentation available is README.plugins and plugins.pod
Some hooks need review.... I recommend to read the plugins.pod, as it’s more up to date. Changes will go there first...and if someone writes a pod2wiki converter changes would be here faster... Done that myself :)
— vetinari 2006/03/14, 2007/12/15
fork().Note: this isn’t available in plain qpsmtpd because the connection is already open when qpsmtpd starts.
qpsmtpd-forkserver:
my ($self,$transaction,%args) = @_;
# %args is:
# %args = ( remote_ip => inet_ntoa($iaddr),
# remote_port => $port,
# local_ip => inet_ntoa($laddr),
# local_port => $lport,
# max_conn_ip => $MAXCONNIP,
# child_addrs => [values %childstatus],
# );
do we really have a $transaction object at this time? ... or “just” a $connection?
my ($self,$transaction) = @_;
none, i.e. they are ignored
first argument is $self, others:
$self->log($level, $msg);
my ($self, $transaction, $trace, $hook, $plugin, @log) = @_; # $trace: level of message, for example LOGWARN, LOGDEBUG, ... # $hook: the hook in/for which this logging was called # $plugin: the plugin calling this hook # @log: the log message
my @cfg = $self→qp→config($cfg_name);
return (OK, @{$config{$value}}) if exists $config{$value};
return (DECLINED);
my ($self,$transaction,$value) = @_; # $value: the requested config item(s)
my ($self, $transaction, $host) = @_; # $host: the name the client sent in the (EH|HE)LO line
MAIL FROM: command, the given argument is parsed by Qpsmtpd::Address and then this hook is called.my ($self,$transaction, $sender) = @_; # $sender: an Qpsmtpd::Address object for sender of the message
According to the SMTP protocol, you can not reject until after the RCPT stage (except for protocol errors, i.e. syntax errors in address). So store it in an $transaction→note() and process it later in an rcpt hook.
my ($self, $transaction, $recipient) = @_; # $rcpt = Qpsmtpd::Address object with the given recipient address
my ($self, $transaction) = @_;
my ($self, $transaction) = @_;
my ($self, $transaction) = @_;
first argument is $self, others:
quit hook and ONLY if no plugin hooking “hook_quit” returned DONEmy ($self) = @_; # FIXME is this correct?
commands or just count the number of unknown commands from the client, see below for examples.
my ($self, $transaction, $cmd, @args) = @_; # $cmd = the first "word" of the line sent by the client # @args = all the other "words" of the line sent by the client # "word(s)": white space split() line
, probably:
my ($self, $address) = @_;
my ($self, $transaction, $prev_hook, $return, $return_text) = @_;
my ( $self, $transaction, $prev_hook, $return, $return_text ) = @_;