Bug 42164 - courier MTA pkg_config extracts domainname from hostname
Bug#: 42164 Product:  Gentoo Linux Version: 1.4 Platform: All
OS/Version: Linux Status: RESOLVED Severity: minor Priority: P2
Resolution: FIXED Assigned To: iggy@gentoo.org Reported By: sn.ml@keijukammari.fi
Component: Server
URL: 
Summary: courier MTA pkg_config extracts domainname from hostname
Keywords:  
Status Whiteboard: 
Opened: 2004-02-19 11:09 0000
Description:   Opened: 2004-02-19 11:09 0000
The default config made by ebuild ... config for courier extracts the
configuration domain from hostname instead of using the real domainname.

Diff that first takes the domainname from the command domainname and if this
returns "(none)" tries to extract the domainname from the hostname

======================================================= diff -uN
--- old/courier-0.44.2.ebuild   2004-02-09 03:32:44.000000000 +0200
+++ new/courier-0.44.2.ebuild   2004-02-19 20:58:04.742233944 +0200
@@ -307,9 +307,12 @@
        mailhost=`hostname`
        export mailhost

-       domainname=`echo ${mailhost} | sed -e "s/[^\.]*\.\(.*\)/\1/"`
+       domainname=`domainname`
        export domainname

+       if [ "x$domainname" = "x(none)" ] ; then
+               domainname=`echo ${mailhost} | sed -e "s/[^\.]*\.\(.*\)/\1/"`
+       fi

        if [ ${ROOT} = "/" ] ; then
                file=${ROOT}/etc/courier/locals
============================================================ END of diff

------- Comment #1 From Brian Jackson (RETIRED) 2004-03-09 21:00:19 0000 -------
this is in cvs, thanks for the fix