Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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:syzdek@example.com
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
share|improve this question

2 Answers 2

up vote 1 down vote accepted

2001:470:b:84a isn't a valid IPv6 address by itself. At a minimum it would need to be 2001:470:b:84a:: to indicate trailing zeroes - or the complete address that sendmail is indicating in the logs (2001:470:b:84a:223:6cff:fe80:35dc).

Once you have the address the first format you tried (IPV6:...) should work.

share|improve this answer
    
But I am trying to add an IPv6 network, not just a single host. What is the correct syntax for a network? As an example, I can use "10.0.1" to add the network 10.0.1.0/24. –  David M. Syzdek May 31 '12 at 21:20
    
I see what you mean. It may seem odd, but try fully expanding the /64 - so try IPv6:2001:0470:000b:084a (without brackets). –  rnxrx May 31 '12 at 21:39
    
Okay, small confession. Apparently the comments at the end of the access statements are not valid. I've update my post to reflect the change. –  David M. Syzdek Jun 1 '12 at 20:57

According to the examples from the configuration README, you should remove the brackets

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.