2003-03-18 10:04:49 +01:00
|
|
|
#
|
|
|
|
# this file is best read with `perldoc README`
|
|
|
|
#
|
|
|
|
|
2004-09-05 19:28:06 +02:00
|
|
|
=head1 NAME
|
|
|
|
|
|
|
|
Qpsmtpd - qmail perl simple mail transfer protocol daemon
|
2002-01-21 13:58:05 +01:00
|
|
|
|
|
|
|
web:
|
2014-03-25 20:37:11 +01:00
|
|
|
http://smtpd.github.io/qpsmtpd/
|
2002-01-21 13:58:05 +01:00
|
|
|
|
|
|
|
mailinglist:
|
|
|
|
qpsmtpd-subscribe@perl.org
|
|
|
|
|
2013-03-27 07:37:08 +01:00
|
|
|
FAQ:
|
2014-03-25 20:37:11 +01:00
|
|
|
https://github.com/smtpd/qpsmtpd/wiki/faq
|
2002-07-03 15:29:45 +02:00
|
|
|
|
2004-09-05 19:28:06 +02:00
|
|
|
=head1 DESCRIPTION
|
2003-03-18 10:04:49 +01:00
|
|
|
|
2004-09-05 19:28:06 +02:00
|
|
|
What is Qpsmtpd?
|
2002-07-03 15:29:45 +02:00
|
|
|
|
2010-05-02 06:08:50 +02:00
|
|
|
Qpsmtpd is an extensible SMTP engine written in Perl. No, make that
|
2002-09-08 15:45:37 +02:00
|
|
|
easily extensible! See plugins/quit_fortune for a very useful, er,
|
|
|
|
cute example.
|
2002-07-03 15:29:45 +02:00
|
|
|
|
2009-02-13 09:12:55 +01:00
|
|
|
=head2 License
|
|
|
|
|
|
|
|
Qpsmtpd is licensed under the MIT License; see the LICENSE file for
|
|
|
|
more information.
|
2002-07-03 15:29:45 +02:00
|
|
|
|
2003-03-18 10:04:49 +01:00
|
|
|
=head2 What's new in this release?
|
2002-09-08 15:45:37 +02:00
|
|
|
|
2002-10-10 05:20:16 +02:00
|
|
|
See the Changes file! :-)
|
|
|
|
|
|
|
|
|
2003-03-18 10:04:49 +01:00
|
|
|
=head1 Installation
|
|
|
|
|
|
|
|
=head2 Required Perl Modules
|
|
|
|
|
|
|
|
The following Perl modules are required:
|
|
|
|
Net::DNS
|
2005-07-06 21:06:01 +02:00
|
|
|
MIME::Base64
|
|
|
|
Mail::Header (part of the MailTools distribution)
|
2003-03-18 10:04:49 +01:00
|
|
|
|
|
|
|
If you use a version of Perl older than 5.8.0 you will also need
|
|
|
|
Data::Dumper
|
|
|
|
File::Temp
|
2005-07-06 21:06:01 +02:00
|
|
|
Time::HiRes
|
2003-03-18 10:04:49 +01:00
|
|
|
|
|
|
|
The easiest way to install modules from CPAN is with the CPAN shell.
|
|
|
|
Run it with
|
|
|
|
|
|
|
|
perl -MCPAN -e shell
|
|
|
|
|
|
|
|
=head2 qpsmtpd installation
|
2002-09-08 15:45:37 +02:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2010-05-02 06:08:50 +02:00
|
|
|
Put the files there. If you install from git you can just do
|
2005-07-02 04:08:37 +02:00
|
|
|
run the following command in the /home/smtpd/ directory.
|
2003-03-18 10:46:43 +01:00
|
|
|
|
2012-04-08 02:28:09 +02:00
|
|
|
git clone git://github.com/smtpd/qpsmtpd.git
|
2005-07-02 04:08:37 +02:00
|
|
|
|
2009-02-13 09:12:55 +01:00
|
|
|
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):
|
2005-07-02 04:08:37 +02:00
|
|
|
|
2014-03-25 20:37:11 +01:00
|
|
|
git checkout -b local_branch v0.93
|
2002-09-08 15:45:37 +02:00
|
|
|
|
2002-10-14 03:59:04 +02:00
|
|
|
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
|
2002-09-08 15:45:37 +02:00
|
|
|
qpsmtpd on the first line (or use 0 to bind to all interfaces).
|
|
|
|
|
2012-04-08 07:51:33 +02:00
|
|
|
If you use the supervise tools, then you are practically done!
|
2002-09-08 15:45:37 +02:00
|
|
|
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
|
2002-10-14 03:59:04 +02:00
|
|
|
some other way.
|
2002-06-11 06:24:42 +02:00
|
|
|
|
2003-03-18 10:46:43 +01:00
|
|
|
The smtpd user needs write access to ~smtpd/qpsmtpd/tmp/ but should
|
|
|
|
not need to write anywhere else. This directory can be configured
|
2008-12-31 22:44:59 +01:00
|
|
|
with the "spool_dir" configuration and permissions can be set with
|
|
|
|
"spool_perms".
|
2003-03-18 10:46:43 +01:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2002-01-21 13:58:05 +01:00
|
|
|
|
2003-03-18 10:04:49 +01:00
|
|
|
=head2 Configuration
|
2002-01-22 04:53:48 +01:00
|
|
|
|
2002-09-08 15:45:37 +02:00
|
|
|
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.
|
2002-01-22 04:53:48 +01:00
|
|
|
|
2003-08-30 17:14:39 +02:00
|
|
|
If qmail is installed in a nonstandard location you should set the
|
|
|
|
$QMAIL environment variable to that location in your "./run" file.
|
|
|
|
|
2002-09-08 15:45:37 +02:00
|
|
|
If there is anything missing, then please send a patch (or just
|
2014-03-25 20:37:11 +01:00
|
|
|
information about what's missing) to the mailinglist or a PR to github.
|
2003-02-06 05:40:48 +01:00
|
|
|
|
|
|
|
|
2003-03-18 10:04:49 +01:00
|
|
|
=head1 Better Performance
|
2003-02-06 05:40:48 +01:00
|
|
|
|
2009-02-13 09:12:55 +01:00
|
|
|
For better performance we recommend using "qpsmtpd-forkserver" or
|
|
|
|
running qpsmtpd under Apache 2.x. If you need extremely high
|
2014-09-17 20:38:40 +02:00
|
|
|
concurrency use http://haraka.github.io/
|
2005-07-06 21:06:01 +02:00
|
|
|
|
2003-03-18 10:04:49 +01:00
|
|
|
=head1 Plugins
|
2002-09-08 15:45:37 +02:00
|
|
|
|
2003-03-18 10:04:49 +01:00
|
|
|
The qpsmtpd core only implements the SMTP protocol. No useful
|
|
|
|
function can be done by qpsmtpd without loading plugins.
|
2002-09-08 15:45:37 +02:00
|
|
|
|
2003-03-18 10:04:49 +01:00
|
|
|
Plugins are loaded on startup where each of them register their
|
|
|
|
interest in various "hooks" provided by the qpsmtpd core engine.
|
2002-09-08 15:45:37 +02:00
|
|
|
|
2003-03-18 10:04:49 +01:00
|
|
|
At least one plugin MUST allow or deny the RCPT command to enable
|
2009-06-22 01:51:38 +02:00
|
|
|
receiving mail. The "rcpt_ok" is one basic plugin that does
|
2012-04-08 07:51:33 +02:00
|
|
|
this. Other plugins provide extra functionality related to this; for
|
2012-06-25 09:08:25 +02:00
|
|
|
example the resolvable_fromhost plugin described above.
|
2002-09-08 15:45:37 +02:00
|
|
|
|
|
|
|
|
2003-03-18 10:04:49 +01:00
|
|
|
=head1 Configuration files
|
2002-10-14 03:59:04 +02:00
|
|
|
|
|
|
|
All the files used by qmail-smtpd should be supported; so see the man
|
2012-04-08 07:51:33 +02:00
|
|
|
page for qmail-smtpd. Extra files used by qpsmtpd include:
|
2002-01-22 04:53:48 +01:00
|
|
|
|
2003-03-18 10:04:49 +01:00
|
|
|
=over 4
|
|
|
|
|
|
|
|
=item plugins
|
2002-09-08 15:45:37 +02:00
|
|
|
|
2003-03-18 10:04:49 +01:00
|
|
|
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).
|
2002-09-08 15:45:37 +02:00
|
|
|
|
|
|
|
|
2003-03-18 10:04:49 +01:00
|
|
|
=item rhsbl_zones
|
2012-04-08 07:51:33 +02:00
|
|
|
|
2003-03-18 10:04:49 +01:00
|
|
|
Right hand side blocking lists, one per line. For example:
|
2002-01-22 04:53:48 +01:00
|
|
|
|
2003-03-18 10:04:49 +01:00
|
|
|
dsn.rfc-ignorant.org does not accept bounces - http://www.rfc-ignorant.org/
|
2002-01-22 04:53:48 +01:00
|
|
|
|
2003-03-18 10:04:49 +01:00
|
|
|
See http://www.rfc-ignorant.org/ for more examples.
|
2002-01-22 04:53:48 +01:00
|
|
|
|
|
|
|
|
2003-03-18 10:04:49 +01:00
|
|
|
=item dnsbl_zones
|
2002-01-22 04:53:48 +01:00
|
|
|
|
2010-05-02 06:08:50 +02:00
|
|
|
Normal ip based DNS blocking lists ("RBLs"). For example:
|
2002-01-22 04:53:48 +01:00
|
|
|
|
2003-03-18 10:04:49 +01:00
|
|
|
relays.ordb.org
|
|
|
|
spamsources.fabel.dk
|
2002-01-22 04:53:48 +01:00
|
|
|
|
|
|
|
|
2003-03-18 10:04:49 +01:00
|
|
|
=item spool_dir
|
2002-09-24 12:56:35 +02:00
|
|
|
|
2003-03-18 10:04:49 +01:00
|
|
|
If this file contains a directory, it will be the spool directory
|
2010-05-02 06:08:50 +02:00
|
|
|
smtpd uses during the data transactions. If this file doesn't exist, it
|
2003-03-18 10:04:49 +01:00
|
|
|
will default to use $ENV{HOME}/tmp/. This directory should be set with
|
|
|
|
a mode of 700 and owned by the smtpd user.
|
2002-09-24 12:56:35 +02:00
|
|
|
|
2012-04-08 07:51:33 +02:00
|
|
|
=item spool_perms
|
|
|
|
|
|
|
|
The default spool permissions are 0700. If you need some other value,
|
|
|
|
chmod the directory and set it's octal value in config/spool_perms.
|
|
|
|
|
2006-06-22 16:48:48 +02:00
|
|
|
=item tls_before_auth
|
|
|
|
|
2012-04-08 07:51:33 +02:00
|
|
|
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,
|
2006-06-22 16:48:48 +02:00
|
|
|
or SMTP-SSL on port 465.
|
2002-09-24 12:56:35 +02:00
|
|
|
|
2012-04-08 07:51:33 +02:00
|
|
|
=item everything (?) that qmail-smtpd supports.
|
2002-09-08 15:45:37 +02:00
|
|
|
|
2003-03-18 10:04:49 +01:00
|
|
|
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).
|
2002-10-14 03:59:04 +02:00
|
|
|
|
2012-04-08 07:51:33 +02:00
|
|
|
=back
|
2002-10-14 03:59:04 +02:00
|
|
|
|
|
|
|
|
2003-03-18 10:04:49 +01:00
|
|
|
=head1 Problems
|
|
|
|
|
2012-04-08 07:51:33 +02:00
|
|
|
In case of problems, always check the logfile first.
|
2003-03-18 10:04:49 +01:00
|
|
|
|
2012-04-08 07:51:33 +02:00
|
|
|
By default, qpsmtpd logs to log/main/current. Qpsmtpd can log a lot of
|
|
|
|
debug information. You can get more or less by adjusting the number in
|
|
|
|
config/loglevel. Between 1 and 3 should give you a little. Setting it
|
|
|
|
to 10 or higher will get lots of information in the logs.
|
2003-03-18 10:04:49 +01:00
|
|
|
|
|
|
|
If the logfile doesn't give away the problem, then post to the
|
2012-04-08 07:51:33 +02:00
|
|
|
mailinglist (subscription instructions above). If possible, put
|
2003-03-18 10:04:49 +01:00
|
|
|
the logfile on a webserver and include a reference to it in the mail.
|
2002-10-14 03:59:04 +02:00
|
|
|
|