| Home | Mailinglist | Download | License |
| Documentation | db/suite | db/common | db/base | db/relay | db/user | db/greylist |
db/user - lookup existing recipients (users) plugin for the database plugin suite
Enable user-level validation of addresses so that qpsmtpd can readily bounce invalid messages at the smtp level.
It does this by looking up the recipient address resp. user and host part of the email address in a database.
The inspiration of this module comes from a mailer setup with qpsmtpd and exim, where exim is used to manage virtual accounts in a database as described on http://flakey.info/mailserver/ or http://www.xmn-berlin.de/~marte/exim/exim4_mysql_amavis_spamassasin.html
db/user requires the plugin db/common to be installed.
It requires the Perl modules
Qpsmtpd::DSN
It's tested with qpsmtpd 0.32 and MySQL as database.
All other database plugins must follow the basic plugin db/base - e.g.:
db/base db/relay db/user db/greylist
| Parameter | Example | Optional/Default |
| email_table | email_table=emailtable
| |
| domain_table | domain_table=emailtable
| |
| email_address | email_address=
| |
| email_user | email_user=local_part
| |
| email_domain | email_domain=domain
| |
| email_enabled | email_enabled=is_enabled | optional |
| email_enabled_value | email_enabled_value=yes | optional |
| domain_domain | domain_domain=domain |
Call: $self->init ( $qp )
$qpCalled from qpsmtpd on startup.
Calls isa_plugin('db/common') and db/common::init ( $qp ).
Call: $self->db_init_config ( $config_fields, $config_fields_empty, $config_fields_default )
$config_fields, $config_fields_empty, $config_fields_defaultCalled from db/common::init.
Sets the local config hashes. See CONFIGURATION.
go top
Call: $self->db_valid_config ()
Called from db/common::init.
If the field email_address is given, email_user and email_domain are
set to undef and vice versa.
If the field email_enabled is given, email_enabled_value must be present.
If notify_email is given, assures that 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.
Calls user_email_record and user_domain_record if db/common::db_rec is emtpy.
Returns:
| db/common::db_declined | no decision, log entries: |
Local address '...@...' | if address belongs to a virtual user of our domain(s). |
Foreign address '...@...' | if address is not in our domain(s). |
Qpsmtpd::DSN->mbox_disabled | reject the message, log entry/message: |
Mailbox '...@...' disabled, not accepting messages | if not email_enabled |
Qpsmtpd::DSN->no_such_user | reject the message, log entry/message: |
Address '...@...' doesn't exist on this server | if user unknown |
| db/common::db_denysoft_error | on error. |
Call: $self->user_email_record ( [ $msg ] )
$msgCalls db/common::db_open.
Calls db_error and dies with the optional $msg
or DB_ERROR.
Call: $self->user_domain_record ( [ $msg ] )
$msgCalls db/common::db_open.
Calls db_error and dies with the optional $msg
or DB_ERROR.
Thanks to Ask Bjoern Hansen for qpsmtpd.
(c) Ernesto 2007, ernesto@dienstleistung-kultur.de
http://dienstleistung-kultur.de/qpsmtpd/
As per the qpsmtpd license.