The following is the GNU All-permissive License as recommended in

Copyright (C) 2024 Free Software Foundation

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.

Contributions are welcome. See

To transition sending email to a new ip or range

Send a certain percent of messages on the new and old ip. To do this on one machine which has both ips, add these to the remote smtp transports. For example, in /etc/exim4/conf.d/transports.conf depending on the config setup.

helo_data = ${lookup dnsdb {ptr=$sending_ip_address}{$value}{$primary_hostname}}
interface = ${if < {${randint:1000}}{3} {}{}}

In this example the new ip is and the old is and this makes it send 3/1000 messages on the new ip.

Progression should be slowly increasing. We used this daily sequence change in the 2018/2019 change: 5 10 15 20 30 40 60 80 120 160 220 320 480 640 860 1000

For exim about 4.71 or earlier, the rng is bad or nonexistent, so use this instead.

interface = ${if <= {${run{/usr/bin/python -c "import random; import sys; sys.stdout.write(str(random.randint(1,1000)))"}}}{5} {}{}}

For testing on the normal mail servers, i did this config and test message:

interface = ${if eq {}{$domain} {}{}}
echo "test body" | mail -s "test mail from $HOSTNAME"

and to verify the helo, i ran this

   exim -d -t <<'EOF'
Subject: Testing Exim

This is a test message.

For testing config changes, run update-exim4.conf, which will affect subsequent runs of exim, for example when you send a test message, or when new queue runners are spawned, but it won't restart existing processes, thus it will have a less detrimental affect if things are wrong. There are better ways to test new configs where the new queue runner's won't pick it up, but I haven't figured it out yet. After a change is tested, restart exim.