Can directadmin.conf options domainips_default_ip contain mulitple ip addresses?

dkzr

Verified User
Joined
Oct 17, 2013
Messages
94
Location
The Netherlands
Hi,

Is it allowed to list mulitple IP addresses in the domainips_default_ip config?

Eg.

domainips_default_ip=<my IPv4>; <my IPv6>

This seems to work, but maybe I miss something?


Why?

I'f added an extra IP to my server (both IPv4 and IPv6) and I want to make sure exim only sends through one set of them.

I know there is the directadmin.conf option `domainips_default_ip` but I can't find any help on that option (it's not listed on https://help.directadmin.com/item.php?id=284 ).

What I've done and what seems to work is to just add both an IPv4 and IPv6 addres to the option

domainips_default_ip=<my IPv4>; <my IPv6>

So that after running

echo "action=rewrite&value=domainips" >> /usr/local/directadmin/data/task.queue

my /etc/virtual/domainips now contains:

*:<my IPv4>; <my IPv6>

Thanks !
 
Last edited:
Looking through the code, I cannot find any reason why it wouldn't work.
The internal DirectAdmin code makes no checks or comparisons on that variable.
When applicable, it's dumped directly into the /etc/virtual/domainips file, as you're seeing.

So the only question that remains is, is the format you're using correct.
Checking here:
https://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_smtp_transport.html

The example given is:
Code:
interface = <; 192.168.123.123 ; 3ffe:ffff:836f::fe86:a061
and the line used in the exim.conf is
Code:
interface = <; ${if exists{/etc/virtual/domainips}{${lookup{$sender_address_domain}lsearch*{/etc/virtual/domainips}}}}
sp the <; is already there, so your entry looks right.

However, I'm not 100% sure if the wildcard lsearch* is ok with the semi-colon.. so if you can see if exim is sending on that IPv6, then that would answer that question for us :)

John
 
Hi John,

Thanks for the reply.

On my Debian server I've disabled IPv6 autoconf, so I don't know how "good" my test is, but exim on my server does indeed send through the configured IPv6 address.
 
Back
Top