diff --git a/plugins/senderbase/senderbase b/plugins/senderbase/senderbase index 77a55bad..921c056f 100755 --- a/plugins/senderbase/senderbase +++ b/plugins/senderbase/senderbase @@ -16,9 +16,11 @@ track their current reputation score. =head1 CONFIGURATION -By default, the script will use the first IP address returned by C. -If that's not the right address to use, set the C environment -variable to the appropriate value. +By default, the script will use the first IP address returned by +C. If that's not the right address to use, set the +C environment variable to the appropriate value. (Note that +if a host has multiple IP addresses, there's no guaranteed ordering for +C, so you should set the address explicitly in that case.) [senderbase] env.ip_address 8.8.8.8 @@ -40,7 +42,7 @@ This plugin is made available under a CC0 waiver: =cut -real_ip_address=${ip_address:-$(hostname -I | head -1)} +real_ip_address=${ip_address:-$(hostname -I | awk '{print $1}')} ip_reversed=$(echo $real_ip_address | sed -re 's/^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)$/\4.\3.\2.\1/') query_host=${ip_reversed}.rf.senderbase.org