Go to file
Matt Simerson b81d464c87 added p0f support to greylist plugin
- these changes are in the previous TCPLOCAL patch. Documented here.
added p0f config option
added POD docs to explain usage
modified $dbdir selection logic. The previous logic failed when QPHOME was
 not selected (as is the case when tests are being run).
Added '.' as the dir of last resort for $dbdir selection (others $EMPTY/dir
 dumped greylisting database in / )

  - These changes are included in this patch -
Added t/plugin_tests/greylisting, with greylist logic testing (tests are
 disabled by default, as greylisting is disabled in config.sample/plugins)
Added example entry in config.sample/plugins

Signed-off-by: Robert <rspier@pobox.com>
2010-05-11 21:19:52 -07:00
config.sample added p0f support to greylist plugin 2010-05-11 21:19:52 -07:00
docs added auth_vpopmail plugin 2010-05-11 21:11:42 -07:00
lib add TCPLOCAL* variables to $qp->connection 2010-05-11 21:15:57 -07:00
log Revert accidental commit 909. 2008-05-17 03:54:24 +00:00
packaging/rpm Modify RPM packaging to allow an SRPM to be built. 2010-04-07 22:16:11 -07:00
plugins added local_ip option to p0f plugin 2010-05-11 21:16:56 -07:00
t added p0f support to greylist plugin 2010-05-11 21:19:52 -07:00
.gitignore Merge branch 'rpm' 2010-02-12 21:30:55 -08:00
.perltidyrc Merge branches/0.3x back to trunk. 2005-12-22 21:30:53 +00:00
Changes start working on Changes file for 0.84+next 2010-05-10 21:23:15 -07:00
CREDITS Misc documentation updates 2010-05-04 14:18:50 -07:00
LICENSE Update copyright year 2010-04-07 22:32:41 -07:00
Makefile.PL Note Net::IP dependency (Larry Nedry) 2010-04-07 21:51:55 -07:00
MANIFEST new plugin auth_vpopmaild 2010-05-10 21:02:46 -07:00
MANIFEST.SKIP Update manifest 2009-09-15 14:58:50 -07:00
qpsmtpd Update copyright year 2010-04-07 22:32:41 -07:00
qpsmtpd-async Detach and daemonize only after reading the configuration and loading the plugins, to give the init scripts a chance to detect failed startups due to broken configuration or plugins. 2008-09-04 11:38:54 +00:00
qpsmtpd-forkserver Update copyright year 2010-04-07 22:32:41 -07:00
qpsmtpd-prefork More robust child spawning for prefork 2009-09-15 14:39:04 -07:00
README Misc documentation updates 2010-05-04 14:18:50 -07:00
README.plugins Consolidate plugin documentation in docs/plugins.pod 2009-02-10 20:51:52 -08:00
run Increase softlimit and set LANG=C in ./run file 2009-02-27 19:14:17 -08:00
STATUS new plugin - check_bogus_bounce 2010-05-09 22:37:13 -07:00

#
#  this file is best read with `perldoc README`
#

=head1 NAME

Qpsmtpd - qmail perl simple mail transfer protocol daemon

web:
  http://smtpd.develooper.com/

mailinglist:
  qpsmtpd-subscribe@perl.org


=head1 DESCRIPTION

What is Qpsmtpd?

Qpsmtpd is an extensible SMTP engine written in Perl.  No, make that
easily extensible!  See plugins/quit_fortune for a very useful, er,
cute example.

=head2 License

Qpsmtpd is licensed under the MIT License; see the LICENSE file for
more information.

=head2 What's new in this release?

See the Changes file! :-)


=head1 Installation

=head2 Required Perl Modules

The following Perl modules are required:
   Net::DNS
   MIME::Base64
   Mail::Header (part of the MailTools distribution)

If you use a version of Perl older than 5.8.0 you will also need
   Data::Dumper
   File::Temp
   Time::HiRes

The easiest way to install modules from CPAN is with the CPAN shell.
Run it with

  perl -MCPAN -e shell

=head2 qpsmtpd installation

Make a new user and a directory where you'll install qpsmtpd.  I
usually use "smtpd" for the user and /home/smtpd/qpsmtpd/ for the
directory.

Put the files there.  If you install from git you can just do
run the following command in the /home/smtpd/ directory.

   git clone git://github.com/abh/qpsmtpd.git

Beware that the master branch might be unstable and unsuitable for anything
but development, so you might want to get a specific release, for
example (after running git clone):

   git checkout -b local_branch v0.40

chmod o+t ~smtpd/qpsmtpd/ (or whatever directory you installed qpsmtpd
in) to make supervise start the log process.

Edit the file config/IP and put the ip address you want to use for
qpsmtpd on the first line (or use 0 to bind to all interfaces).

If you use the supervise tools, then you are practically done now!
Just symlink /home/smtpd/qpsmtpd into your /services (or /var/services
or /var/svscan or whatever) directory.  Remember to shutdown
qmail-smtpd if you are replacing it with qpsmtpd.

If you don't use supervise, then you need to run the ./run script in
some other way.

The smtpd user needs write access to ~smtpd/qpsmtpd/tmp/ but should
not need to write anywhere else.  This directory can be configured
with the "spool_dir" configuration and permissions can be set with
"spool_perms".

As per version 0.25 the distributed ./run script runs tcpserver with
the -R flag to disable identd lookups.  Remove the -R flag if that's
not what you want.


=head2 Configuration

Configuration files can go into either /var/qmail/control or into the
config subdirectory of the qpsmtpd installation.  Configuration should
be compatible with qmail-smtpd making qpsmtpd a drop-in replacement.

If qmail is installed in a nonstandard location you should set the
$QMAIL environment variable to that location in your "./run" file.

If there is anything missing, then please send a patch (or just
information about what's missing) to the mailinglist or to
ask@develooper.com.


=head1 Better Performance

For better performance we recommend using "qpsmtpd-forkserver" or
running qpsmtpd under Apache 2.x.  If you need extremely high
concurrency and all your plugins are compatible, you might want to try
the "qpsmtpd-async" model.

=head1 Plugins

The qpsmtpd core only implements the SMTP protocol.  No useful
function can be done by qpsmtpd without loading plugins.

Plugins are loaded on startup where each of them register their
interest in various "hooks" provided by the qpsmtpd core engine.

At least one plugin MUST allow or deny the RCPT command to enable
receiving mail.  The "rcpt_ok" is one basic plugin that does
this.  Other plugins provides extra functionality related to this; for
example the require_resolvable_fromhost plugin described above.


=head1 Configuration files

All the files used by qmail-smtpd should be supported; so see the man
page for qmail-smtpd.  Extra files used by qpsmtpd includes: 

=over 4

=item plugins

List of plugins, one per line, to be loaded in the order they
appear in the file.  Plugins are in the plugins directory (or in
a subdirectory of there).


=item rhsbl_zones
 
Right hand side blocking lists, one per line. For example:

    dsn.rfc-ignorant.org does not accept bounces - http://www.rfc-ignorant.org/

See http://www.rfc-ignorant.org/ for more examples.


=item dnsbl_zones

Normal ip based DNS blocking lists ("RBLs"). For example:

  relays.ordb.org
  spamsources.fabel.dk


=item require_resolvable_fromhost
         
If this file contains anything but a 0 on the first line, envelope
senders will be checked against DNS. If an A or a MX record can't be
found the mail command will return a soft rejection (450).


=item spool_dir

If this file contains a directory, it will be the spool directory
smtpd uses during the data transactions. If this file doesn't exist, it
will default to use $ENV{HOME}/tmp/. This directory should be set with
a mode of 700 and owned by the smtpd user.

=item tls_before_auth

If this file contains anything except a 0 on the first noncomment line, then 
AUTH will not be offered unless TLS/SSL are in place, either with STARTTLS, 
or SMTP-SSL on port 465.

=item everything (?) that qmail-smtpd supports. 

In my test qpsmtpd installation I have a "config/me" file containing
the hostname I use for testing qpsmtpd (so it doesn't introduce itself
with the normal name of the server).
     
=back



=head1 Problems

In case of problems always first check the logfile.

As default it goes into log/main/current.  Qpsmtpd can log a lot of
debug information.  You can get more or less by adjusting $TRACE_LEVEL
in lib/Qpsmtpd.pm (sorry, no easy switch for that yet).  Something
between 1 and 3 should give you just a little bit.  If you set it to
10 or higher you will get lots of information in the logs.

If the logfile doesn't give away the problem, then post to the
mailinglist (subscription instructions above).  If possibly then put
the logfile on a webserver and include a reference to it in the mail.