Debian Codegraph @

README

raw
1 #
2 # this file is best read with `perldoc README`
3 #
4
5 =head1 NAME
6
7 Qpsmtpd - qmail perl simple mail transfer protocol daemon
8
9 web:
10 http://smtpd.github.io/qpsmtpd/
11
12 mailinglist:
13 [email protected]
14
15 FAQ:
16 https://github.com/smtpd/qpsmtpd/wiki/faq
17
18 =head1 DESCRIPTION
19
20 What is Qpsmtpd?
21
22 Qpsmtpd is an extensible SMTP engine written in Perl. No, make that
23 easily extensible! See plugins/quit_fortune for a very useful, er,
24 cute example.
25
26 =head2 License
27
28 Qpsmtpd is licensed under the MIT License; see the LICENSE file for
29 more information.
30
31 =head2 What's new in this release?
32
33 See the Changes file! :-)
34
35
36 =head1 Installation
37
38 =head2 Required Perl Modules
39
40 The following Perl modules are required:
41 Net::DNS
42 MIME::Base64
43 Mail::Header (part of the MailTools distribution)
44
45 If you use a version of Perl older than 5.8.0 you will also need
46 Data::Dumper
47 File::Temp
48 Time::HiRes
49
50 The easiest way to install modules from CPAN is with the CPAN shell.
51 Run it with
52
53 perl -MCPAN -e shell
54
55 =head2 qpsmtpd installation
56
57 Make a new user and a directory where you'll install qpsmtpd. I
58 usually use "smtpd" for the user and /home/smtpd/qpsmtpd/ for the
59 directory.
60
61 Put the files there. If you install from git you can just do
62 run the following command in the /home/smtpd/ directory.
63
64 git clone git://github.com/smtpd/qpsmtpd.git
65
66 Beware that the master branch might be unstable and unsuitable for anything
67 but development, so you might want to get a specific release, for
68 example (after running git clone):
69
70 git checkout -b local_branch v0.93
71
72 chmod o+t ~smtpd/qpsmtpd/ (or whatever directory you installed qpsmtpd
73 in) to make supervise start the log process.
74
75 Edit the file config/IP and put the ip address you want to use for
76 qpsmtpd on the first line (or use 0 to bind to all interfaces).
77
78 If you use the supervise tools, then you are practically done!
79 Just symlink /home/smtpd/qpsmtpd into your /services (or /var/services
80 or /var/svscan or whatever) directory. Remember to shutdown
81 qmail-smtpd if you are replacing it with qpsmtpd.
82
83 If you don't use supervise, then you need to run the ./run script in
84 some other way.
85
86 The smtpd user needs write access to ~smtpd/qpsmtpd/tmp/ but should
87 not need to write anywhere else. This directory can be configured
88 with the "spool_dir" configuration and permissions can be set with
89 "spool_perms".
90
91 As per version 0.25 the distributed ./run script runs tcpserver with
92 the -R flag to disable identd lookups. Remove the -R flag if that's
93 not what you want.
94
95
96 =head2 Configuration
97
98 Configuration files can go into either /var/qmail/control or into the
99 config subdirectory of the qpsmtpd installation. Configuration should
100 be compatible with qmail-smtpd making qpsmtpd a drop-in replacement.
101
102 If qmail is installed in a nonstandard location you should set the
103 $QMAIL environment variable to that location in your "./run" file.
104
105 If there is anything missing, then please send a patch (or just
106 information about what's missing) to the mailinglist or a PR to github.
107
108
109 =head1 Better Performance
110
111 For better performance we recommend using "qpsmtpd-forkserver" or
112 running qpsmtpd under Apache 2.x. If you need extremely high
113 concurrency and all your plugins are compatible, you might want to try
114 the "qpsmtpd-async" model.
115
116 =head1 Plugins
117
118 The qpsmtpd core only implements the SMTP protocol. No useful
119 function can be done by qpsmtpd without loading plugins.
120
121 Plugins are loaded on startup where each of them register their
122 interest in various "hooks" provided by the qpsmtpd core engine.
123
124 At least one plugin MUST allow or deny the RCPT command to enable
125 receiving mail. The "rcpt_ok" is one basic plugin that does
126 this. Other plugins provide extra functionality related to this; for
127 example the resolvable_fromhost plugin described above.
128
129
130 =head1 Configuration files
131
132 All the files used by qmail-smtpd should be supported; so see the man
133 page for qmail-smtpd. Extra files used by qpsmtpd include:
134
135 =over 4
136
137 =item plugins
138
139 List of plugins, one per line, to be loaded in the order they
140 appear in the file. Plugins are in the plugins directory (or in
141 a subdirectory of there).
142
143
144 =item rhsbl_zones
145
146 Right hand side blocking lists, one per line. For example:
147
148 dsn.rfc-ignorant.org does not accept bounces - http://www.rfc-ignorant.org/
149
150 See http://www.rfc-ignorant.org/ for more examples.
151
152
153 =item dnsbl_zones
154
155 Normal ip based DNS blocking lists ("RBLs"). For example:
156
157 relays.ordb.org
158 spamsources.fabel.dk
159
160
161 =item spool_dir
162
163 If this file contains a directory, it will be the spool directory
164 smtpd uses during the data transactions. If this file doesn't exist, it
165 will default to use $ENV{HOME}/tmp/. This directory should be set with
166 a mode of 700 and owned by the smtpd user.
167
168 =item spool_perms
169
170 The default spool permissions are 0700. If you need some other value,
171 chmod the directory and set it's octal value in config/spool_perms.
172
173 =item tls_before_auth
174
175 If this file contains anything except a 0 on the first noncomment line, then
176 AUTH will not be offered unless TLS/SSL are in place, either with STARTTLS,
177 or SMTP-SSL on port 465.
178
179 =item everything (?) that qmail-smtpd supports.
180
181 In my test qpsmtpd installation I have a "config/me" file containing
182 the hostname I use for testing qpsmtpd (so it doesn't introduce itself
183 with the normal name of the server).
184
185 =back
186
187
188 =head1 Problems
189
190 In case of problems, always check the logfile first.
191
192 By default, qpsmtpd logs to log/main/current. Qpsmtpd can log a lot of
193 debug information. You can get more or less by adjusting the number in
194 config/loglevel. Between 1 and 3 should give you a little. Setting it
195 to 10 or higher will get lots of information in the logs.
196
197 If the logfile doesn't give away the problem, then post to the
198 mailinglist (subscription instructions above). If possible, put
199 the logfile on a webserver and include a reference to it in the mail.
200