Merge ~chrome/ubuntu/+source/exim4:redis into ubuntu/+source/exim4:ubuntu/devel
- Git
- lp:~chrome/ubuntu/+source/exim4
- redis
- Merge into ubuntu/devel
Status: | Needs review | ||||
---|---|---|---|---|---|
Proposed branch: | ~chrome/ubuntu/+source/exim4:redis | ||||
Merge into: | ubuntu/+source/exim4:ubuntu/devel | ||||
Diff against target: |
977 lines (+304/-109) 28 files modified
OS/Makefile-Linux (+2/-2) OS/eximon.conf-Default (+1/-1) README (+10/-2) debian/EDITME.exim4-heavy.diff (+3/-2) debian/changelog (+8/-0) debian/control (+1/-0) doc/ChangeLog (+5/-0) doc/exim.8 (+50/-30) scripts/Configure-config.h (+7/-0) scripts/exim_install (+6/-6) src/EDITME (+15/-0) src/config.h.defaults (+4/-0) src/convert4r4.src (+26/-0) src/exicyclog.src (+3/-3) src/exim.h (+4/-0) src/exim_checkaccess.src (+1/-1) src/eximon.src (+3/-3) src/eximstats.src (+5/-2) src/exinext.src (+5/-5) src/exiqgrep.src (+1/-1) src/exiwhat.src (+3/-3) src/globals.c (+6/-2) src/globals.h (+4/-0) src/local_scan.c (+116/-41) src/local_scan.h (+6/-0) src/readconf.c (+3/-0) src/rewrite.c (+4/-5) src/string.c (+2/-0) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Christian Ehrhardt | Pending | ||
Review via email: mp+427984@code.launchpad.net |
Commit message
Description of the change
This change adds support for exim4-heavy to uise the redis lookup.
I hope I've done all the things required for this to work? First time trying to make a merge request for ubuntu :P
Unmerged commits
- 2be577f... by Matjam
-
add support for redis lookup
- a8a16ae... by Nathan Ollerenshaw <email address hidden>
-
enable support for the redis lookup in exim4-heavy
- be6b2e6... by Christian Ehrhardt
-
4.96-3ubuntu1 (patches applied)
Imported using git-ubuntu import.
- cbf7375... by Christian Ehrhardt
-
Add EXIM_DISTRIBUTION var to display it on the SMTP banner
Gbp-Pq: fix_smtp_
banner. patch. - 2ed54ff... by Christian Ehrhardt
-
Allow one to use and switch between different local_scan functions
Gbp-Pq: 90_localscan_
dlopen. dpatch. - d03065d... by Christian Ehrhardt
-
[PATCH] Fix exit on attempt to rewrite a malformed address. Bug 2903
Gbp-Pq: 75_01-Fix-
exit-on- attempt- to-rewrite- a-malformed- address. -.patch. - 0638c96... by Christian Ehrhardt
-
Point Debian users to Debian specific ML.
Gbp-Pq: 70_remove_
exim-users_ references. dpatch. - 20c6973... by Christian Ehrhardt
-
Stop using exim's -C option in utility scripts (exiwhat
Gbp-Pq: 67_unnecessaryC
opt.diff. - e88bdd2... by Christian Ehrhardt
-
Add a warning message to convert4r4
Gbp-Pq: 60_convert4r4.
dpatch. - c52e680... by Christian Ehrhardt
-
Exim's installation scripts install the binary as
Gbp-Pq: 35_install.dpatch.
Preview Diff
1 | diff --git a/OS/Makefile-Linux b/OS/Makefile-Linux |
2 | index dfb2fa8..eaf2bbc 100644 |
3 | --- a/OS/Makefile-Linux |
4 | +++ b/OS/Makefile-Linux |
5 | @@ -31,9 +31,9 @@ XLFLAGS=-L$(X11)/lib |
6 | X11_LD_LIB=$(X11)/lib |
7 | |
8 | EXIWHAT_PS_ARG=ax |
9 | -EXIWHAT_EGREP_ARG='/exim( |$$)' |
10 | +EXIWHAT_EGREP_ARG='/exim4( |$$)' |
11 | EXIWHAT_MULTIKILL_CMD=killall |
12 | -EXIWHAT_MULTIKILL_ARG=exim |
13 | +EXIWHAT_MULTIKILL_ARG=exim4 |
14 | EXIWHAT_KILL_SIGNAL=-USR1 |
15 | |
16 | # End |
17 | diff --git a/OS/eximon.conf-Default b/OS/eximon.conf-Default |
18 | index 2f874ef..1305ed6 100644 |
19 | --- a/OS/eximon.conf-Default |
20 | +++ b/OS/eximon.conf-Default |
21 | @@ -5,7 +5,7 @@ |
22 | # The name of the eximon binary, usually the same as the eximon script, |
23 | # with .bin stuck on the end. |
24 | |
25 | -EXIMON_BINARY="${EXIMON_BINARY-$0.bin}" |
26 | +EXIMON_BINARY="/usr/libexec/exim4/${EXIMON_BINARY-${0##*/}.bin}" |
27 | |
28 | # The remaining parameters are values likely to be changed to suit the |
29 | # user's taste. They are documented in the EDITME file. |
30 | diff --git a/README b/README |
31 | index d9379f7..5dc6d10 100644 |
32 | --- a/README |
33 | +++ b/README |
34 | @@ -14,8 +14,16 @@ from Exim 3, though the basic structure and philosophy remains the same. The |
35 | older book may be helpful for the background, but a lot of the detail has |
36 | changed, so it is likely to be confusing to newcomers. |
37 | |
38 | -There is a website at https://www.exim.org; this contains details of the |
39 | -mailing list exim-users@exim.org. |
40 | +Information about the way Debian has built the binary packages is |
41 | +obtainable in /usr/share/doc/exim4-base/README.Debian.gz, and there |
42 | +is a Debian-centered mailing list, |
43 | +pkg-exim4-users@lists.alioth.debian.org. Please ask Debian-specific |
44 | +questions there, and only write to the upstream exim-users mailing |
45 | +list if you are sure that your question is not Debian-specific. You |
46 | +can find the subscription web page on |
47 | +http://lists.alioth.debian.org/mailman/listinfo/pkg-exim4-users |
48 | + |
49 | +There is a website at https://www.exim.org/. |
50 | |
51 | A copy of the Exim FAQ should be available from the same source that you used |
52 | to obtain the Exim distribution. Additional formats for the documentation |
53 | diff --git a/debian/EDITME.exim4-heavy.diff b/debian/EDITME.exim4-heavy.diff |
54 | index 26faf78..58fda6b 100644 |
55 | --- a/debian/EDITME.exim4-heavy.diff |
56 | +++ b/debian/EDITME.exim4-heavy.diff |
57 | @@ -35,7 +35,8 @@ |
58 | LOOKUP_PASSWD=yes |
59 | -# LOOKUP_PGSQL=yes |
60 | +LOOKUP_PGSQL=yes |
61 | - # LOOKUP_REDIS=yes |
62 | +-# LOOKUP_REDIS=yes |
63 | ++LOOKUP_REDIS=yes |
64 | -# LOOKUP_SQLITE=yes |
65 | +LOOKUP_SQLITE=yes |
66 | # LOOKUP_SQLITE_PC=sqlite3 |
67 | @@ -55,7 +56,7 @@ |
68 | |
69 | |
70 | +LOOKUP_INCLUDE=-I/usr/include/mysql -I`pg_config --includedir` |
71 | -+LOOKUP_LIBS=-lldap -llber -lmysqlclient -lpq -lsqlite3 |
72 | ++LOOKUP_LIBS=-lldap -llber -lmysqlclient -lpq -lsqlite3 -lhiredis |
73 | + |
74 | #------------------------------------------------------------------------------ |
75 | # Compiling the Exim monitor: If you want to compile the Exim monitor, a |
76 | diff --git a/debian/changelog b/debian/changelog |
77 | index fa53898..78b8c89 100644 |
78 | --- a/debian/changelog |
79 | +++ b/debian/changelog |
80 | @@ -1,3 +1,11 @@ |
81 | +exim4 (4.96-3ubuntu2) UNRELEASED; urgency=medium |
82 | + |
83 | + * Add support for the redis lookup to exim4-heavy. |
84 | + - added dev dependency for libhiredis-dev |
85 | + - adjusted compiler flags to link the library. |
86 | + |
87 | + -- Nathan Ollerenshaw <chrome@stupendous.net> Fri, 05 Aug 2022 11:20:05 -0700 |
88 | + |
89 | exim4 (4.96-3ubuntu1) kinetic; urgency=medium |
90 | |
91 | * Merge with Debian unstable. (LP: #1971274) Remaining changes: |
92 | diff --git a/debian/control b/debian/control |
93 | index 0e9d567..e9bae6c 100644 |
94 | --- a/debian/control |
95 | +++ b/debian/control |
96 | @@ -21,6 +21,7 @@ Build-Depends: |
97 | docbook-xsl, |
98 | libdb5.3-dev, |
99 | libgnutls28-dev (>= 3.5.7), |
100 | + libhiredis-dev, |
101 | libident-dev, |
102 | libidn11-dev, |
103 | libidn2-dev, |
104 | diff --git a/doc/ChangeLog b/doc/ChangeLog |
105 | index 3e6da91..2f0081c 100644 |
106 | --- a/doc/ChangeLog |
107 | +++ b/doc/ChangeLog |
108 | @@ -2,6 +2,11 @@ This document describes *changes* to previous versions, that might |
109 | affect Exim's operation, with an unchanged configuration file. For new |
110 | options, and new features, see the NewStuff file next to this ChangeLog. |
111 | |
112 | +JH/04 Bug 2903: avoid exit on an attempt to rewrite a malformed address. |
113 | + Make the rewrite never match and keep the logging. Trust the |
114 | + admin to be using verify=header-syntax (to actually reject the message). |
115 | + |
116 | + |
117 | Exim version 4.96 |
118 | ----------------- |
119 | |
120 | diff --git a/doc/exim.8 b/doc/exim.8 |
121 | index 4b41796..98739d1 100644 |
122 | --- a/doc/exim.8 |
123 | +++ b/doc/exim.8 |
124 | @@ -1,9 +1,9 @@ |
125 | -.TH EXIM 8 |
126 | +.TH EXIM4 8 |
127 | .SH NAME |
128 | -exim \- a Mail Transfer Agent |
129 | +exim4 \- a Mail Transfer Agent |
130 | .SH SYNOPSIS |
131 | .nf |
132 | -.B exim [options] arguments ... |
133 | +.B exim4 [options] arguments ... |
134 | .B mailq [options] arguments ... |
135 | .B rsmtp [options] arguments ... |
136 | .B rmail [options] arguments ... |
137 | @@ -40,7 +40,7 @@ local message on the standard input, with the arguments specifying the |
138 | recipients) is assumed. Thus, for example, if Exim is installed in |
139 | \fI/usr/sbin\fP, you can send a message from the command line like this: |
140 | .sp |
141 | - /usr/sbin/exim -i <recipient-address(es)> |
142 | + /usr/sbin/exim4 -i <recipient-address(es)> |
143 | <message content, including all the header lines> |
144 | CTRL-D |
145 | .sp |
146 | @@ -125,8 +125,8 @@ ports, on multiple ports, and only on specific interfaces. |
147 | .sp |
148 | When a listening daemon |
149 | is started without the use of \fB\-oX\fP (that is, without overriding the normal |
150 | -configuration), it writes its process id to a file called exim\-daemon.pid |
151 | -in Exim's spool directory. This location can be overridden by setting |
152 | +configuration), it writes its process id to a file called |
153 | +/run/exim4/exim.pid. This location can be overridden by setting |
154 | PID_FILE_PATH in Local/Makefile. The file is written while Exim is still |
155 | running as root. |
156 | .sp |
157 | @@ -180,7 +180,7 @@ available to admin users. |
158 | This option operates like \fB\-be\fP except that it must be followed by the name |
159 | of a file. For example: |
160 | .sp |
161 | - exim \-bem /tmp/testmessage |
162 | + exim4 \-bem /tmp/testmessage |
163 | .sp |
164 | The file is read as a message (as if receiving a locally\-submitted non\-SMTP |
165 | message) before any of the test expansions are done. Thus, message\-specific |
166 | @@ -206,7 +206,7 @@ If you want to test a system filter file, use \fB\-bF\fP instead of \fB\-bf\fP. |
167 | can use both \fB\-bF\fP and \fB\-bf\fP on the same command, in order to test a system |
168 | filter and a user filter in the same run. For example: |
169 | .sp |
170 | - exim \-bF /system/filter \-bf /user/filter </test/message |
171 | + exim4 \-bF /system/filter \-bf /user/filter </test/message |
172 | .sp |
173 | This is helpful when the system filter adds header lines or sets filter |
174 | variables that are used by the user filter. |
175 | @@ -258,8 +258,8 @@ This option runs a fake SMTP session as if from the given IP address, using the |
176 | standard input and output. The IP address may include a port number at the end, |
177 | after a full stop. For example: |
178 | .sp |
179 | - exim \-bh 10.9.8.7.1234 |
180 | - exim \-bh fe80::a00:20ff:fe86:a061.5678 |
181 | + exim4 \-bh 10.9.8.7.1234 |
182 | + exim4 \-bh fe80::a00:20ff:fe86:a061.5678 |
183 | .sp |
184 | When an IPv6 address is given, it is converted into canonical form. In the case |
185 | of the second example above, the value of \fI$sender_host_address\fP after |
186 | @@ -417,7 +417,7 @@ main configuration options to be written to the standard output. The values |
187 | of one or more specific options can be requested by giving their names as |
188 | arguments, for example: |
189 | .sp |
190 | - exim \-bP qualify_domain hold_domains |
191 | + exim4 \-bP qualify_domain hold_domains |
192 | .sp |
193 | However, any option setting that is preceded by the word "hide" in the |
194 | configuration file is not shown in full, except to an admin user. For other |
195 | @@ -445,7 +445,7 @@ written directly into the spool directory. |
196 | .sp |
197 | If \fB\-bP\fP is followed by a name preceded by +, for example, |
198 | .sp |
199 | - exim \-bP +local_domains |
200 | + exim4 \-bP +local_domains |
201 | .sp |
202 | it searches for a matching named list of any type (domain, host, address, or |
203 | local part) and outputs what it finds. |
204 | @@ -454,7 +454,7 @@ If one of the words \fBrouter\fP, \fBtransport\fP, or \fBauthenticator\fP is giv |
205 | followed by the name of an appropriate driver instance, the option settings for |
206 | that driver are output. For example: |
207 | .sp |
208 | - exim \-bP transport local_delivery |
209 | + exim4 \-bP transport local_delivery |
210 | .sp |
211 | The generic driver options are output first, followed by the driver's private |
212 | options. A list of the names of drivers of a particular type can be obtained by |
213 | @@ -539,7 +539,7 @@ This option is for testing retry rules, and it must be followed by up to three |
214 | arguments. It causes Exim to look for a retry rule that matches the values |
215 | and to write it to the standard output. For example: |
216 | .sp |
217 | - exim \-brt bach.comp.mus.example |
218 | + exim4 \-brt bach.comp.mus.example |
219 | Retry rule: *.comp.mus.example F,2h,15m; F,4d,30m; |
220 | .sp |
221 | The first |
222 | @@ -552,7 +552,7 @@ rule is found that matches the host, one that matches the mail domain is |
223 | sought. Finally, an argument that is the name of a specific delivery error, as |
224 | used in setting up retry rules, can be given. For example: |
225 | .sp |
226 | - exim \-brt haydn.comp.mus.example quota_3d |
227 | + exim4 \-brt haydn.comp.mus.example quota_3d |
228 | Retry rule: *@haydn.comp.mus.example quota_3d F,1h,15m |
229 | .TP 10 |
230 | \fB\-brw\fP |
231 | @@ -655,7 +655,7 @@ doing such tests. |
232 | .TP 10 |
233 | \fB\-bV\fP |
234 | This option causes Exim to write the current version number, compilation |
235 | -number, and compilation date of the \fIexim\fP binary to the standard output. |
236 | +number, and compilation date of the \fIexim4\fP binary to the standard output. |
237 | It also lists the DBM library that is being used, the optional modules (such as |
238 | specific lookup types), the drivers that are included in the binary, and the |
239 | name of the runtime configuration file that is in use. |
240 | @@ -683,7 +683,7 @@ If no arguments are given, Exim runs in an interactive manner, prompting with a |
241 | right angle bracket for addresses to be verified. |
242 | .sp |
243 | Unlike the \fB\-be\fP test option, you cannot arrange for Exim to use the |
244 | -readline() function, because it is running as \fIexim\fP and there are |
245 | +readline() function, because it is running as \fIexim4\fP and there are |
246 | security issues. |
247 | .sp |
248 | Verification differs from address testing (the \fB\-bt\fP option) in that routers |
249 | @@ -796,14 +796,14 @@ command line item. \fB\-D\fP can be used to set the value of a macro to the empt |
250 | string, in which case the equals sign is optional. These two commands are |
251 | synonymous: |
252 | .sp |
253 | - exim \-DABC ... |
254 | - exim \-DABC= ... |
255 | + exim4 \-DABC ... |
256 | + exim4 \-DABC= ... |
257 | .sp |
258 | To include spaces in a macro definition item, quotes must be used. If you use |
259 | quotes, spaces are permitted around the macro name and the equals sign. For |
260 | example: |
261 | .sp |
262 | - exim '\-D ABC = something' ... |
263 | + exim4 '\-D ABC = something' ... |
264 | .sp |
265 | \fB\-D\fP may be repeated up to 10 times on a command line. |
266 | Only macro names up to 22 letters long can be set. |
267 | @@ -970,8 +970,8 @@ never provoke a bounce. An empty sender can be specified either as an empty |
268 | string, or as a pair of angle brackets with nothing between them, as in these |
269 | examples of shell commands: |
270 | .sp |
271 | - exim \-f '<>' user@domain |
272 | - exim \-f "" user@domain |
273 | + exim4 \-f '<>' user@domain |
274 | + exim4 \-f "" user@domain |
275 | .sp |
276 | In addition, the use of \fB\-f\fP is not restricted when testing a filter file |
277 | with \fB\-bf\fP or when testing or verifying addresses using the \fB\-bt\fP or |
278 | @@ -1388,12 +1388,12 @@ other circumstances, they are ignored unless the caller is trusted. |
279 | The \fB\-oMa\fP option sets the sender host address. This may include a port |
280 | number at the end, after a full stop (period). For example: |
281 | .sp |
282 | - exim \-bs \-oMa 10.9.8.7.1234 |
283 | + exim4 \-bs \-oMa 10.9.8.7.1234 |
284 | .sp |
285 | An alternative syntax is to enclose the IP address in square brackets, |
286 | followed by a colon and the port number: |
287 | .sp |
288 | - exim \-bs \-oMa [10.9.8.7]:1234 |
289 | + exim4 \-bs \-oMa [10.9.8.7]:1234 |
290 | .sp |
291 | The IP address is placed in the \fI$sender_host_address\fP variable, and the |
292 | port, if present, in \fI$sender_host_port\fP. If both \fB\-oMa\fP and \fB\-bh\fP |
293 | @@ -1627,22 +1627,22 @@ If other commandline options specify an action, a \fI\-qG<name>\fP option |
294 | will specify a queue to operate on. |
295 | For example: |
296 | .sp |
297 | - exim \-bp \-qGquarantine |
298 | + exim4 \-bp \-qGquarantine |
299 | mailq \-qGquarantine |
300 | - exim \-qGoffpeak \-Rf @special.domain.example |
301 | + exim4 \-qGoffpeak \-Rf @special.domain.example |
302 | .TP 10 |
303 | \fB\-q\fP<\fIqflags\fP> <\fIstart id\fP> <\fIend id\fP> |
304 | When scanning the queue, Exim can be made to skip over messages whose ids are |
305 | lexically less than a given value by following the \fB\-q\fP option with a |
306 | starting message id. For example: |
307 | .sp |
308 | - exim \-q 0t5C6f\-0000c8\-00 |
309 | + exim4 \-q 0t5C6f\-0000c8\-00 |
310 | .sp |
311 | Messages that arrived earlier than 0t5C6f\-0000c8\-00 are not inspected. If a |
312 | second message id is given, messages whose ids are lexically greater than it |
313 | are also skipped. If the same id is given twice, for example, |
314 | .sp |
315 | - exim \-q 0t5C6f\-0000c8\-00 0t5C6f\-0000c8\-00 |
316 | + exim4 \-q 0t5C6f\-0000c8\-00 0t5C6f\-0000c8\-00 |
317 | .sp |
318 | just one delivery process is started, for that message. This differs from |
319 | \fB\-M\fP in that retry data is respected, and it also differs from \fB\-Mc\fP in |
320 | @@ -1658,7 +1658,7 @@ starting a queue runner process at intervals specified by the given time value. |
321 | single daemon process handles both functions. A common way of starting up a |
322 | combined daemon at system boot time is to use a command such as |
323 | .sp |
324 | - /usr/exim/bin/exim \-bd \-q30m |
325 | + /usr/sbin/exim4 \-bd \-q30m |
326 | .sp |
327 | Such a daemon listens for incoming SMTP calls, and also starts a queue runner |
328 | process every 30 minutes. |
329 | @@ -1689,7 +1689,7 @@ regular expression; otherwise it is a literal string. |
330 | If you want to do periodic queue runs for messages with specific recipients, |
331 | you can combine \fB\-R\fP with \fB\-q\fP and a time value. For example: |
332 | .sp |
333 | - exim \-q25m \-R @special.domain.example |
334 | + exim4 \-q25m \-R @special.domain.example |
335 | .sp |
336 | This example does a queue run for messages with recipients in the given domain |
337 | every 25 minutes. Any additional flags that are specified with \fB\-q\fP are |
338 | @@ -1805,6 +1805,26 @@ under most shells. |
339 | .sp |
340 | . |
341 | .SH "SEE ALSO" |
342 | +.BR exicyclog (8), |
343 | +.BR exigrep (8), |
344 | +.BR exim_checkaccess (8), |
345 | +.BR exim_convert4r4 (8), |
346 | +.BR exim_db (8), |
347 | +.BR exim_dbmbuild (8), |
348 | +.BR exim_lock (8), |
349 | +.BR eximon (8), |
350 | +.BR exinext (8), |
351 | +.BR exiqgrep (8), |
352 | +.BR exiqsumm (8), |
353 | +.BR exiwhat (8), |
354 | +.BR update\-exim4.conf (8), |
355 | +.BR update\-exim4defaults (8), |
356 | +/usr/share/doc/exim4\-base/, |
357 | +/usr/share/doc/exim4\-base/README.Debian.[gz|html]. |
358 | .rs |
359 | .sp |
360 | The full Exim specification, the Exim book, and the Exim wiki. |
361 | + |
362 | +.SH AUTHOR |
363 | +This manual page was provided with the upstream Exim source package. |
364 | +It was enhanced for the Debian GNU/Linux system. |
365 | diff --git a/scripts/Configure-config.h b/scripts/Configure-config.h |
366 | index 75d366f..d9b13c7 100755 |
367 | --- a/scripts/Configure-config.h |
368 | +++ b/scripts/Configure-config.h |
369 | @@ -23,6 +23,13 @@ |
370 | if [ "$1" != "" ] ; then MAKE=$1 ; fi |
371 | if [ "$MAKE" = "" ] ; then MAKE=make ; fi |
372 | |
373 | +# exporting distribution to use it in smtp banner |
374 | +if test -x /usr/bin/lsb_release && lsb_release -si; then |
375 | + export EXIM_DISTRIBUTION=\"$(lsb_release -si)\" |
376 | +else |
377 | + export EXIM_DISTRIBUTION=\"\" |
378 | +fi |
379 | + |
380 | $MAKE buildconfig || exit 1 |
381 | |
382 | # BEWARE: tab characters needed in the following sed command. They have had |
383 | diff --git a/scripts/exim_install b/scripts/exim_install |
384 | index 1e88050..e287d5e 100755 |
385 | --- a/scripts/exim_install |
386 | +++ b/scripts/exim_install |
387 | @@ -221,6 +221,8 @@ while [ $# -gt 0 ]; do |
388 | version=exim-`$exim 2>/dev/null | \ |
389 | awk '/Exim version/ { OFS=""; print $3,"-",substr($4,2,length($4)-1) }'`${EXE} |
390 | |
391 | + version=exim |
392 | + |
393 | if [ "${version}" = "exim-${EXE}" ]; then |
394 | echo $com "" |
395 | echo $com "*** Could not run $exim to find version number ***" |
396 | @@ -370,10 +372,8 @@ done |
397 | |
398 | |
399 | |
400 | -# If there is no configuration file, install the default, modifying it to refer |
401 | -# to the configured system aliases file. If there is no setting for |
402 | -# SYSTEM_ALIASES_FILE, use the traditional /etc/aliases. If the file does not |
403 | -# exist, install a default (dummy) for that too. |
404 | +# Install default configuration file |
405 | +# This is a local Debian modification. |
406 | |
407 | # However, if CONFIGURE_FILE specifies a list of files, skip this code. |
408 | |
409 | @@ -396,7 +396,7 @@ elif [ ! -f ${CONFIGURE_FILE} ]; then |
410 | ${real} ${MKDIR} -p `${DIRNAME} ${CONFIGURE_FILE}` |
411 | |
412 | echo sed -e '\\' |
413 | - echo " \"/SYSTEM_ALIASES_FILE/ s'SYSTEM_ALIASES_FILE'${ACTUAL_SYSTEM_ALIASES_FILE}'\"" '\\' |
414 | + echo " \"/SYSTEM_ALIASES_FILE/ s'SYSTEM_ALIASES_FILE'/etc/aliases'\"" '\\' |
415 | echo " ../src/configure.default > \${CONFIGURE_FILE}" |
416 | |
417 | # I can't find a way of writing this using the ${real} feature because |
418 | @@ -405,7 +405,7 @@ elif [ ! -f ${CONFIGURE_FILE} ]; then |
419 | |
420 | if [ "$real" = "" ] ; then |
421 | sed -e \ |
422 | - "/SYSTEM_ALIASES_FILE/ s'SYSTEM_ALIASES_FILE'${ACTUAL_SYSTEM_ALIASES_FILE}'" \ |
423 | + "/SYSTEM_ALIASES_FILE/ s'SYSTEM_ALIASES_FILE'/etc/aliases'" \ |
424 | ../src/configure.default > ${CONFIGURE_FILE} |
425 | else |
426 | true |
427 | diff --git a/src/EDITME b/src/EDITME |
428 | index 53022e5..60734c3 100644 |
429 | --- a/src/EDITME |
430 | +++ b/src/EDITME |
431 | @@ -873,6 +873,21 @@ HEADERS_CHARSET="ISO-8859-1" |
432 | |
433 | |
434 | #------------------------------------------------------------------------------ |
435 | +# On systems which support dynamic loading of shared libraries, Exim can |
436 | +# load a local_scan function specified in its config file instead of having |
437 | +# to be recompiled with the desired local_scan function. For a full |
438 | +# description of the API to this function, see the Exim specification. |
439 | + |
440 | +DLOPEN_LOCAL_SCAN=yes |
441 | + |
442 | +# If you set DLOPEN_LOCAL_SCAN, then you need to include -rdynamic in the |
443 | +# linker flags. Without it, the loaded .so won't be able to access any |
444 | +# functions from exim. |
445 | + |
446 | +LDFLAGS += -rdynamic |
447 | +CFLAGS += -fvisibility=hidden |
448 | + |
449 | +#------------------------------------------------------------------------------ |
450 | # The default distribution of Exim contains only the plain text form of the |
451 | # documentation. Other forms are available separately. If you want to install |
452 | # the documentation in "info" format, first fetch the Texinfo documentation |
453 | diff --git a/src/config.h.defaults b/src/config.h.defaults |
454 | index 25ab755..83f6908 100644 |
455 | --- a/src/config.h.defaults |
456 | +++ b/src/config.h.defaults |
457 | @@ -33,6 +33,8 @@ Do not put spaces between # and the 'define'. |
458 | |
459 | #define AUTH_VARS 4 |
460 | |
461 | +#define DLOPEN_LOCAL_SCAN |
462 | + |
463 | #define BIN_DIRECTORY |
464 | |
465 | #define CONFIGURE_FILE |
466 | @@ -232,4 +234,6 @@ for EXIM_ARITH_MAX and _MIN in OS/oh.h-FOO */ |
467 | #define SC_EXIM_ARITH "%" SCNi64 /* scanf incl. 0x prefix */ |
468 | #define SC_EXIM_DEC "%" SCNd64 /* scanf decimal */ |
469 | |
470 | +#define EXIM_DISTRIBUTION |
471 | + |
472 | /* End of config.h.defaults */ |
473 | diff --git a/src/convert4r4.src b/src/convert4r4.src |
474 | index 47987fc..d6c520b 100755 |
475 | --- a/src/convert4r4.src |
476 | +++ b/src/convert4r4.src |
477 | @@ -666,6 +666,32 @@ return defined $main{$_[0]} && $main{$_[0]} eq "true"; |
478 | |
479 | print STDERR "Runtime configuration file converter for Exim release 4.\n"; |
480 | |
481 | +if( !defined $ENV{"CONVERT4R4"} || $ENV{"CONVERT4R4"} ne "I understand this is an unsupported tool" ) { |
482 | + |
483 | + print STDERR <<EOF; |
484 | +convert4r4 on Debian GNU/Linux deprecated |
485 | + |
486 | +This tool is unsupported by upstream and discouraged by the Debian Exim 4 |
487 | +maintainers. It has multiple known bugs, and you need to manually |
488 | +review its output after using it anyway. Please seriously consider complete |
489 | +manual regeneration of the Exim 4 configuration, preferably by using the new |
490 | +Debconf interface to Exim 4. |
491 | + |
492 | +If you decide to ignore this advice and to use this script anyway, |
493 | +setting the environment variable CONVERT4R4 to the value |
494 | +\"I understand this is an unsupported tool\" |
495 | +will allow you to run the script. If you find bugs, you get to keep |
496 | +the pieces. Please do not file bugs against this script in the Debian |
497 | +BTS without providing a patch fixing the bugs, and please do not |
498 | +expect the upstream exim-users mailing list to answer questions. |
499 | + |
500 | +Kind regards |
501 | +the Debian Exim4 Maintainers |
502 | +EOF |
503 | + |
504 | + exit 1; |
505 | +} |
506 | + |
507 | $transport_start = $director_start = $router_start = $retry_start |
508 | = $rewrite_start = $auth_start = 999999; |
509 | |
510 | diff --git a/src/exicyclog.src b/src/exicyclog.src |
511 | index 20bf9fc..75df6c6 100644 |
512 | --- a/src/exicyclog.src |
513 | +++ b/src/exicyclog.src |
514 | @@ -149,12 +149,12 @@ done |
515 | |
516 | st=' ' |
517 | exim_path=`grep "^[$st]*exim_path" $config | sed "s/.*=[$st]*//"` |
518 | -if test "$exim_path" = ""; then exim_path=BIN_DIRECTORY/exim; fi |
519 | +if test "$exim_path" = ""; then exim_path=BIN_DIRECTORY/exim4; fi |
520 | |
521 | -spool_directory=`$exim_path -C $config -bP spool_directory | sed 's/.*=[ ]*//'` |
522 | +spool_directory=`$exim_path -bP spool_directory | sed 's/.*=[ ]*//'` |
523 | |
524 | if [ "$log_file_path" = "" ] ; then |
525 | - log_file_path=`$exim_path -C $config -bP log_file_path | sed 's/.*=[ ]*//'` |
526 | + log_file_path=`$exim_path -bP log_file_path | sed 's/.*=[ ]*//'` |
527 | fi |
528 | |
529 | # If log_file_path contains only "syslog" then no Exim log files are in use. |
530 | diff --git a/src/exim.h b/src/exim.h |
531 | index 61642b5..fe38d4e 100644 |
532 | --- a/src/exim.h |
533 | +++ b/src/exim.h |
534 | @@ -651,6 +651,10 @@ default to EDQUOT if it exists, otherwise ENOSPC. */ |
535 | # define EXIM_GROUPLIST_SIZE NGROUPS_MAX |
536 | #endif |
537 | |
538 | +#ifndef EXIM_DISTRIBUTION |
539 | + #define EXIM_DISTRIBUTION "" |
540 | +#endif |
541 | + |
542 | /* Linux has TCP_CORK, FreeBSD has TCP_NOPUSH; they do pretty much the same */ |
543 | |
544 | #ifdef TCP_CORK |
545 | diff --git a/src/exim_checkaccess.src b/src/exim_checkaccess.src |
546 | index 360f307..d79afe8 100755 |
547 | --- a/src/exim_checkaccess.src |
548 | +++ b/src/exim_checkaccess.src |
549 | @@ -52,7 +52,7 @@ done |
550 | # a tab to keep the tab in one place. |
551 | |
552 | exim_path=`perl -ne 'chop;if (/^\s*exim_path\s*=\s*(.*)/){print "$1\n";last;}' $config` |
553 | -if test "$exim_path" = ""; then exim_path=BIN_DIRECTORY/exim; fi |
554 | +if test "$exim_path" = ""; then exim_path=BIN_DIRECTORY/exim4; fi |
555 | |
556 | |
557 | ######################################################################### |
558 | diff --git a/src/eximon.src b/src/eximon.src |
559 | index 6293a7c..ab1d24c 100644 |
560 | --- a/src/eximon.src |
561 | +++ b/src/eximon.src |
562 | @@ -79,10 +79,10 @@ config=${EXIMON_EXIM_CONFIG-$config} |
563 | |
564 | st=' ' |
565 | EXIM_PATH=`grep "^[$st]*exim_path" $config | sed "s/.*=[$st]*//"` |
566 | -if test "$EXIM_PATH" = ""; then EXIM_PATH=BIN_DIRECTORY/exim; fi |
567 | +if test "$EXIM_PATH" = ""; then EXIM_PATH=BIN_DIRECTORY/exim4; fi |
568 | |
569 | -SPOOL_DIRECTORY=`$EXIM_PATH -C $config -bP spool_directory | sed 's/.*=[ ]*//'` |
570 | -LOG_FILE_PATH=`$EXIM_PATH -C $config -bP log_file_path | sed 's/.*=[ ]*//'` |
571 | +SPOOL_DIRECTORY=`$EXIM_PATH -bP spool_directory | sed 's/.*=[ ]*//'` |
572 | +LOG_FILE_PATH=`$EXIM_PATH -bP log_file_path | sed 's/.*=[ ]*//'` |
573 | |
574 | # If log_file_path is "syslog" then logging is only to syslog, and the monitor |
575 | # is unable to display a log tail unless EXIMON_LOG_FILE_PATH is set to tell |
576 | diff --git a/src/eximstats.src b/src/eximstats.src |
577 | index 5e1a084..ae60bef 100644 |
578 | --- a/src/eximstats.src |
579 | +++ b/src/eximstats.src |
580 | @@ -501,6 +501,10 @@ To install these, download and unpack them, then use the normal perl installatio |
581 | make test |
582 | make install |
583 | |
584 | +On B<Debian GNU/Linux> you can use |
585 | +C<apt-get install libgd-perl libgd-text-perl libgd-graph-perl> |
586 | +instead. |
587 | + |
588 | =item B<-chartdir>I <dir> |
589 | |
590 | Create the charts in the directory <dir> |
591 | @@ -533,8 +537,7 @@ about how to create charts from the tables. |
592 | |
593 | =head1 AUTHOR |
594 | |
595 | -There is a website at https://www.exim.org - this contains details of the |
596 | -mailing list exim-users@exim.org. |
597 | +There is a website at https://www.exim.org/. |
598 | |
599 | =head1 TO DO |
600 | |
601 | diff --git a/src/exinext.src b/src/exinext.src |
602 | index 9138018..6de020d 100644 |
603 | --- a/src/exinext.src |
604 | +++ b/src/exinext.src |
605 | @@ -97,9 +97,9 @@ if [ "$exim_path" = "" ]; then |
606 | exim_path=`grep "^[$st]*exim_path" $config | sed "s/.*=[$st]*//"` |
607 | fi |
608 | |
609 | -if test "$exim_path" = ""; then exim_path=BIN_DIRECTORY/exim; fi |
610 | -spool_directory=`$exim_path $eximmacdef -C $config -bP spool_directory | sed 's/.*=[ ]*//'` |
611 | -qualify_domain=`$exim_path $eximmacdef -C $config -bP qualify_domain | sed 's/.*=[ ]*//'` |
612 | +if test "$exim_path" = ""; then exim_path=BIN_DIRECTORY/exim4; fi |
613 | +spool_directory=`$exim_path $eximmacdef -bP spool_directory | sed 's/.*=[ ]*//'` |
614 | +qualify_domain=`$exim_path $eximmacdef -bP qualify_domain | sed 's/.*=[ ]*//'` |
615 | |
616 | # Now do the job. Perl uses $ so frequently that we don't want to have to |
617 | # escape them all from the shell, so pass in shell variable values as |
618 | @@ -144,7 +144,7 @@ perl - $exim_path "$eximmacdef" $argone $spool_directory $qualify_domain $config |
619 | # Run Exim to get a list of hosts for the given domain; for |
620 | # each one construct the appropriate retry key. |
621 | |
622 | - open(LIST, "$exim -C $config -v -bt $address |") || |
623 | + open(LIST, "$exim -v -bt $address |") || |
624 | die "can't run exim to route $address"; |
625 | |
626 | while (<LIST>) |
627 | @@ -181,7 +181,7 @@ perl - $exim_path "$eximmacdef" $argone $spool_directory $qualify_domain $config |
628 | |
629 | # Run exim_dumpdb to get out the retry data and pick off what we want |
630 | |
631 | - open(DATA, "${exim}_dumpdb $spool retry |") || |
632 | + open(DATA, "/usr/sbin/exim_dumpdb $spool retry |") || |
633 | die "can't run exim_dumpdb"; |
634 | |
635 | while (<DATA>) |
636 | diff --git a/src/exiqgrep.src b/src/exiqgrep.src |
637 | index 0661c57..119403f 100644 |
638 | --- a/src/exiqgrep.src |
639 | +++ b/src/exiqgrep.src |
640 | @@ -26,7 +26,7 @@ use Getopt::Std; |
641 | use File::Basename; |
642 | |
643 | # Have this variable point to your exim binary. |
644 | -my $exim = 'BIN_DIRECTORY/exim'; |
645 | +my $exim = 'BIN_DIRECTORY/exim4'; |
646 | my $eargs = '-bpu'; |
647 | my %id; |
648 | my %opt; |
649 | diff --git a/src/exiwhat.src b/src/exiwhat.src |
650 | index a1f748e..365ac37 100644 |
651 | --- a/src/exiwhat.src |
652 | +++ b/src/exiwhat.src |
653 | @@ -98,9 +98,9 @@ fi |
654 | |
655 | st=' ' |
656 | exim_path=`grep "^[$st]*exim_path" $config | sed "s/.*=[$st]*//"` |
657 | -if test "$exim_path" = ""; then exim_path=BIN_DIRECTORY/exim; fi |
658 | -spool_directory=`$exim_path -C $config -bP spool_directory | sed "s/.*=[ ]*//"` |
659 | -process_log_path=`$exim_path -C $config -bP process_log_path | sed "s/.*=[ ]*//"` |
660 | +if test "$exim_path" = ""; then exim_path=BIN_DIRECTORY/exim4; fi |
661 | +spool_directory=`$exim_path -bP spool_directory | sed "s/.*=[ ]*//"` |
662 | +process_log_path=`$exim_path -bP process_log_path | sed "s/.*=[ ]*//"` |
663 | |
664 | # The file that Exim writes when sent the SIGUSR1 signal is specified by |
665 | # the process_log_path option. If that is not defined, Exim uses the file |
666 | diff --git a/src/globals.c b/src/globals.c |
667 | index ff246fe..4e67859 100644 |
668 | --- a/src/globals.c |
669 | +++ b/src/globals.c |
670 | @@ -117,6 +117,10 @@ int dsn_ret = 0; |
671 | const pcre2_code *regex_DSN = NULL; |
672 | uschar *dsn_advertise_hosts = NULL; |
673 | |
674 | +#ifdef DLOPEN_LOCAL_SCAN |
675 | +uschar *local_scan_path = NULL; |
676 | +#endif |
677 | + |
678 | #ifndef DISABLE_TLS |
679 | BOOL gnutls_compat_mode = FALSE; |
680 | BOOL gnutls_allow_auto_pkcs11 = FALSE; |
681 | @@ -918,7 +922,7 @@ const uschar *event_name = NULL; /* event name variable */ |
682 | |
683 | |
684 | gid_t exim_gid = EXIM_GID; |
685 | -uschar *exim_path = US BIN_DIRECTORY "/exim" |
686 | +uschar *exim_path = US BIN_DIRECTORY "/exim4" |
687 | "\0<---------------Space to patch exim_path->"; |
688 | uid_t exim_uid = EXIM_UID; |
689 | int expand_level = 0; /* Nesting depth, indent for debug */ |
690 | @@ -1480,7 +1484,7 @@ int smtp_accept_reserve = 0; |
691 | uschar *smtp_active_hostname = NULL; |
692 | int smtp_backlog_monitor = 0; |
693 | uschar *smtp_banner = US"$smtp_active_hostname ESMTP " |
694 | - "Exim $version_number $tod_full" |
695 | + "Exim $version_number " EXIM_DISTRIBUTION " $tod_full" |
696 | "\0<---------------Space to patch smtp_banner->"; |
697 | int smtp_ch_index = 0; |
698 | uschar *smtp_cmd_argument = NULL; |
699 | diff --git a/src/globals.h b/src/globals.h |
700 | index fe099e4..f275a0f 100644 |
701 | --- a/src/globals.h |
702 | +++ b/src/globals.h |
703 | @@ -155,6 +155,10 @@ extern int dsn_ret; /* DSN ret type*/ |
704 | extern const pcre2_code *regex_DSN; /* For recognizing DSN settings */ |
705 | extern uschar *dsn_advertise_hosts; /* host for which TLS is advertised */ |
706 | |
707 | +#ifdef DLOPEN_LOCAL_SCAN |
708 | +extern uschar *local_scan_path; /* Path to local_scan() library */ |
709 | +#endif |
710 | + |
711 | /* Input-reading functions for messages, so we can use special ones for |
712 | incoming TCP/IP. */ |
713 | |
714 | diff --git a/src/local_scan.c b/src/local_scan.c |
715 | index 7a3bae7..7568ee4 100644 |
716 | --- a/src/local_scan.c |
717 | +++ b/src/local_scan.c |
718 | @@ -7,58 +7,133 @@ |
719 | /* See the file NOTICE for conditions of use and distribution. */ |
720 | |
721 | |
722 | -/****************************************************************************** |
723 | -This file contains a template local_scan() function that just returns ACCEPT. |
724 | -If you want to implement your own version, you should copy this file to, say |
725 | -Local/local_scan.c, and edit the copy. To use your version instead of the |
726 | -default, you must set |
727 | - |
728 | -HAVE_LOCAL_SCAN=yes |
729 | -LOCAL_SCAN_SOURCE=Local/local_scan.c |
730 | - |
731 | -in your Local/Makefile. This makes it easy to copy your version for use with |
732 | -subsequent Exim releases. |
733 | - |
734 | -For a full description of the API to this function, see the Exim specification. |
735 | -******************************************************************************/ |
736 | - |
737 | - |
738 | /* This is the only Exim header that you should include. The effect of |
739 | including any other Exim header is not defined, and may change from release to |
740 | release. Use only the documented interface! */ |
741 | |
742 | #include "local_scan.h" |
743 | |
744 | +#ifdef DLOPEN_LOCAL_SCAN |
745 | +#include <dlfcn.h> |
746 | +static int (*local_scan_fn)(int fd, uschar **return_text) = NULL; |
747 | +static int load_local_scan_library(void); |
748 | +#endif |
749 | |
750 | -/* This is a "do-nothing" version of a local_scan() function. The arguments |
751 | -are: |
752 | - |
753 | - fd The file descriptor of the open -D file, which contains the |
754 | - body of the message. The file is open for reading and |
755 | - writing, but modifying it is dangerous and not recommended. |
756 | - |
757 | - return_text A pointer to an unsigned char* variable which you can set in |
758 | - order to return a text string. It is initialized to NULL. |
759 | - |
760 | -The return values of this function are: |
761 | - |
762 | - LOCAL_SCAN_ACCEPT |
763 | - The message is to be accepted. The return_text argument is |
764 | - saved in $local_scan_data. |
765 | +int |
766 | +local_scan(int fd, uschar **return_text) |
767 | +{ |
768 | |
769 | - LOCAL_SCAN_REJECT |
770 | - The message is to be rejected. The returned text is used |
771 | - in the rejection message. |
772 | +#ifdef DLOPEN_LOCAL_SCAN |
773 | +/* local_scan_path is defined AND not the empty string */ |
774 | +if (local_scan_path && *local_scan_path) |
775 | + { |
776 | + if (!local_scan_fn) |
777 | + { |
778 | + if (!load_local_scan_library()) |
779 | + { |
780 | + char *base_msg , *error_msg , *final_msg ; |
781 | + int final_length = -1 ; |
782 | + |
783 | + base_msg=US"Local configuration error - local_scan() library failure\n"; |
784 | + error_msg = dlerror() ; |
785 | + |
786 | + final_length = strlen(base_msg) + strlen(error_msg) + 1 ; |
787 | + final_msg = (char*)malloc( final_length*sizeof(char) ) ; |
788 | + *final_msg = '\0' ; |
789 | + |
790 | + strcat( final_msg , base_msg ) ; |
791 | + strcat( final_msg , error_msg ) ; |
792 | + |
793 | + *return_text = final_msg ; |
794 | + return LOCAL_SCAN_TEMPREJECT; |
795 | + } |
796 | + } |
797 | + return local_scan_fn(fd, return_text); |
798 | + } |
799 | +else |
800 | +#endif |
801 | + return LOCAL_SCAN_ACCEPT; |
802 | +} |
803 | |
804 | - LOCAL_SCAN_TEMPREJECT |
805 | - This specifies a temporary rejection. The returned text |
806 | - is used in the rejection message. |
807 | -*/ |
808 | +#ifdef DLOPEN_LOCAL_SCAN |
809 | |
810 | -int |
811 | -local_scan(int fd, uschar **return_text) |
812 | +static int load_local_scan_library(void) |
813 | { |
814 | -return LOCAL_SCAN_ACCEPT; |
815 | +/* No point in keeping local_scan_lib since we'll never dlclose() anyway */ |
816 | +void *local_scan_lib = NULL; |
817 | +int (*local_scan_version_fn)(void); |
818 | +int vers_maj; |
819 | +int vers_min; |
820 | + |
821 | +local_scan_lib = dlopen(local_scan_path, RTLD_NOW); |
822 | +if (!local_scan_lib) |
823 | + { |
824 | + log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() library open failed - " |
825 | + "message temporarily rejected"); |
826 | + return FALSE; |
827 | + } |
828 | + |
829 | +local_scan_version_fn = dlsym(local_scan_lib, "local_scan_version_major"); |
830 | +if (!local_scan_version_fn) |
831 | + { |
832 | + dlclose(local_scan_lib); |
833 | + log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() library doesn't contain " |
834 | + "local_scan_version_major() function - message temporarily rejected"); |
835 | + return FALSE; |
836 | + } |
837 | + |
838 | +/* The major number is increased when the ABI is changed in a non |
839 | + backward compatible way. */ |
840 | +vers_maj = local_scan_version_fn(); |
841 | + |
842 | +local_scan_version_fn = dlsym(local_scan_lib, "local_scan_version_minor"); |
843 | +if (!local_scan_version_fn) |
844 | + { |
845 | + dlclose(local_scan_lib); |
846 | + log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() library doesn't contain " |
847 | + "local_scan_version_minor() function - message temporarily rejected"); |
848 | + return FALSE; |
849 | + } |
850 | + |
851 | +/* The minor number is increased each time a new feature is added (in a |
852 | + way that doesn't break backward compatibility) -- Marc */ |
853 | +vers_min = local_scan_version_fn(); |
854 | + |
855 | + |
856 | +if (vers_maj != LOCAL_SCAN_ABI_VERSION_MAJOR) |
857 | + { |
858 | + dlclose(local_scan_lib); |
859 | + local_scan_lib = NULL; |
860 | + log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() has an incompatible major" |
861 | + "version number, you need to recompile your module for this version" |
862 | + "of exim (The module was compiled for version %d.%d and this exim provides" |
863 | + "ABI version %d.%d)", vers_maj, vers_min, LOCAL_SCAN_ABI_VERSION_MAJOR, |
864 | + LOCAL_SCAN_ABI_VERSION_MINOR); |
865 | + return FALSE; |
866 | + } |
867 | +else if (vers_min > LOCAL_SCAN_ABI_VERSION_MINOR) |
868 | + { |
869 | + dlclose(local_scan_lib); |
870 | + local_scan_lib = NULL; |
871 | + log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() has an incompatible minor" |
872 | + "version number, you need to recompile your module for this version" |
873 | + "of exim (The module was compiled for version %d.%d and this exim provides" |
874 | + "ABI version %d.%d)", vers_maj, vers_min, LOCAL_SCAN_ABI_VERSION_MAJOR, |
875 | + LOCAL_SCAN_ABI_VERSION_MINOR); |
876 | + return FALSE; |
877 | + } |
878 | + |
879 | +local_scan_fn = dlsym(local_scan_lib, "local_scan"); |
880 | +if (!local_scan_fn) |
881 | + { |
882 | + dlclose(local_scan_lib); |
883 | + log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() library doesn't contain " |
884 | + "local_scan() function - message temporarily rejected"); |
885 | + return FALSE; |
886 | + } |
887 | +return TRUE; |
888 | } |
889 | |
890 | +#endif /* DLOPEN_LOCAL_SCAN */ |
891 | + |
892 | /* End of local_scan.c */ |
893 | diff --git a/src/local_scan.h b/src/local_scan.h |
894 | index c609a27..2ef3d72 100644 |
895 | --- a/src/local_scan.h |
896 | +++ b/src/local_scan.h |
897 | @@ -27,6 +27,7 @@ settings, and the store functions. */ |
898 | |
899 | #include <stdarg.h> |
900 | #include <sys/types.h> |
901 | +#pragma GCC visibility push(default) |
902 | #include "config.h" |
903 | #include "mytypes.h" |
904 | #include "store.h" |
905 | @@ -166,6 +167,9 @@ extern header_line *header_list; /* First header */ |
906 | extern BOOL host_checking; /* Set when checking a host */ |
907 | extern uschar *interface_address; /* Interface for incoming call */ |
908 | extern int interface_port; /* Port number for incoming call */ |
909 | +#ifdef DLOPEN_LOCAL_SCAN |
910 | +extern uschar *local_scan_path; |
911 | +#endif |
912 | extern uschar *message_id; /* Internal id of message being handled */ |
913 | extern uschar *received_protocol; /* Name of incoming protocol */ |
914 | extern int recipients_count; /* Number of recipients */ |
915 | @@ -236,4 +240,6 @@ extern pid_t child_open_exim2_function(int *, uschar *, uschar *, const uscha |
916 | extern pid_t child_open_function(uschar **, uschar **, int, int *, int *, BOOL, const uschar *); |
917 | #endif |
918 | |
919 | +#pragma GCC visibility pop |
920 | + |
921 | /* End of local_scan.h */ |
922 | diff --git a/src/readconf.c b/src/readconf.c |
923 | index 06bc50f..6ecb0af 100644 |
924 | --- a/src/readconf.c |
925 | +++ b/src/readconf.c |
926 | @@ -212,6 +212,9 @@ static optionlist optionlist_config[] = { |
927 | { "local_from_prefix", opt_stringptr, {&local_from_prefix} }, |
928 | { "local_from_suffix", opt_stringptr, {&local_from_suffix} }, |
929 | { "local_interfaces", opt_stringptr, {&local_interfaces} }, |
930 | +#ifdef DLOPEN_LOCAL_SCAN |
931 | + { "local_scan_path", opt_stringptr, &local_scan_path }, |
932 | +#endif |
933 | #ifdef HAVE_LOCAL_SCAN |
934 | { "local_scan_timeout", opt_time, {&local_scan_timeout} }, |
935 | #endif |
936 | diff --git a/src/rewrite.c b/src/rewrite.c |
937 | index 005dc51..aca9cc3 100644 |
938 | --- a/src/rewrite.c |
939 | +++ b/src/rewrite.c |
940 | @@ -495,15 +495,14 @@ while (*s) |
941 | |
942 | if (!recipient) |
943 | { |
944 | - /* Handle unparesable addresses in the header. Slightly ugly because a |
945 | + /* Log unparesable addresses in the header. Slightly ugly because a |
946 | null output from the extract can also result from a header without an |
947 | - address, "To: undisclosed recpients:;" being the classic case. */ |
948 | + address, "To: undisclosed recpients:;" being the classic case. Ignore |
949 | + this one and carry on. */ |
950 | |
951 | if ((rewrite_rules || routed_old) && Ustrcmp(errmess, "empty address") != 0) |
952 | - { |
953 | log_write(0, LOG_MAIN, "rewrite: %s", errmess); |
954 | - exim_exit(EXIT_FAILURE); |
955 | - } |
956 | + |
957 | loop_reset_point = store_reset(loop_reset_point); |
958 | continue; |
959 | } |
960 | diff --git a/src/string.c b/src/string.c |
961 | index a5161bb..4fb9f45 100644 |
962 | --- a/src/string.c |
963 | +++ b/src/string.c |
964 | @@ -418,6 +418,7 @@ return ss; |
965 | |
966 | #if (defined(HAVE_LOCAL_SCAN) || defined(EXPAND_DLFUNC)) \ |
967 | && !defined(MACRO_PREDEF) && !defined(COMPILE_UTILITY) |
968 | +#pragma GCC visibility push(default) |
969 | /************************************************* |
970 | * Copy and save string * |
971 | *************************************************/ |
972 | @@ -463,6 +464,7 @@ string_copyn_function(const uschar * s, int n) |
973 | { |
974 | return string_copyn(s, n); |
975 | } |
976 | +#pragma GCC visibility pop |
977 | #endif |
978 | |
979 |
I don't know how I ended up having additional changes there?
Ugh. I'm sorry ... I have no idea what I'm doing with launchpad.