Lets say you only want to allow users to have access to their email accounts from the US.
I have added in XTABLES-ADDONS ssmtpd Reject if != US.
Then I log in to Rouncube and attempt to send a message, I get an SMTP error.
From var/log/iptables -- grep GeoIP current |tai64nlocal
2020-02-21 16:41:13.764761500 Feb 21 16:41:13 Mysvr01 GeoIP BAN: ssmtpd IN=lo OUT= MAC=00:00:00:00:00:00:00:00:00:00:00:00:08:00 SRC=127.0.0.1 DST=127.0.0.1 LEN=60 TOS=00 PREC=0x00 TTL=64 ID=33772 CE DFTO=TCP SPT=49108 DPT=465 SEQ=3527349124 ACK=0 WINDOW=65495 SYN URGP=0
Then I checked, on the off-chance, Maxmind might have a country code for loopback..
geoiplook-country 127.0.0.1
Could not find an entry for this IP address (127.0.0.1)
Any Solutions?
Sending emails does still work from email clients - Thunderbird, Outlook, Mobile Phones.etc.
But of course, those are configured to use DNS names.