chiark / gitweb /
Mark Wooding [Fri, 27 Sep 2024 08:27:47 +0000 (09:27 +0100)]
spam.m4: Defer messages if SpamAssassin isn't working.
Mark Wooding [Tue, 28 May 2024 01:35:51 +0000 (02:35 +0100)]
base.m4: Nearly set DKIM expiry time.
Alas, Exim is too old to understand this.
Mark Wooding [Thu, 23 May 2024 01:45:27 +0000 (02:45 +0100)]
base.m4 (DKIM_SIGN_P): Check that the sending domain is actually listed.
Mark Wooding [Thu, 16 May 2024 01:04:25 +0000 (02:04 +0100)]
satellite.m4: Apply `/etc/aliases' to master-domain-qualified addresses.
It's not much good otherwise.
Mark Wooding [Sat, 11 May 2024 13:30:28 +0000 (14:30 +0100)]
base.m4: Line-wrap the DKIM warning header.
Mark Wooding [Sat, 11 May 2024 12:20:54 +0000 (13:20 +0100)]
spam.m4: Skip SpamAssassin check for mail from relay clients.
The expectation is that relay clients use us as their primary path for
delivering mail to external users. If we're going to allow them to do
that, it doesn't seem right to subject it to spam checks -- particularly
since there isn't a receiving user to set a spam score limit.
No, I'm not completely sure about this.
Mark Wooding [Sat, 11 May 2024 11:35:34 +0000 (12:35 +0100)]
Makefile, site.mk: Add a `site.mk' file with the essential definitions.
I'm fed up of skew over this.
Mark Wooding [Sat, 11 May 2024 11:27:45 +0000 (12:27 +0100)]
config.m4 (relay_hosts): Allow the entire internal network to relay.
Because, nowadays, we require relay hosts in the internal network to
hold a valid certificate before we accept their relayed mail.
I don't know why chiark is included in the list.
Mark Wooding [Tue, 7 May 2024 12:08:28 +0000 (13:08 +0100)]
config.m4 (dkim_headers): Reinstate the spaces around the header names.
Mark Wooding [Tue, 7 May 2024 12:06:26 +0000 (13:06 +0100)]
base.m4 (dkim_sign_headers): Oversign the headers we're interested in.
Adds some stunt Exim expansion to count how many instances of each
header there are in the message and add extra entry for each one into
the list plus an extra to catch any additional header added later.
This also has the happy side-effect of trimming spaces from the incoming
list items.
Mark Wooding [Tue, 7 May 2024 10:54:45 +0000 (11:54 +0100)]
config.m4 (dkim_headers): Remove the `Resent-...' and `List-...' headers.
Both are things which can plausibly be added by subsequent message
processing, and we should all this without breaking the signature.
Mark Wooding [Mon, 6 May 2024 15:48:58 +0000 (16:48 +0100)]
base.m4: Skip `HELO' checking in submission mode, not relay mode.
Oops. That's been wrong for a while.
Mark Wooding [Mon, 6 May 2024 15:47:32 +0000 (16:47 +0100)]
vhost-local.m4: Reinstate a newline which wasn't spurious after all.
I think that's egg on my face.
Mark Wooding [Mon, 6 May 2024 03:15:06 +0000 (04:15 +0100)]
base.m4, config.m4: Remove spaces from the `dkim_sign_headers' setting.
It turns out that Exim secretly requires there to be no spaces here.
Or, more specifically, it compares the header names in the message
against the list entries between the colons without stripping spaces, so
none of them will match.
Mark Wooding [Mon, 6 May 2024 03:13:38 +0000 (04:13 +0100)]
vhost-local.m4: Remove a couple of spurious blank lines.
Mark Wooding [Sun, 5 May 2024 15:30:01 +0000 (16:30 +0100)]
base.m4 (DKIM_SIGN): Add missing braces.
Mark Wooding [Sat, 4 May 2024 14:44:00 +0000 (15:44 +0100)]
base.m4, config.m4: Add DKIM signing machinery.
Mark Wooding [Sat, 4 May 2024 14:43:24 +0000 (15:43 +0100)]
base.m4: Remove redundant haereses.
Mark Wooding [Sat, 4 May 2024 14:42:15 +0000 (15:42 +0100)]
defs.m4: Document the behaviour of omitting `KV' apodosis/haeresis args.
Mark Wooding [Sat, 4 May 2024 14:39:25 +0000 (15:39 +0100)]
defs.m4: Factor out the apodosis/haeresis handling in `LOOKUP_DOMAIN'.
Mark Wooding [Sat, 4 May 2024 14:38:09 +0000 (15:38 +0100)]
base.m4: Add missing `SMTP_DELIVERY' to the plain `smtp' transport.
Mark Wooding [Sun, 5 May 2024 17:38:56 +0000 (18:38 +0100)]
config.m4: Fix national's IPv6 address.
Mark Wooding [Thu, 2 May 2024 11:59:14 +0000 (12:59 +0100)]
lists.m4: Update the IP address lists following server move.
Mark Wooding [Mon, 29 Apr 2024 10:30:20 +0000 (11:30 +0100)]
config.m4: Update spamassassin server address.
Mark Wooding [Sun, 28 Apr 2024 16:32:37 +0000 (17:32 +0100)]
base.m4: Raise the message size limit.
Mark Wooding [Sun, 8 May 2022 15:45:45 +0000 (16:45 +0100)]
vhost-local.m4: Hide the footer line.
Mark Wooding [Tue, 21 Sep 2021 15:54:14 +0000 (16:54 +0100)]
base.m4: Be extra persistent when trying to deliver mail to the relay.
Mark Wooding [Mon, 27 Apr 2020 18:15:40 +0000 (19:15 +0100)]
base.m4: Accept bad synchronization from `submission' clients.
Alas, Thunderbird is an offender, and this prevents it from using
`STARTTLS', which is a much worse outcome.
Mark Wooding [Mon, 27 Apr 2020 18:14:56 +0000 (19:14 +0100)]
base.m4: Accept bad `HELO' hosts from `submission' clients.
Mark Wooding [Wed, 4 Jul 2018 17:42:53 +0000 (18:42 +0100)]
config.m4: Don't deploy the Lets Encrypt certificate on submission.
Mark Wooding [Tue, 26 Jun 2018 15:48:54 +0000 (16:48 +0100)]
config.m4: Present a LetsEncrypt certificate to external clients.
Mark Wooding [Tue, 26 Jun 2018 15:26:45 +0000 (16:26 +0100)]
base.m4, config.m4: Make the certificate list tweakable in config.
Mark Wooding [Mon, 15 Jan 2018 09:37:01 +0000 (09:37 +0000)]
base.m4: Neither accept nor transmit messages with long lines over SMTP.
This is an upstream bug: https://bugs.exim.org/show_bug.cgi?id=1684
Mark Wooding [Mon, 15 Jan 2018 09:36:39 +0000 (09:36 +0000)]
base.m4: Fix indentation of some ACL configuration.
Mark Wooding [Sat, 25 Nov 2017 10:57:24 +0000 (10:57 +0000)]
base.m4: Explicitly disable the `CHUNKING' extension.
See https://lists.exim.org/lurker/message/
20171125.034842.
d1d75cac.en.html
Debian disables this extension by default, but be explicit about it for
now.
Mark Wooding [Sun, 13 Aug 2017 23:55:45 +0000 (00:55 +0100)]
base.m4: Re-enable RFC1413 (ident) requests.
This got turned off in 4.86. Turn it back on.
Mark Wooding [Sat, 29 Jul 2017 20:02:39 +0000 (21:02 +0100)]
config.m4: Fix the `acceptable' ciphers list.
Replace `+NORMAL' with the explicit algorithm class wildcards (except
for compression, which I leave turned off). This completely broke TLS
negotiation for outside senders. :-(
Mark Wooding [Sat, 29 Jul 2017 01:55:08 +0000 (02:55 +0100)]
config.m4: Fiddle with the ciphersuite settings.
Enable the fancy elliptic curve toys, AEAD schemes, and general
djbishness. Also, take an interest in the ordering of ciphers in the
`acceptable' list.
Mark Wooding [Fri, 21 Jul 2017 08:30:01 +0000 (09:30 +0100)]
config.m4: Use correct IPv6 address for national to permit relaying.
Bungled in
2f2fc64da4fd3e3edb06589a5e7dd0f3e958a40b :-(
Mark Wooding [Wed, 19 Jul 2017 09:46:08 +0000 (10:46 +0100)]
lists.m4, exchange.m4: Check for bogus addresses when doing DNS lookups.
Inspired by Chris Siebenmann's `How not to set up your DNS' series; see
https://utcc.utoronto.ca/~cks/space/blog/__Index.
Mark Wooding [Fri, 30 Jun 2017 09:47:01 +0000 (10:47 +0100)]
config.m4: Include national as a valid relay host.
Mark Wooding [Fri, 30 Jun 2017 09:13:54 +0000 (10:13 +0100)]
config.m4: Use correct VPN address for chiark.
Mark Wooding [Mon, 27 Jun 2016 10:05:03 +0000 (11:05 +0100)]
lists.m4: Preparation for switch to A&A.
Mark Wooding [Wed, 11 May 2016 00:17:19 +0000 (01:17 +0100)]
vhost-local.m4: Fix missing newline.
I left a trap for myself: the extra-stuff argument to the
`USER_SPAMLIMIT_ROUTERS' macro wants a trailing newline (and tab);
otherwise the following material ends up following without a line break.
This went badly wrong: a `condition = ' line was extended with extra
material causing it to always match! Fortunately little harm was
actually done.
Mark Wooding [Fri, 6 May 2016 17:55:29 +0000 (18:55 +0100)]
vhost-local.m4: New hack for delivery to system users via vhosts.
I decided that `final' is awful. Now there is a new `sysusers' option
which uses a separate forward file (which can usefully be symlinked to
one's `forward.suffix' if one is careful).
Mark Wooding [Sat, 10 Oct 2015 13:53:08 +0000 (14:53 +0100)]
user-spam.m4: Fix indentation in the output.
Mark Wooding [Sat, 7 May 2016 01:14:09 +0000 (02:14 +0100)]
exim-spam-limit.userv: Include the recommended spam-limit service file.
Mark Wooding [Sat, 7 May 2016 01:13:14 +0000 (02:13 +0100)]
spam.m4: Include a full path to the Userv client.
Exim clobbers its environment nowadays, so it can't find things with a
PATH search.
Mark Wooding [Sat, 7 May 2016 01:12:19 +0000 (02:12 +0100)]
user-spam.m4: Don't doubly-quote the Userv service-user name.
The `SPAMLIMIT_USERV' macro is going to do that for us.
Mark Wooding [Wed, 20 Apr 2016 00:52:52 +0000 (01:52 +0100)]
base.m4: Be slacker about DH lengths.
Reduce the minimum size for general outbound SMTP to about 512 bits,
because (a) any DH is better than none, and (b) Exim will defer rather
than switching to plaintext if the receiving SMTP advertises STARTTLS.
Also introduce new transports with lower limits, and be consistent about
actually undershooting the advertised limit by four bits.
Mark Wooding [Thu, 24 Mar 2016 11:01:03 +0000 (11:01 +0000)]
base.m4: Add an `auth=...' note to the Received header if we're relaying.
I'd previously resisted doing this, because the full `AUTH=...' notes
I'm passing around look a lot like email addresses and this might
subvert attempts to use extension addresses or the odin forwarder. But
it seems a shame to lose this information.
Compromise: report the sender, as a bare user-name, only if the
domain-part is us. This will, at worst, repeat the user name from the
sending MTA, which told us what it was either as the origin for a local
sender, or the authenticated user name from SMTP authentication or
identd (for submission to localhost).
Mark Wooding [Thu, 24 Mar 2016 11:03:18 +0000 (11:03 +0000)]
base.m4: Quote the `auth=...' name, in case it has bad characters.
As a matter of local policy, user names don't in fact contain bad
characters, but it seems good to be careful anyway.
Mark Wooding [Thu, 24 Mar 2016 11:06:41 +0000 (11:06 +0000)]
base.m4: Pass on authenticated sender properly in `smtp_local'.
* Use the new `$acl_m_user' variable to identify the sender, if it's
set; otherwise use the existing authenticated-sender.
* Force setting `AUTH=...' to the next hop even though we haven't
explicitly authenticated. (Actually, we have, using a TLS client
certificate, but that doesn't seem to count for pushing `AUTH=...'.)
Mark Wooding [Thu, 24 Mar 2016 11:06:41 +0000 (11:06 +0000)]
auth.m4: Report the message's authenticated sender at `DATA' time.
This leaves a handy dropping in the log file which allows us to
associate message queue ids with authenticated users.
Mark Wooding [Thu, 24 Mar 2016 10:48:56 +0000 (10:48 +0000)]
base.m4, auth.m4: Track a per-message authenticated user.
If we're relaying mail, and believing `AUTH=...' notes on `MAIL' lines,
then (a) we might be given several messages during a session, and (b)
they will in general have different `AUTH=...' notes, or none at all.
If we want to report the authenticated sender of a message, then, it's
important to track this information separately for each message.
Therefore, introduce `$acl_m_user', as a per-message counterpart to
`$acl_c_user'. It gets set the same as `$acl_c_user' for non-SMTP
messages (where there can only be one) and after we've just checked a
submitter, in `mail_auth_check'; but it also gets set from
`$authenticated_sender' in the `mailauth' ACL.
Mark Wooding [Thu, 24 Mar 2016 09:40:16 +0000 (09:40 +0000)]
auth.m4: Fix whitespace bogosity in `mailauth' ACL.
Mark Wooding [Thu, 24 Mar 2016 09:38:33 +0000 (09:38 +0000)]
divmap.m4, spam.m4: Rename `data-spam' diversion to `data-hooks'.
Mark Wooding [Wed, 23 Mar 2016 22:33:05 +0000 (22:33 +0000)]
spam.m4, user-spam.m4: Log details about spam rejections for users.
* When we notice a delivery to a user during recipient verification,
take a note of the user's name in the `user' field of the
address_data.
* In the `rcpt_spam' ACL, pick the user name out of the address_data
and remember it and the corresponding recipient address (in a rather
unpleasantly escaped form) along with the others in the variable
`$acl_m_spam_users'.
* Finally, in `data_spam', if we end up rejecting the message, log a
message with the condensed SpamAssassin report, and the user names
and matching recipient addresses.
This leaves, in the rejectlog, enough information for a service to tell
which rejection reports apply to a calling user, and tell them about the
message. We should be able to pick the sender address and the headers
from the usual rejection report, but we don't want to leak the other
envelope recipient addresses. (The user would have seen the /header/
recipients had we not rejected the message as being spam; but the
envelope may contain Bcc recipients or other interesting secrets.)
Mark Wooding [Wed, 23 Mar 2016 22:22:23 +0000 (22:22 +0000)]
spam.m4: Hoist the spam-report formatting to before the rejection.
We're going to want this report either way.
Mark Wooding [Wed, 23 Mar 2016 22:19:16 +0000 (22:19 +0000)]
spam.m4: Capture extracting a field from `$address_data' in a macro.
This makes things a little easier to read anyway, and we're going to be
doing this more soon.
Mark Wooding [Fri, 18 Mar 2016 09:39:34 +0000 (09:39 +0000)]
satellite.m4: Fix newlines around the `alias' router options.
Mark Wooding [Fri, 18 Mar 2016 09:38:59 +0000 (09:38 +0000)]
Makefile: Set config options from mode-specific make variables.
Use this to set `sysdomains' for the `srv' mode; now we don't need
`nosysdomains.m4' any more.
Mark Wooding [Fri, 18 Mar 2016 08:55:20 +0000 (08:55 +0000)]
defs.m4: Fix `generated' warnings.
* Refer to the correct sources. Somehow they managed to be different
between the top and tail warnings.
* Mention which server mode the file was generated for.
Mark Wooding [Wed, 16 Mar 2016 23:00:24 +0000 (23:00 +0000)]
Updates for CVE-2016-1531.
* Leave the environment clear, but do this explicitly because
otherwise Exim moans constantly. I think that we don't need
environment variables propagated from anywhere, so this is OK.
* Use absolute paths when checking configuration files during the
build.
Mark Wooding [Mon, 28 Sep 2015 09:19:17 +0000 (10:19 +0100)]
user-spam.m4: Look up spam limit for lots of recipient.
If the envelope recipient has been changed by forwarding or aliasing
then look up a spam limit using all of the recipient addresses
available to us at the time.
This is particularly important for users of forwarding services such
as that provided by `odin.gg'.
Mark Wooding [Mon, 28 Sep 2015 09:14:02 +0000 (10:14 +0100)]
spam.m4, user-spam.m4 (COMPATIBILITY): Don't split out prefix/suffix.
Don't pass the local-part prefix and suffix as separate items to the
spam-limit lookups. This doesn't affect the plain file lookup, but it
does change the userv interface, which nobody is currently using.
Mark Wooding [Sun, 27 Sep 2015 22:49:32 +0000 (23:49 +0100)]
base.m4: Slacken off local submission processing some more.
We're already allowing arbitrary envelope senders. Now don't clobber
the `Sender' header.
Mark Wooding [Thu, 24 Sep 2015 22:35:28 +0000 (23:35 +0100)]
lists.m4: Jaguar has a proper certificate now.
Mark Wooding [Thu, 16 Jul 2015 20:34:01 +0000 (21:34 +0100)]
Add warning headers directly.
This means we have to stop renaming them. But if we don't do this then
we can't test the headers in the spam filter.
Mark Wooding [Thu, 16 Jul 2015 20:33:11 +0000 (21:33 +0100)]
defs.m4: Remove spurious initial space.
Mark Wooding [Sat, 20 Jun 2015 16:54:00 +0000 (17:54 +0100)]
config.m4: Allow relaying by chiark over the VPN.
Mark Wooding [Sun, 14 Jun 2015 12:54:40 +0000 (13:54 +0100)]
exchange.m4: Rename X-Distorted-... headers in messages from outside.
They're quite possibly misleading. I don't think there's much harm
which can be done by adding extra X-Distorted-Warning headers, but
certainly we don't want anyone confusing things by adding their own
X-Distorted-SpamAssassin-... headers. (That won't affect the server's
assessment of spamminess in any obvious way, but the purpose of the
header is to give user filters something to act on, so it's important
that they use the true header rather than the wrong one.)
Mark Wooding [Sun, 14 Jun 2015 12:51:55 +0000 (13:51 +0100)]
Delay ACL header edits until transport time.
Don't use the `add_header' ACL control any more. Instead, just
accumulate the desired header additions and removals in variables, and
apply them at transport time.
This way, the headers we see in the message are the unmodified ones, as
the message was originally given to us. We can therefore apply header
/removals/ (which aren't allowed in ACLs, so have to be delayed to
routing/transport time) coherently, without the risk of clobbering
the headers we've added ourselves.
Mark Wooding [Sun, 14 Jun 2015 12:46:06 +0000 (13:46 +0100)]
defs.m4: RENAME_HEADERS_ADD doesn't need separators.
Indeed, everything works much better if we agree to terminate header
lines with a newline rather than separate them.
Mark Wooding [Sat, 13 Jun 2015 23:55:41 +0000 (00:55 +0100)]
Add config variable for the ...-Distorted-... token in headers.
Mark Wooding [Sat, 13 Jun 2015 23:47:59 +0000 (00:47 +0100)]
defs.m4, local.m4: Abstract out machinery for header-renaming lists.
We're going to be renaming some more headers soon...
Mark Wooding [Sat, 13 Jun 2015 10:16:33 +0000 (11:16 +0100)]
spam.m4: Rename X-SpamAssassin-* headers to X-Distorted-SpamAssassin-*.
This makes them less confusing because other mailservers attach their
own SpamAssassin reports.
Mark Wooding [Mon, 1 Jun 2015 01:43:47 +0000 (02:43 +0100)]
base.m4: Only get picky about HELO hostnames from external servers.
Mark Wooding [Mon, 1 Jun 2015 01:24:55 +0000 (02:24 +0100)]
base.m4: Allow arbitrary claimed envelope and header senders.
Mark Wooding [Sun, 31 May 2015 15:48:45 +0000 (16:48 +0100)]
Give up on checking claimed sender addresses.
I'm told that it's more hassle than its worth. I can track down
forgeries sufficiently well by staring at Received headers and staring
at logs.
Mark Wooding [Fri, 10 Apr 2015 14:19:25 +0000 (15:19 +0100)]
Allow satellite hosts to do alias processing.
* Do smarthost relaying after alias processing, by adding a new
diversion for it, rather than reusing the `routers/remote'
diversion.
* Move alias processing to `base.m4', and include a new diversion for
additional options.
* Have `satellite.m4' attach a `domains' condition to the alias
processing, so that we only do this for more-or-less local
addresses.
Mark Wooding [Tue, 12 May 2015 08:37:56 +0000 (09:37 +0100)]
lists.m4: Carve out the administratively anomalous hosts from +allnets.
Now jaguar and richmond can send us mail without a complete disaster
ensuing.
Mark Wooding [Mon, 4 May 2015 10:01:14 +0000 (11:01 +0100)]
local.m4: Rename headers with special significance to Dovecot.
Mark Wooding [Mon, 4 May 2015 10:00:46 +0000 (11:00 +0100)]
defs.m4: New macros for inserting separators into lists.
Mark Wooding [Mon, 4 May 2015 10:00:12 +0000 (11:00 +0100)]
defs.m4: Fix commentary, and add missing descriptions.
Mark Wooding [Sat, 2 May 2015 17:36:18 +0000 (18:36 +0100)]
Makefile: Include satellite rewrite rule in service-host configurations.
Locally-directed mail will need to go to the main hub, and we'll have to
trim off the local hostname to make that happen.
Mark Wooding [Thu, 2 Apr 2015 01:35:19 +0000 (02:35 +0100)]
exchange.m4, lists.m4: Standard routing for `service=no' domains.
Domains listed in `domains.conf' with `service = false' or similar get
the standard routing arrangements, and aren't subject to virtual-host
processing.
Mark Wooding [Thu, 2 Apr 2015 00:00:47 +0000 (01:00 +0100)]
Makefile: New configuration flavour for service-only mailservers.
Mark Wooding [Thu, 2 Apr 2015 00:00:26 +0000 (01:00 +0100)]
base.m4: Exim wants `::0' rather than `::' as the magic IPv6 wildcard.
Mark Wooding [Wed, 1 Apr 2015 18:16:07 +0000 (19:16 +0100)]
config.m4, exchange.m4, lists.m4: Allow optout from serving main domain.
This is useful for hosts which provide external mail service for
special subdomains, but don't provide service for local users.
Mark Wooding [Wed, 1 Apr 2015 18:14:40 +0000 (19:14 +0100)]
Makefile, spam.m4, user-spam.m4: Put user limit config in its own file.
Mark Wooding [Thu, 29 Jan 2015 16:52:17 +0000 (16:52 +0000)]
base.m4, config.m4: Define `trusted_users'.
Mark Wooding [Sat, 20 Dec 2014 19:57:25 +0000 (19:57 +0000)]
Merge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/exim-config
* 'master' of git.distorted.org.uk:~mdw/publish/public-git/exim-config:
README: Add a bunch of technical documentation.
Mark Wooding [Sat, 20 Dec 2014 19:33:59 +0000 (19:33 +0000)]
README: Add a bunch of technical documentation.
Mark Wooding [Sat, 20 Dec 2014 13:40:23 +0000 (13:40 +0000)]
Merge branch 'master' of git.distorted.org.uk:~mdw/publish/public-git/exim-config
* 'master' of git.distorted.org.uk:~mdw/publish/public-git/exim-config:
base.m4: New `senders' entry in `domains.conf'.
base.m4: Missing subsection name.
spam.m4: No, we can't check domains in the DATA ACL.
spam.m4: Allow virtual domains to opt out of spam checking.
Mark Wooding [Sat, 20 Dec 2014 13:21:58 +0000 (13:21 +0000)]
base.m4: Use certlists including the issuer, rather than bare certificates.
These work better with DANE TLSA records, coming soon. (Maybe.)
Mark Wooding [Sun, 20 Jul 2014 13:53:18 +0000 (14:53 +0100)]
base.m4: New `senders' entry in `domains.conf'.
This is a get-out-of-gaol card for sending domains too badly
misconfigured to manage a valid DNS A or MX record.
Mark Wooding [Sun, 20 Jul 2014 13:53:18 +0000 (14:53 +0100)]
base.m4: Missing subsection name.
Mark Wooding [Wed, 14 May 2014 08:54:56 +0000 (09:54 +0100)]
spam.m4: No, we can't check domains in the DATA ACL.
Whoops. We've been deferring for a while. This is quite bad.
Mark Wooding [Mon, 12 May 2014 19:04:00 +0000 (20:04 +0100)]
spam.m4: Allow virtual domains to opt out of spam checking.