• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Unable to add an RFC-compatible SRV-record

mr-wolf

Silver Pleskian
Plesk Guru
According to https://tools.ietf.org/html/rfc6186

I should be able to create an SRV-record containing
Code:
_pop3._tcp     SRV  0 0 0   .

I can't do this using the CLI and not using the web-interface.
The target can't be empty and only ports from 1-65535 are valid (when in fact 0 is valid too)

I would like to create this record to discourage the use of POP3

Code:
/usr/local/psa/bin/dns --add ${DOMAIN} -srv "" -srv-priority 0 -srv-weight 0 -srv-port 0 -srv-protocol tcp -srv-service pop3 -srv-target-host ""
/usr/local/psa/bin/dns --add ${DOMAIN} -srv "" -srv-priority 0 -srv-weight 0 -srv-port 0 -srv-protocol tcp -srv-service pop3s -srv-target-host ""
/usr/local/psa/bin/dns --add ${DOMAIN} -srv "" -srv-priority 0 -srv-weight 0 -srv-port 0 -srv-protocol tcp -srv-service imap -srv-target-host ""

When SRV-records were introduced in Plesk they had a limitation that Protocol could only be TCP or UDP.
It took a long time before this was changed (4 years). I hope we don't have to wait for it that long this time.
 
What is your Plesk version?
Yes, target host can't be empty, but I successfully set port to 0 on Plesk 12.5 and Onyx with command like:

/usr/local/psa/bin/dns --add domain.com -srv "" -srv-priority 0 -srv-weight 0 -srv-port 0 -srv-protocol tcp -srv-service pop3 -srv-target-host 0.0.0.0
 
What is your Plesk version?
Yes, target host can't be empty, but I successfully set port to 0 on Plesk 12.5 and Onyx with command like:

/usr/local/psa/bin/dns --add domain.com -srv "" -srv-priority 0 -srv-weight 0 -srv-port 0 -srv-protocol tcp -srv-service pop3 -srv-target-host 0.0.0.0
Plesk 12.5

Thanks for giving me that workaround.

However,

According to the RFC the target host can be empty (well, not really empty as it will contain a dot). This parameter can't be given to the Plesk DNS command. Furthermore, I can't add a port 0 using the webinterface, but you're correct in that it works for the CLI.

I would really like both changed !!
It would enable me to follow RFC https://tools.ietf.org/html/rfc6186 and create records as suggested there:

This example is given in that RFC
Code:
_imap._tcp     SRV  0 0 0   .
_imaps._tcp    SRV  0 1 993 imap.example.com.
_pop3._tcp     SRV  0 0 0   .
_pop3s._tcp    SRV 10 1 995 pop3.example.com.

Code:
/usr/local/psa/bin/dns --add ${DOMAIN} -srv "" -srv-priority 0 -srv-weight 0 -srv-port 0 -srv-protocol tcp -srv-service pop3 -srv-target-host "0.0.0.0"
SUCCESS: Creation of DNS record in Domain 'xxx' complete.

/usr/local/psa/bin/dns --add ${DOMAIN} -srv "" -srv-priority 0 -srv-weight 0 -srv-port 0 -srv-protocol tcp -srv-service pop3 -srv-target-host "."
Incorrect DNS Record parameter values were specified

I just manually edited a zone-file in /var/named/run-root/var and replaced the "0.0.0.0." with a "." and bind had no problem with it.
I could use sed to change that, but I'd rather have it properly implemented in Plesk.

Code:
host -tSRV _pop3._tcp.${DOMAIN} localhost
Using domain server:
Name: localhost
Address: 127.0.0.1#53
Aliases:

_pop3._tcp.xxxx.xxx has SRV record 0 0 0 0.0.0.0.
sed -i 's/0 0 0 0\.0\.0\.0\.$/0 0 0 ./' /var/named/run-root/var/*.*
killall -HUP named
host -tSRV _pop3._tcp.${DOMAIN} localhost
Using domain server:
Name: localhost
Address: 127.0.0.1#53
Aliases:

_pop3._tcp.xxxx.xxx has SRV record 0 0 0 .
 
Last edited:
I made it a bit safer by only using sed on zone-files containing '0 0 0 0.0.0.0'
This way also date of the other zonefiles stay untouched.


Code:
  HEADLESS=
  tty >/dev/null || HEADLESS=true

  NAMED_FOLDER=/var/named/run-root/var/
  cd ${NAMED_FOLDER}
  MUTATION=                 # Maybe only records were deleted
  for FILE in *.* ; do
    if egrep -q '(pop|imap).*SRV.*0 0 0 0\.0\.0\.0\.$' "${FILE}" ; then
      MUTATION=true
      sed -i 's/0 0 0 0\.0\.0\.0\.$/0 0 0 ./' "${FILE}"
    fi
  done
  if [ ${MUTATION} ] ; then
    [ ${HEADLESS} ] || echo "Reconfiguring nameserver" >&2
    killall -HUP named
  fi
 
Last edited:
Back
Top