Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 42164 - courier MTA pkg_config extracts domainname from hostname
Summary: courier MTA pkg_config extracts domainname from hostname
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Brian Jackson (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-19 11:09 UTC by Sami Näätänen
Modified: 2004-03-09 21:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sami Näätänen 2004-02-19 11:09:15 UTC
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 Brian Jackson (RETIRED) gentoo-dev 2004-03-09 21:00:19 UTC
this is in cvs, thanks for the fix