I did some more investigation, and did not find an explanation, but I am
writing it here to maybe save somebody else some effort.

Postfix uses normal(?) `getservbyname(service, protocol)` in the file
src/smtp/smtp_connect.c line 363:

        if ((sp = getservbyname(service, protocol)) == 0)
            msg_fatal("unknown service: %s/%s", service, protocol);

and I see this message in the log.

On the other hand, a simple program that performs
`chroot("/var/spool/postfix")` and calls `getservbyname()` _works
correctly_ on hirsute (C code in attachment):

crosser@pccross:~/src$ sudo ./getsrvname 
[sudo] password for crosser: 
s_name="smtp", s_port=25, s_proto="tcp"

Note though that in such form the the program does not try to use NSS,
it just opens `/etc/services` directly. While postfix's `smtp` goes
through nsswitch, as can be seen in the strace log from my previous
attachment.

** Attachment added: "getsrvname.c"
   
https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1916541/+attachment/5466343/+files/getsrvname.c

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1916541

Title:
  smtp "fatal: unknown service: smtp/tcp", probably after libc upgrade

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1916541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to