You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.
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) = @_;
my ($self, @foo) = @_;
$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) = @_;
my ($self) = (@_);
quit
hook and ONLY if no plugin hooking “hook_quit” returned DONEmy ($self) = (@_);
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 ) = @_;