[Mailman-Developers] beta & smtp
Barry A. Warsaw
bwarsaw@cnri.reston.va.us
Tue, 21 Mar 2000 18:55:32 -0500 (EST)
>>>>> "RK" == Ricardo Kustner <ricardo@rixhq.nu> writes:
RK> well i fixed it... it turned out that the default SMTPHOST was
RK> set to 'miss-janet.com' in Defaults.py ... I changed this to
RK> 'localhost' (in mm_cfg.py) and now it works again... I wonder
RK> why it was set to miss-janet.com though... (I'm not sure if it
RK> was there already or was changed during the upgrade)
This was likely a result of the upgrade. I set SMTPHOST to the fqdn
of the host that you're on. However, if your machine's primary alias
was www.miss-janet.com, the SMTPHOST got the "www." stripped off.
I'll bet that's what we're seeing here.
There's a different configure variable that SMTPHOST should have
gotten set to, called `URL'. These two conf variables are really
mis-named because URL, in your case, would be www.miss-janet.com.
The reason these are different is because in the first case, I'm
trying to guess your domain for email purposes
(e.g. ricardo@miss-janet.com), but in the second I'm trying to guess
the host part of your url (e.g. www.miss-janet.com). For a machine
named www.whatever, these will differ, but for a staging machine, it's
probably called something like mydevhost.miss-janet.com. In that
case, I want both the email part and the url part to be the entire
host name.
Yes this is all crufty and broken, and probably only useful for a
small number of installations that use staging servers. I think I
have a not-so-drastic fix though that I'd like you to try. See the
patch below.
BTW, I remember having some problems when using Postfix and just
setting SMTPHOST to 'localhost', but I can't remember the details
right now.
RK> It seems like the choice of delivery method has been
RK> implemented as was discussed earlier on this list... where can
RK> i find some more info anywhere on what the choices are?
There's currently only two, as described in Mailman/Defaults.py.
Search for the variable DELIVERY_MODULE; there's an explanation and
the alternative value in a comment. Let me know if this needs more
explaining or documenting.
-Barry
-------------------- snip snip --------------------
Index: Defaults.py.in
===================================================================
RCS file: /projects/cvsroot/mailman/Mailman/Defaults.py.in,v
retrieving revision 1.97
diff -c -r1.97 Defaults.py.in
*** Defaults.py.in 2000/03/21 06:24:58 1.97
--- Defaults.py.in 2000/03/21 23:16:09
***************
*** 115,121 ****
SENDMAIL_CMD = '/usr/lib/sendmail'
# SMTP host and port, when DELIVERY_MODULE is 'SMTPDirect'
! SMTPHOST = '@FQDN@'
SMTPPORT = 0 # default from smtplib
# 1 to use crypt for passwords instead of md5.
--- 115,121 ----
SENDMAIL_CMD = '/usr/lib/sendmail'
# SMTP host and port, when DELIVERY_MODULE is 'SMTPDirect'
! SMTPHOST = '@URL@'
SMTPPORT = 0 # default from smtplib
# 1 to use crypt for passwords instead of md5.
Index: configure.in
===================================================================
RCS file: /projects/cvsroot/mailman/configure.in,v
retrieving revision 1.43
diff -c -r1.43 configure.in
*** configure.in 2000/03/21 06:24:52 1.43
--- configure.in 2000/03/21 23:41:45
***************
*** 331,336 ****
--- 331,338 ----
www = h
elif not fqdn:
fqdn = h
+ if www and fqdn:
+ break
fp = open('conftest.out', 'w')
if not www and fqdn:
fp.write('%s\n%s\n' % (fqdn, fqdn))
Index: configure
===================================================================
RCS file: /projects/cvsroot/mailman/configure,v
retrieving revision 1.41
diff -c -r1.41 configure
*** configure 2000/03/21 06:24:52 1.41
--- configure 2000/03/21 23:41:52
***************
*** 1,6 ****
#! /bin/sh
! # From configure.in Revision: 1.42
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13
--- 1,6 ----
#! /bin/sh
! # From configure.in Revision: 1.43
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.13
***************
*** 1366,1371 ****
--- 1366,1373 ----
www = h
elif not fqdn:
fqdn = h
+ if www and fqdn:
+ break
fp = open('conftest.out', 'w')
if not www and fqdn:
fp.write('%s\n%s\n' % (fqdn, fqdn))
***************
*** 1379,1392 ****
$PYTHON conftest.py
echo $ac_n "checking for default fully qualified host name""... $ac_c" 1>&6
! echo "configure:1383: checking for default fully qualified host name" >&5
if test -z "$FQDN"
then
FQDN=`head -1 conftest.out`
fi
echo "$ac_t""$FQDN" 1>&6
echo $ac_n "checking for default URL host component""... $ac_c" 1>&6
! echo "configure:1390: checking for default URL host component" >&5
if test -z "$URL"
then
URL=`tail -1 conftest.out`
--- 1381,1394 ----
$PYTHON conftest.py
echo $ac_n "checking for default fully qualified host name""... $ac_c" 1>&6
! echo "configure:1385: checking for default fully qualified host name" >&5
if test -z "$FQDN"
then
FQDN=`head -1 conftest.out`
fi
echo "$ac_t""$FQDN" 1>&6
echo $ac_n "checking for default URL host component""... $ac_c" 1>&6
! echo "configure:1392: checking for default URL host component" >&5
if test -z "$URL"
then
URL=`tail -1 conftest.out`
***************
*** 1398,1409 ****
for ac_func in strerror setregid syslog
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1402: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 1407 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
--- 1400,1411 ----
for ac_func in strerror setregid syslog
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1404: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 1409 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
***************
*** 1426,1432 ****
; return 0; }
EOF
! if { (eval echo configure:1430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
--- 1428,1434 ----
; return 0; }
EOF
! if { (eval echo configure:1432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
***************
*** 1457,1473 ****
# with the appropriate include.
for lib in bsd socket inet; do
echo $ac_n "checking for syslog in -l$lib""... $ac_c" 1>&6
! echo "configure:1461: checking for syslog in -l$lib" >&5
Mailman_LIBS_save="$LIBS"; LIBS="$LIBS -l$lib"
cat > conftest.$ac_ext <<EOF
! #line 1464 "configure"
#include "confdefs.h"
#include <syslog.h>
int main() {
syslog(LOG_DEBUG, "Just a test...");
; return 0; }
EOF
! if { (eval echo configure:1471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
--- 1459,1475 ----
# with the appropriate include.
for lib in bsd socket inet; do
echo $ac_n "checking for syslog in -l$lib""... $ac_c" 1>&6
! echo "configure:1463: checking for syslog in -l$lib" >&5
Mailman_LIBS_save="$LIBS"; LIBS="$LIBS -l$lib"
cat > conftest.$ac_ext <<EOF
! #line 1466 "configure"
#include "confdefs.h"
#include <syslog.h>
int main() {
syslog(LOG_DEBUG, "Just a test...");
; return 0; }
EOF
! if { (eval echo configure:1473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
***************
*** 1489,1495 ****
# Checks for header files.
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
! echo "configure:1493: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
--- 1491,1497 ----
# Checks for header files.
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
! echo "configure:1495: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
***************
*** 1504,1516 ****
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
! #line 1508 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
--- 1506,1518 ----
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
! #line 1510 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
***************
*** 1521,1533 ****
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
! #line 1525 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
--- 1523,1535 ----
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
! #line 1527 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
***************
*** 1538,1550 ****
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
! #line 1542 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
--- 1540,1552 ----
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
! #line 1544 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
***************
*** 1569,1580 ****
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
! echo "configure:1573: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 1578 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
--- 1571,1582 ----
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
! echo "configure:1575: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 1580 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
***************
*** 1582,1588 ****
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
--- 1584,1590 ----
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
***************
*** 1599,1605 ****
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
! #line 1603 "configure"
#include "confdefs.h"
#include <string.h>
EOF
--- 1601,1607 ----
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
! #line 1605 "configure"
#include "confdefs.h"
#include <string.h>
EOF
***************
*** 1617,1623 ****
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
! #line 1621 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
--- 1619,1625 ----
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
! #line 1623 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
***************
*** 1638,1644 ****
:
else
cat > conftest.$ac_ext <<EOF
! #line 1642 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
--- 1640,1646 ----
:
else
cat > conftest.$ac_ext <<EOF
! #line 1644 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
***************
*** 1649,1655 ****
exit (0); }
EOF
! if { (eval echo configure:1653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
--- 1651,1657 ----
exit (0); }
EOF
! if { (eval echo configure:1655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
***************
*** 1676,1692 ****
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1680: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 1685 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
--- 1678,1694 ----
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:1682: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 1687 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:1692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
***************
*** 1715,1726 ****
# Checks for typedefs, structures, and compiler characteristics.
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
! echo "configure:1719: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 1724 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
--- 1717,1728 ----
# Checks for typedefs, structures, and compiler characteristics.
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
! echo "configure:1721: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 1726 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
***************
*** 1749,1755 ****
fi
echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
! echo "configure:1753: checking type of array argument to getgroups" >&5
if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 1751,1757 ----
fi
echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
! echo "configure:1755: checking type of array argument to getgroups" >&5
if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
***************
*** 1757,1763 ****
ac_cv_type_getgroups=cross
else
cat > conftest.$ac_ext <<EOF
! #line 1761 "configure"
#include "confdefs.h"
/* Thanks to Mike Rendell for this test. */
--- 1759,1765 ----
ac_cv_type_getgroups=cross
else
cat > conftest.$ac_ext <<EOF
! #line 1763 "configure"
#include "confdefs.h"
/* Thanks to Mike Rendell for this test. */
***************
*** 1782,1788 ****
}
EOF
! if { (eval echo configure:1786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_type_getgroups=gid_t
else
--- 1784,1790 ----
}
EOF
! if { (eval echo configure:1788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_type_getgroups=gid_t
else
***************
*** 1796,1802 ****
if test $ac_cv_type_getgroups = cross; then
cat > conftest.$ac_ext <<EOF
! #line 1800 "configure"
#include "confdefs.h"
#include <unistd.h>
EOF
--- 1798,1804 ----
if test $ac_cv_type_getgroups = cross; then
cat > conftest.$ac_ext <<EOF
! #line 1802 "configure"
#include "confdefs.h"
#include <unistd.h>
EOF
***************
*** 1824,1835 ****
for ac_func in vsnprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1828: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 1833 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
--- 1826,1837 ----
for ac_func in vsnprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:1830: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 1835 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
***************
*** 1852,1858 ****
; return 0; }
EOF
! if { (eval echo configure:1856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
--- 1854,1860 ----
; return 0; }
EOF
! if { (eval echo configure:1858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else