>Description: I had some difficulties to send a bug report by mysqlbug. It inserted my UNIX user name as From: and used some default mail agent, which used my UNIX username @ local domain as the sender address. While the first is merely uncomfortable, the latter inhibited the mail from being delivered.
I improved mysqlbug so that it respects two environment variables, if present (see the diffs below): REAL_EMAIL - From: address. This is used by bitkeeper too. MAIL_AGENT - Program to use for sending mail (I have one that uses the From: address as sender). >How-To-Repeat: >Fix: Here my changes (output of bk -r diffs -c): ===== scripts/mysqlbug.sh 1.6 vs edited ===== *** /tmp/mysqlbug.sh-1.6-1881 Fri Dec 20 13:58:17 2002 --- edited/scripts/mysqlbug.sh Tue Jan 6 18:07:16 2004 *************** *** 44,57 **** # How to read the passwd database. PASSWD="cat /etc/passwd" ! if test -f /usr/lib/sendmail then ! MAIL_AGENT="/usr/lib/sendmail -oi -t" ! elif test -f /usr/sbin/sendmail ! then ! MAIL_AGENT="/usr/sbin/sendmail -oi -t" ! else ! MAIL_AGENT="rmail $BUGmysql" fi # Figure out how to echo a string without a trailing newline --- 44,60 ---- # How to read the passwd database. PASSWD="cat /etc/passwd" ! if test "x$MAIL_AGENT" = "x" then ! if test -f /usr/lib/sendmail ! then ! MAIL_AGENT="/usr/lib/sendmail -oi -t" ! elif test -f /usr/sbin/sendmail ! then ! MAIL_AGENT="/usr/sbin/sendmail -oi -t" ! else ! MAIL_AGENT="rmail $BUGmysql" ! fi fi # Figure out how to echo a string without a trailing newline *************** *** 208,214 **** SEND-PR: Lines starting with \`SEND-PR' will be removed automatically, as SEND-PR: will all comments (text enclosed in \`<' and \`>'). SEND-PR: ! From: ${USER} To: ${BUGADDR} Subject: $SUBJECT_C --- 211,217 ---- SEND-PR: Lines starting with \`SEND-PR' will be removed automatically, as SEND-PR: will all comments (text enclosed in \`<' and \`>'). SEND-PR: ! From: ${REAL_EMAIL:-${USER}} To: ${BUGADDR} Subject: $SUBJECT_C >Submitter-Id: <submitter ID> >Originator: MySQL Development >Organization: private >MySQL support: none >Synopsis: Suggest improvement for mysqlbug >Severity: non-critical >Priority: medium >Category: mysql >Class: change-request >Release: mysql-5.0.0-alpha (Source distribution) >C compiler: gcc (GCC) 3.3.3 20031206 (prerelease) (Debian) >C++ compiler: gcc (GCC) 3.3.3 20031206 (prerelease) (Debian) >Environment: PC, Debian GNU/Linux (sid), Pentium 4 libc6 2.3.2.ds1-10 zlib1g 1.2.1-3 System: Linux chilla 2.6.0-test11 #1 Sun Jan 4 17:04:51 CET 2004 i686 GNU/Linux Architecture: i686 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.3/specs Konfiguriert mit: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux Thread model: posix gcc-Version 3.3.3 20031229 (prerelease) (Debian) Compilation info: CC='gcc' CFLAGS='-g -march=pentium4' CXX='gcc' CXXFLAGS='-g -march=pentium4 -felide-constructors -fno-exceptions -fno-rtti' LDFLAGS='' ASFLAGS='' LIBC: lrwxrwxrwx 1 root root 13 2003-11-15 12:44 /lib/libc.so.6 -> libc-2.3.2.so -rw-r--r-- 1 root root 1243076 2003-11-05 20:17 /lib/libc-2.3.2.so -rw-r--r-- 1 root root 2537670 2003-11-05 20:18 /usr/lib/libc.a -rw-r--r-- 1 root root 204 2003-11-05 20:07 /usr/lib/libc.so Configure command: ./configure '--prefix=/usr/local/mysql' '--with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock' '--with-debug' 'CFLAGS=-g -march=pentium4' 'CXXFLAGS=-g -march=pentium4 -felide-constructors -fno-exceptions -fno-rtti' 'CXX=gcc' -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]