Home

| Home | Mailinglist | Download | License |

| Documentation | db/suite | db/common | db/base | db/relay | db/user | db/greylist |

qpsmtpd - Plugin db/base Documentation


NAME db/base

db/base - base plugin for the database plugin suite

go top


VERSION 2007.1

go top


DESCRIPTION

On the beginning of a SMTP connection this module connects to the configured database. It disconnects when the SMTP connection is closed.

go top


REQUIREMENTS

db/base requires the plugin db/common to be installed.

It's tested with qpsmtpd 0.32 and MySQL as database.

go top


CONFIGURATION

/etc/qpsmtpd/plugins

All other database plugins must follow the basic plugin db/base - e.g.:

 db/base
 db/relay
 db/user
 db/greylist

/etc/qpsmtpd/db_base

ParameterExampleOptional/Default
driverdriver=mysql
databasedatabase=maildb
useruser=mailuser
passwdpasswd=x5fasoe4optional
notify_emailnotify_email=heinz@werner.deoptional
notify_fromnotify_from=webmaster@myserver.dedefault: postmaster@(qp->config->me)
notify_from_namenotify_from_name=MYSERVER Mailerdefault: QPSMTPD Mail System

go top


CONSTRUCTOR METHODS

init

Call: $self->init ( $qp )

Called from qpsmtpd on startup.

Calls isa_plugin('db/common') and db/common::init ( $qp ).

go top

db_init_config

Call: $self->db_init_config ( $config_fields, $config_fields_empty, $config_fields_default )

Called from db/common::init.

Sets the local config hashes. See CONFIGURATION.

go top

db_valid_config

Call: $self->db_valid_config ()

Called from db/common::init.

Tries to connect to the database calling db/common::db_connect, disconnects on success.

If notify_email is given, validates notify_email and notify_from by calling db/common::db_valid_email.

Calls db/common::db_die on errors.

On errors in db_valid_config qpsmtpd won't start.

go top


HOOKS

hook_connect

Calls db/common::db_notify ( notify_* ).

Calls db/common::db_open.

Returns:

db/common::db_declinedon success.
db/common::db_denysoft_erroron error.

go top

hook_disconnect

Calls db/common::db_close.

Returns:

db/common::db_declined.

go top


CREDITS

Thanks to Ask Bjoern Hansen for qpsmtpd.

http://smtpd.develooper.com/

go top


COPYRIGHT

(c) Ernesto 2007, ernesto@dienstleistung-kultur.de

http://dienstleistung-kultur.de/qpsmtpd/

go top


LICENCE

As per the qpsmtpd license.

go top


This is a service of dienstleistung-kultur.de            Mailsystem QPSMTPD            Comments to Ernesto at ernesto@dienstleistung-kultur.de            Impressum