Unable to add IPv6 address to sendmail access list
- by David M. Syzdek
I am running Sendmail 8.14.4 on Slackware 13.37. I have the following in my /etc/mail/access file and it works without any errors:
Connect:127 OK
Connect:10.0.1 RELAY # Net: office
Connect:50.116.6.8 RELAY # Host: glider
Connect:96.126.127.87 RELAY # Host: kite
The above configuration also allows me to send an e-mail via IPv6 to a local user on the mail server. However, it does not allow my office to relay via IPv6. I have tried two ways of adding IPv6 networks to my access file.
Method 1:
Connect:127 OK
Connect:10.0.1 RELAY # Net: office
Connect:IPv6:2001:470:b:84a RELAY # Net: office
Connect:50.116.6.8 RELAY # Host: glider
Connect:96.126.127.87 RELAY # Host: kite
Method 2:
Connect:127 OK
Connect:10.0.1 RELAY # Net: office
Connect:[IPv6:2001:470:b:84a] RELAY # Net: office
Connect:50.116.6.8 RELAY # Host: glider
Connect:96.126.127.87 RELAY # Host: kite
However whenever I try using either method 1 or 2, I am unable to relay e-mail messages through the host.
/var/log/maillog entry:
May 31 11:57:15 freshsalmon sm-mta[25500]: ruleset=check_relay, arg1=[IPv6:2001:470:b:84a:223:6cff:fe80:35dc], arg2=IPv6:2001:470:b:84a:223:6cff:fe80:35dc, relay=[IPv6:2001:470:b:84a:223:6cff:fe80:35dc], reject=553 5.3.0 RELAY # Net:office
Test session from telnet:
syzdek@blackenhawk$ telnet -6 freshsalmon.office.example.com 25
Trying 2001:470:b:84a::69...
Connected to freshsalmon.office.bindlebinaries.com.
Escape character is '^]'.
220 office.example.com ESMTP Sendmail 8.14.4/8.14.4; Thu, 31 May 2012 11:57:15 -0800
HELO blackenhawk.office.example.com
250 office.example.com Hello [IPv6:2001:470:b:84a:223:6cff:fe80:35dc], pleased to meet you
MAIL FROM:[email protected]
553 5.3.0 RELAY # Net:office
What is the correct way to add an IPv6 address/network to the access file in sendmail?
Update: Apparently my access file was not working regardless. Removing the comments at the end of the line seems to have fixed the problem. Here is the lines which worked:
Connect:127 OK
Connect:IPv6:::1 OK
# Net: office
Connect:10.0.1 RELAY
Connect:IPv6:2001:470:b:84a RELAY
# Host: glider
Connect:50.116.6.8 RELAY
Connect:IPv6:2600:3c01::f03c:91ff:fedf:381a RELAY
# Host: kite
Connect:96.126.127.87 RELAY
Connect:IPv6:2600:3c00::f03c:91ff:fedf:52a4 RELAY