2008-11-10 15:25:24 +08:00
|
|
|
AS_INIT[]m4_divert_push([HEADER-COPYRIGHT])dnl
|
2004-10-09 05:56:10 +08:00
|
|
|
# @configure_input@
|
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
# mailnotify (GNU @PACKAGE@) version 1.0
|
2004-02-11 03:47:00 +08:00
|
|
|
# Written by Gary V. Vaughan <gary@gnu.org>
|
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
# Copyright (C) 2004, 2006, 2010 Free Software Foundation, Inc.
|
2004-02-11 03:47:00 +08:00
|
|
|
# This is free software; see the source for copying conditions. There is NO
|
|
|
|
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
* HACKING (Licensing Rules): Explain the various license texts
used for files distributed with Libtool, and update license text
to match.
* Makefile.am, Makefile.maint README, README.alpha, THANKS, TODO,
bootstrap, clcommit.m4sh, configure.ac, libltdl/Makefile.inc,
libltdl/README, libltdl/argz.c, libltdl/argz_.h,
libltdl/config/general.m4sh, libltdl/config/getopt.m4sh,
libltdl/config/ltmain.m4sh, libltdl/config/mailnotify.m4sh,
libltdl/config/mkstamp, libltdl/configure.ac,
libltdl/libltdl/lt__alloc.h, libltdl/libltdl/lt__dirent.h,
libltdl/libltdl/lt__glibc.h, libltdl/libltdl/lt__private.h,
libltdl/libltdl/lt__strl.h, libltdl/libltdl/lt_dlloader.h,
libltdl/libltdl/lt_error.h, libltdl/libltdl/lt_system.h,
libltdl/libltdl/slist.h, libltdl/loaders/dld_link.c,
libltdl/loaders/dlopen.c, libltdl/loaders/dyld.c,
libltdl/loaders/load_add_on.c, libltdl/loaders/loadlibrary.c,
libltdl/loaders/preopen.c, libltdl/loaders/shl_load.c,
libltdl/lt__alloc.c, libltdl/lt__dirent.c, libltdl/lt__strl.c,
libltdl/lt_dlloader.c, libltdl/lt_error.c, libltdl/ltdl.c,
libltdl/ltdl.h, libltdl/m4/argz.m4, libltdl/m4/libtool.m4,
libltdl/m4/ltdl.m4, libltdl/m4/ltoptions.m4,
libltdl/m4/ltsugar.m4, libltdl/m4/ltversion.in,
Jlibltdl/m4/ltversion.m4, libltdl/m4/lt~obsolete.m4,
libltdl/slist.c, libtoolize.m4sh, tests/am-subdir.at,
tests/cdemo-conf.test, tests/cdemo-exec.test,
tests/cdemo-make.test, tests/cdemo-shared.test,
tests/cdemo-static.test, tests/cdemo-undef.test,
tests/cdemo/Makefile.am, tests/cdemo/configure.ac,
tests/cdemo/foo.c, tests/cdemo/foo.h, tests/cdemo/main.c,
tests/cmdline_wrap.at, tests/convenience.at, tests/defs.m4sh,
tests/demo-conf.test, tests/demo-deplibs.test,
tests/demo-exec.test, tests/demo-hardcode.test,
tests/demo-inst.test, tests/demo-make.test,
tests/demo-nofast.test, tests/demo-noinst-link.test,
tests/demo-nopic.test, tests/demo-pic.test,
tests/demo-relink.test, tests/demo-shared.test,
tests/demo-static.test, tests/demo-unst.test,
tests/demo/Makefile.am, tests/demo/configure.ac,
tests/demo/dlmain.c, tests/demo/foo.c,
tests/demo/foo.h, tests/demo/hell1.c, tests/demo/hell2.c,
tests/demo/hello.c, tests/demo/main.c,
tests/depdemo-conf.test, tests/depdemo-exec.test,
tests/depdemo-inst.test, tests/depdemo-make.test,
tests/depdemo-nofast.test, tests/depdemo-relink.test,
tests/depdemo-shared.test, tests/depdemo-static.test,
tests/depdemo-unst.test, tests/depdemo/Makefile.am,
tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am,
tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h,
tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c,
tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am,
tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h,
tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c,
tests/depdemo/l4/l4.h, tests/depdemo/main.c,
tests/depdemo/sysdep.h, tests/deplibs-ident.at,
tests/destdir.at, tests/duplicate_conv.at,
tests/duplicate_deps.at, tests/duplicate_members.at,
tests/early-libtool.at, tests/export.at,
tests/f77demo-conf.test, tests/f77demo-exec.test,
tests/f77demo-make.test, tests/f77demo-shared.test,
tests/f77demo-static.test, tests/f77demo/Makefile.am,
tests/f77demo/configure.ac, tests/f77demo/cprogram.c,
tests/f77demo/foo.h, tests/f77demo/fooc.c,
tests/fail.at, tests/fcdemo-conf.test, tests/fcdemo-exec.test,
tests/fcdemo-make.test, tests/fcdemo-shared.test,
tests/fcdemo-static.test, tests/fcdemo/Makefile.am,
tests/fcdemo/configure.ac, tests/fcdemo/cprogram.c,
tests/fcdemo/foo.h, tests/fcdemo/fooc.c,
tests/inherited_flags.at, tests/libtoolize.at,
tests/link-2.test, tests/link-order.at, tests/link-order2.at,
tests/link.test, tests/lt_dlexit.at, tests/mdemo-conf.test,
tests/mdemo-dryrun.test, tests/mdemo-exec.test,
tests/mdemo-inst.test, tests/mdemo-make.test,
tests/mdemo-shared.test, tests/mdemo-static.test,
tests/mdemo-unst.test, tests/mdemo/Makefile.am,
tests/mdemo/configure.ac, tests/mdemo/foo.h, tests/mdemo/foo1.c,
tests/mdemo/foo2.c, tests/mdemo/main.c, tests/mdemo/mlib.c,
tests/mdemo/sub.c, tests/mdemo2-conf.test,
tests/mdemo2-exec.test, tests/mdemo2-make.test,
tests/mdemo2/Makefile.am, tests/mdemo2/configure.ac,
tests/mdemo2/main.c, tests/nomode.test, tests/nonrecursive.at,
tests/objectlist.test, tests/old-m4-iface.at,
tests/pdemo-conf.test, tests/pdemo-exec.test,
tests/pdemo-inst.test, tests/pdemo-make.test,
tests/pdemo/Makefile.am, tests/pdemo/configure.ac,
tests/pdemo/foo.h, tests/pdemo/longer_file_name_dlmain.c,
tests/pdemo/longer_file_name_foo.c,
tests/pdemo/longer_file_name_foo2.c,
tests/pdemo/longer_file_name_hell1.c,
tests/pdemo/longer_file_name_hell2.c,
tests/pdemo/longer_file_name_hello.c,
tests/pdemo/longer_file_name_main.c, tests/quote.test,
tests/recursive.at, tests/search-path.at, tests/sh.test,
tests/shlibpath.at, tests/standalone.at, tests/static.at,
tests/stresstest.at, tests/subproject.at, tests/suffix.test,
tests/tagdemo-conf.test, tests/tagdemo-exec.test,
tests/tagdemo-make.test, tests/tagdemo-shared.test,
tests/tagdemo-static.test, tests/tagdemo-undef.test,
tests/tagdemo/Makefile.am, tests/tagdemo/baz.cpp,
tests/tagdemo/baz.h, tests/tagdemo/configure.ac,
tests/tagdemo/conv.cpp, tests/tagdemo/conv.h,
tests/tagdemo/foo.cpp, tests/tagdemo/foo.h,
tests/tagdemo/main.cpp, tests/tagtrace.test,
tests/template.at, tests/testsuite.at: Apply correct license
text according to the new rules set out in HACKING.
2007-03-25 20:12:44 +08:00
|
|
|
# Mailnotify is free software; you can redistribute it and/or modify
|
2004-02-11 03:47:00 +08:00
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
* HACKING (Licensing Rules): Explain the various license texts
used for files distributed with Libtool, and update license text
to match.
* Makefile.am, Makefile.maint README, README.alpha, THANKS, TODO,
bootstrap, clcommit.m4sh, configure.ac, libltdl/Makefile.inc,
libltdl/README, libltdl/argz.c, libltdl/argz_.h,
libltdl/config/general.m4sh, libltdl/config/getopt.m4sh,
libltdl/config/ltmain.m4sh, libltdl/config/mailnotify.m4sh,
libltdl/config/mkstamp, libltdl/configure.ac,
libltdl/libltdl/lt__alloc.h, libltdl/libltdl/lt__dirent.h,
libltdl/libltdl/lt__glibc.h, libltdl/libltdl/lt__private.h,
libltdl/libltdl/lt__strl.h, libltdl/libltdl/lt_dlloader.h,
libltdl/libltdl/lt_error.h, libltdl/libltdl/lt_system.h,
libltdl/libltdl/slist.h, libltdl/loaders/dld_link.c,
libltdl/loaders/dlopen.c, libltdl/loaders/dyld.c,
libltdl/loaders/load_add_on.c, libltdl/loaders/loadlibrary.c,
libltdl/loaders/preopen.c, libltdl/loaders/shl_load.c,
libltdl/lt__alloc.c, libltdl/lt__dirent.c, libltdl/lt__strl.c,
libltdl/lt_dlloader.c, libltdl/lt_error.c, libltdl/ltdl.c,
libltdl/ltdl.h, libltdl/m4/argz.m4, libltdl/m4/libtool.m4,
libltdl/m4/ltdl.m4, libltdl/m4/ltoptions.m4,
libltdl/m4/ltsugar.m4, libltdl/m4/ltversion.in,
Jlibltdl/m4/ltversion.m4, libltdl/m4/lt~obsolete.m4,
libltdl/slist.c, libtoolize.m4sh, tests/am-subdir.at,
tests/cdemo-conf.test, tests/cdemo-exec.test,
tests/cdemo-make.test, tests/cdemo-shared.test,
tests/cdemo-static.test, tests/cdemo-undef.test,
tests/cdemo/Makefile.am, tests/cdemo/configure.ac,
tests/cdemo/foo.c, tests/cdemo/foo.h, tests/cdemo/main.c,
tests/cmdline_wrap.at, tests/convenience.at, tests/defs.m4sh,
tests/demo-conf.test, tests/demo-deplibs.test,
tests/demo-exec.test, tests/demo-hardcode.test,
tests/demo-inst.test, tests/demo-make.test,
tests/demo-nofast.test, tests/demo-noinst-link.test,
tests/demo-nopic.test, tests/demo-pic.test,
tests/demo-relink.test, tests/demo-shared.test,
tests/demo-static.test, tests/demo-unst.test,
tests/demo/Makefile.am, tests/demo/configure.ac,
tests/demo/dlmain.c, tests/demo/foo.c,
tests/demo/foo.h, tests/demo/hell1.c, tests/demo/hell2.c,
tests/demo/hello.c, tests/demo/main.c,
tests/depdemo-conf.test, tests/depdemo-exec.test,
tests/depdemo-inst.test, tests/depdemo-make.test,
tests/depdemo-nofast.test, tests/depdemo-relink.test,
tests/depdemo-shared.test, tests/depdemo-static.test,
tests/depdemo-unst.test, tests/depdemo/Makefile.am,
tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am,
tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h,
tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c,
tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am,
tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h,
tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c,
tests/depdemo/l4/l4.h, tests/depdemo/main.c,
tests/depdemo/sysdep.h, tests/deplibs-ident.at,
tests/destdir.at, tests/duplicate_conv.at,
tests/duplicate_deps.at, tests/duplicate_members.at,
tests/early-libtool.at, tests/export.at,
tests/f77demo-conf.test, tests/f77demo-exec.test,
tests/f77demo-make.test, tests/f77demo-shared.test,
tests/f77demo-static.test, tests/f77demo/Makefile.am,
tests/f77demo/configure.ac, tests/f77demo/cprogram.c,
tests/f77demo/foo.h, tests/f77demo/fooc.c,
tests/fail.at, tests/fcdemo-conf.test, tests/fcdemo-exec.test,
tests/fcdemo-make.test, tests/fcdemo-shared.test,
tests/fcdemo-static.test, tests/fcdemo/Makefile.am,
tests/fcdemo/configure.ac, tests/fcdemo/cprogram.c,
tests/fcdemo/foo.h, tests/fcdemo/fooc.c,
tests/inherited_flags.at, tests/libtoolize.at,
tests/link-2.test, tests/link-order.at, tests/link-order2.at,
tests/link.test, tests/lt_dlexit.at, tests/mdemo-conf.test,
tests/mdemo-dryrun.test, tests/mdemo-exec.test,
tests/mdemo-inst.test, tests/mdemo-make.test,
tests/mdemo-shared.test, tests/mdemo-static.test,
tests/mdemo-unst.test, tests/mdemo/Makefile.am,
tests/mdemo/configure.ac, tests/mdemo/foo.h, tests/mdemo/foo1.c,
tests/mdemo/foo2.c, tests/mdemo/main.c, tests/mdemo/mlib.c,
tests/mdemo/sub.c, tests/mdemo2-conf.test,
tests/mdemo2-exec.test, tests/mdemo2-make.test,
tests/mdemo2/Makefile.am, tests/mdemo2/configure.ac,
tests/mdemo2/main.c, tests/nomode.test, tests/nonrecursive.at,
tests/objectlist.test, tests/old-m4-iface.at,
tests/pdemo-conf.test, tests/pdemo-exec.test,
tests/pdemo-inst.test, tests/pdemo-make.test,
tests/pdemo/Makefile.am, tests/pdemo/configure.ac,
tests/pdemo/foo.h, tests/pdemo/longer_file_name_dlmain.c,
tests/pdemo/longer_file_name_foo.c,
tests/pdemo/longer_file_name_foo2.c,
tests/pdemo/longer_file_name_hell1.c,
tests/pdemo/longer_file_name_hell2.c,
tests/pdemo/longer_file_name_hello.c,
tests/pdemo/longer_file_name_main.c, tests/quote.test,
tests/recursive.at, tests/search-path.at, tests/sh.test,
tests/shlibpath.at, tests/standalone.at, tests/static.at,
tests/stresstest.at, tests/subproject.at, tests/suffix.test,
tests/tagdemo-conf.test, tests/tagdemo-exec.test,
tests/tagdemo-make.test, tests/tagdemo-shared.test,
tests/tagdemo-static.test, tests/tagdemo-undef.test,
tests/tagdemo/Makefile.am, tests/tagdemo/baz.cpp,
tests/tagdemo/baz.h, tests/tagdemo/configure.ac,
tests/tagdemo/conv.cpp, tests/tagdemo/conv.h,
tests/tagdemo/foo.cpp, tests/tagdemo/foo.h,
tests/tagdemo/main.cpp, tests/tagtrace.test,
tests/template.at, tests/testsuite.at: Apply correct license
text according to the new rules set out in HACKING.
2007-03-25 20:12:44 +08:00
|
|
|
# Mailnotify is distributed in the hope that it will be useful, but
|
2004-02-11 03:47:00 +08:00
|
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
* HACKING (Licensing Rules): Explain the various license texts
used for files distributed with Libtool, and update license text
to match.
* Makefile.am, Makefile.maint README, README.alpha, THANKS, TODO,
bootstrap, clcommit.m4sh, configure.ac, libltdl/Makefile.inc,
libltdl/README, libltdl/argz.c, libltdl/argz_.h,
libltdl/config/general.m4sh, libltdl/config/getopt.m4sh,
libltdl/config/ltmain.m4sh, libltdl/config/mailnotify.m4sh,
libltdl/config/mkstamp, libltdl/configure.ac,
libltdl/libltdl/lt__alloc.h, libltdl/libltdl/lt__dirent.h,
libltdl/libltdl/lt__glibc.h, libltdl/libltdl/lt__private.h,
libltdl/libltdl/lt__strl.h, libltdl/libltdl/lt_dlloader.h,
libltdl/libltdl/lt_error.h, libltdl/libltdl/lt_system.h,
libltdl/libltdl/slist.h, libltdl/loaders/dld_link.c,
libltdl/loaders/dlopen.c, libltdl/loaders/dyld.c,
libltdl/loaders/load_add_on.c, libltdl/loaders/loadlibrary.c,
libltdl/loaders/preopen.c, libltdl/loaders/shl_load.c,
libltdl/lt__alloc.c, libltdl/lt__dirent.c, libltdl/lt__strl.c,
libltdl/lt_dlloader.c, libltdl/lt_error.c, libltdl/ltdl.c,
libltdl/ltdl.h, libltdl/m4/argz.m4, libltdl/m4/libtool.m4,
libltdl/m4/ltdl.m4, libltdl/m4/ltoptions.m4,
libltdl/m4/ltsugar.m4, libltdl/m4/ltversion.in,
Jlibltdl/m4/ltversion.m4, libltdl/m4/lt~obsolete.m4,
libltdl/slist.c, libtoolize.m4sh, tests/am-subdir.at,
tests/cdemo-conf.test, tests/cdemo-exec.test,
tests/cdemo-make.test, tests/cdemo-shared.test,
tests/cdemo-static.test, tests/cdemo-undef.test,
tests/cdemo/Makefile.am, tests/cdemo/configure.ac,
tests/cdemo/foo.c, tests/cdemo/foo.h, tests/cdemo/main.c,
tests/cmdline_wrap.at, tests/convenience.at, tests/defs.m4sh,
tests/demo-conf.test, tests/demo-deplibs.test,
tests/demo-exec.test, tests/demo-hardcode.test,
tests/demo-inst.test, tests/demo-make.test,
tests/demo-nofast.test, tests/demo-noinst-link.test,
tests/demo-nopic.test, tests/demo-pic.test,
tests/demo-relink.test, tests/demo-shared.test,
tests/demo-static.test, tests/demo-unst.test,
tests/demo/Makefile.am, tests/demo/configure.ac,
tests/demo/dlmain.c, tests/demo/foo.c,
tests/demo/foo.h, tests/demo/hell1.c, tests/demo/hell2.c,
tests/demo/hello.c, tests/demo/main.c,
tests/depdemo-conf.test, tests/depdemo-exec.test,
tests/depdemo-inst.test, tests/depdemo-make.test,
tests/depdemo-nofast.test, tests/depdemo-relink.test,
tests/depdemo-shared.test, tests/depdemo-static.test,
tests/depdemo-unst.test, tests/depdemo/Makefile.am,
tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am,
tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h,
tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c,
tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am,
tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h,
tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c,
tests/depdemo/l4/l4.h, tests/depdemo/main.c,
tests/depdemo/sysdep.h, tests/deplibs-ident.at,
tests/destdir.at, tests/duplicate_conv.at,
tests/duplicate_deps.at, tests/duplicate_members.at,
tests/early-libtool.at, tests/export.at,
tests/f77demo-conf.test, tests/f77demo-exec.test,
tests/f77demo-make.test, tests/f77demo-shared.test,
tests/f77demo-static.test, tests/f77demo/Makefile.am,
tests/f77demo/configure.ac, tests/f77demo/cprogram.c,
tests/f77demo/foo.h, tests/f77demo/fooc.c,
tests/fail.at, tests/fcdemo-conf.test, tests/fcdemo-exec.test,
tests/fcdemo-make.test, tests/fcdemo-shared.test,
tests/fcdemo-static.test, tests/fcdemo/Makefile.am,
tests/fcdemo/configure.ac, tests/fcdemo/cprogram.c,
tests/fcdemo/foo.h, tests/fcdemo/fooc.c,
tests/inherited_flags.at, tests/libtoolize.at,
tests/link-2.test, tests/link-order.at, tests/link-order2.at,
tests/link.test, tests/lt_dlexit.at, tests/mdemo-conf.test,
tests/mdemo-dryrun.test, tests/mdemo-exec.test,
tests/mdemo-inst.test, tests/mdemo-make.test,
tests/mdemo-shared.test, tests/mdemo-static.test,
tests/mdemo-unst.test, tests/mdemo/Makefile.am,
tests/mdemo/configure.ac, tests/mdemo/foo.h, tests/mdemo/foo1.c,
tests/mdemo/foo2.c, tests/mdemo/main.c, tests/mdemo/mlib.c,
tests/mdemo/sub.c, tests/mdemo2-conf.test,
tests/mdemo2-exec.test, tests/mdemo2-make.test,
tests/mdemo2/Makefile.am, tests/mdemo2/configure.ac,
tests/mdemo2/main.c, tests/nomode.test, tests/nonrecursive.at,
tests/objectlist.test, tests/old-m4-iface.at,
tests/pdemo-conf.test, tests/pdemo-exec.test,
tests/pdemo-inst.test, tests/pdemo-make.test,
tests/pdemo/Makefile.am, tests/pdemo/configure.ac,
tests/pdemo/foo.h, tests/pdemo/longer_file_name_dlmain.c,
tests/pdemo/longer_file_name_foo.c,
tests/pdemo/longer_file_name_foo2.c,
tests/pdemo/longer_file_name_hell1.c,
tests/pdemo/longer_file_name_hell2.c,
tests/pdemo/longer_file_name_hello.c,
tests/pdemo/longer_file_name_main.c, tests/quote.test,
tests/recursive.at, tests/search-path.at, tests/sh.test,
tests/shlibpath.at, tests/standalone.at, tests/static.at,
tests/stresstest.at, tests/subproject.at, tests/suffix.test,
tests/tagdemo-conf.test, tests/tagdemo-exec.test,
tests/tagdemo-make.test, tests/tagdemo-shared.test,
tests/tagdemo-static.test, tests/tagdemo-undef.test,
tests/tagdemo/Makefile.am, tests/tagdemo/baz.cpp,
tests/tagdemo/baz.h, tests/tagdemo/configure.ac,
tests/tagdemo/conv.cpp, tests/tagdemo/conv.h,
tests/tagdemo/foo.cpp, tests/tagdemo/foo.h,
tests/tagdemo/main.cpp, tests/tagtrace.test,
tests/template.at, tests/testsuite.at: Apply correct license
text according to the new rules set out in HACKING.
2007-03-25 20:12:44 +08:00
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2004-02-11 03:47:00 +08:00
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
* HACKING (Licensing Rules): Explain the various license texts
used for files distributed with Libtool, and update license text
to match.
* Makefile.am, Makefile.maint README, README.alpha, THANKS, TODO,
bootstrap, clcommit.m4sh, configure.ac, libltdl/Makefile.inc,
libltdl/README, libltdl/argz.c, libltdl/argz_.h,
libltdl/config/general.m4sh, libltdl/config/getopt.m4sh,
libltdl/config/ltmain.m4sh, libltdl/config/mailnotify.m4sh,
libltdl/config/mkstamp, libltdl/configure.ac,
libltdl/libltdl/lt__alloc.h, libltdl/libltdl/lt__dirent.h,
libltdl/libltdl/lt__glibc.h, libltdl/libltdl/lt__private.h,
libltdl/libltdl/lt__strl.h, libltdl/libltdl/lt_dlloader.h,
libltdl/libltdl/lt_error.h, libltdl/libltdl/lt_system.h,
libltdl/libltdl/slist.h, libltdl/loaders/dld_link.c,
libltdl/loaders/dlopen.c, libltdl/loaders/dyld.c,
libltdl/loaders/load_add_on.c, libltdl/loaders/loadlibrary.c,
libltdl/loaders/preopen.c, libltdl/loaders/shl_load.c,
libltdl/lt__alloc.c, libltdl/lt__dirent.c, libltdl/lt__strl.c,
libltdl/lt_dlloader.c, libltdl/lt_error.c, libltdl/ltdl.c,
libltdl/ltdl.h, libltdl/m4/argz.m4, libltdl/m4/libtool.m4,
libltdl/m4/ltdl.m4, libltdl/m4/ltoptions.m4,
libltdl/m4/ltsugar.m4, libltdl/m4/ltversion.in,
Jlibltdl/m4/ltversion.m4, libltdl/m4/lt~obsolete.m4,
libltdl/slist.c, libtoolize.m4sh, tests/am-subdir.at,
tests/cdemo-conf.test, tests/cdemo-exec.test,
tests/cdemo-make.test, tests/cdemo-shared.test,
tests/cdemo-static.test, tests/cdemo-undef.test,
tests/cdemo/Makefile.am, tests/cdemo/configure.ac,
tests/cdemo/foo.c, tests/cdemo/foo.h, tests/cdemo/main.c,
tests/cmdline_wrap.at, tests/convenience.at, tests/defs.m4sh,
tests/demo-conf.test, tests/demo-deplibs.test,
tests/demo-exec.test, tests/demo-hardcode.test,
tests/demo-inst.test, tests/demo-make.test,
tests/demo-nofast.test, tests/demo-noinst-link.test,
tests/demo-nopic.test, tests/demo-pic.test,
tests/demo-relink.test, tests/demo-shared.test,
tests/demo-static.test, tests/demo-unst.test,
tests/demo/Makefile.am, tests/demo/configure.ac,
tests/demo/dlmain.c, tests/demo/foo.c,
tests/demo/foo.h, tests/demo/hell1.c, tests/demo/hell2.c,
tests/demo/hello.c, tests/demo/main.c,
tests/depdemo-conf.test, tests/depdemo-exec.test,
tests/depdemo-inst.test, tests/depdemo-make.test,
tests/depdemo-nofast.test, tests/depdemo-relink.test,
tests/depdemo-shared.test, tests/depdemo-static.test,
tests/depdemo-unst.test, tests/depdemo/Makefile.am,
tests/depdemo/configure.ac, tests/depdemo/l1/Makefile.am,
tests/depdemo/l1/l1.c, tests/depdemo/l1/l1.h,
tests/depdemo/l2/Makefile.am, tests/depdemo/l2/l2.c,
tests/depdemo/l2/l2.h, tests/depdemo/l3/Makefile.am,
tests/depdemo/l3/l3.c, tests/depdemo/l3/l3.h,
tests/depdemo/l4/Makefile.am, tests/depdemo/l4/l4.c,
tests/depdemo/l4/l4.h, tests/depdemo/main.c,
tests/depdemo/sysdep.h, tests/deplibs-ident.at,
tests/destdir.at, tests/duplicate_conv.at,
tests/duplicate_deps.at, tests/duplicate_members.at,
tests/early-libtool.at, tests/export.at,
tests/f77demo-conf.test, tests/f77demo-exec.test,
tests/f77demo-make.test, tests/f77demo-shared.test,
tests/f77demo-static.test, tests/f77demo/Makefile.am,
tests/f77demo/configure.ac, tests/f77demo/cprogram.c,
tests/f77demo/foo.h, tests/f77demo/fooc.c,
tests/fail.at, tests/fcdemo-conf.test, tests/fcdemo-exec.test,
tests/fcdemo-make.test, tests/fcdemo-shared.test,
tests/fcdemo-static.test, tests/fcdemo/Makefile.am,
tests/fcdemo/configure.ac, tests/fcdemo/cprogram.c,
tests/fcdemo/foo.h, tests/fcdemo/fooc.c,
tests/inherited_flags.at, tests/libtoolize.at,
tests/link-2.test, tests/link-order.at, tests/link-order2.at,
tests/link.test, tests/lt_dlexit.at, tests/mdemo-conf.test,
tests/mdemo-dryrun.test, tests/mdemo-exec.test,
tests/mdemo-inst.test, tests/mdemo-make.test,
tests/mdemo-shared.test, tests/mdemo-static.test,
tests/mdemo-unst.test, tests/mdemo/Makefile.am,
tests/mdemo/configure.ac, tests/mdemo/foo.h, tests/mdemo/foo1.c,
tests/mdemo/foo2.c, tests/mdemo/main.c, tests/mdemo/mlib.c,
tests/mdemo/sub.c, tests/mdemo2-conf.test,
tests/mdemo2-exec.test, tests/mdemo2-make.test,
tests/mdemo2/Makefile.am, tests/mdemo2/configure.ac,
tests/mdemo2/main.c, tests/nomode.test, tests/nonrecursive.at,
tests/objectlist.test, tests/old-m4-iface.at,
tests/pdemo-conf.test, tests/pdemo-exec.test,
tests/pdemo-inst.test, tests/pdemo-make.test,
tests/pdemo/Makefile.am, tests/pdemo/configure.ac,
tests/pdemo/foo.h, tests/pdemo/longer_file_name_dlmain.c,
tests/pdemo/longer_file_name_foo.c,
tests/pdemo/longer_file_name_foo2.c,
tests/pdemo/longer_file_name_hell1.c,
tests/pdemo/longer_file_name_hell2.c,
tests/pdemo/longer_file_name_hello.c,
tests/pdemo/longer_file_name_main.c, tests/quote.test,
tests/recursive.at, tests/search-path.at, tests/sh.test,
tests/shlibpath.at, tests/standalone.at, tests/static.at,
tests/stresstest.at, tests/subproject.at, tests/suffix.test,
tests/tagdemo-conf.test, tests/tagdemo-exec.test,
tests/tagdemo-make.test, tests/tagdemo-shared.test,
tests/tagdemo-static.test, tests/tagdemo-undef.test,
tests/tagdemo/Makefile.am, tests/tagdemo/baz.cpp,
tests/tagdemo/baz.h, tests/tagdemo/configure.ac,
tests/tagdemo/conv.cpp, tests/tagdemo/conv.h,
tests/tagdemo/foo.cpp, tests/tagdemo/foo.h,
tests/tagdemo/main.cpp, tests/tagtrace.test,
tests/template.at, tests/testsuite.at: Apply correct license
text according to the new rules set out in HACKING.
2007-03-25 20:12:44 +08:00
|
|
|
# along with mailnotify; see the file COPYING. If not, a copy
|
|
|
|
# can be downloaded from http://www.gnu.org/licenses/gpl.html,
|
|
|
|
# or obtained by writing to the Free Software Foundation, Inc.,
|
|
|
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2004-02-11 03:47:00 +08:00
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
# Usage: $progname [OPTIONS]...
|
2004-02-11 03:47:00 +08:00
|
|
|
#
|
2010-06-05 06:40:40 +08:00
|
|
|
# -x --debug enable verbose shell tracing
|
|
|
|
# --dry-run don't actually post the mime message
|
2004-02-11 03:47:00 +08:00
|
|
|
# -f FILE --filename=FILE content of this part
|
2010-06-05 06:40:40 +08:00
|
|
|
# -h FILE --headers=FILE read additional headers from FILE
|
2004-02-11 03:47:00 +08:00
|
|
|
# -m TYPE --mime-type=TYPE mime-type of this part
|
|
|
|
# -o FILE --output-file=FILE output to FILE instead of sending
|
|
|
|
# -v --verbose run in verbose mode
|
2004-02-12 21:18:52 +08:00
|
|
|
# --version print version information
|
2010-06-05 06:40:40 +08:00
|
|
|
# -? --help print short or long help message
|
2004-02-11 03:47:00 +08:00
|
|
|
|
|
|
|
# Assemble a (possibly multi-part) mime message and hand it to the local
|
|
|
|
# sendmail for onward delivery. MUAs tend to mangle patch attachments in
|
|
|
|
# various ways: not setting the mime-type correctly, line wrapping the
|
|
|
|
# patch itself, escaping certain values, etc. This script is designed to
|
|
|
|
# make it easier to send a patch as a MIME attachment, though it is general
|
|
|
|
# enough that it might be useful otherwise.
|
|
|
|
|
|
|
|
# For example to send a patch as an attachment, assuming the patch itself
|
|
|
|
# is in PATCHFILE:
|
|
|
|
#
|
2010-06-05 06:40:40 +08:00
|
|
|
# echo 'From: me@example.org' > headers
|
|
|
|
# echo 'To: patch-list@foo.org' >> headers
|
|
|
|
# echo 'Subject: FYI: PATCHFILE' >> headers
|
|
|
|
# echo 'Cc: someone@example.org' >> headers
|
|
|
|
# echo 'Applied this patch to HEAD' > body
|
|
|
|
# $progname -h headers -f body -m text/plain -f PATCHFILE -m text/x-patch
|
|
|
|
#
|
|
|
|
# There is no set order or requirement for mail headers in the headers
|
|
|
|
# file, though you will obviously need someone's address in 'To:', and
|
|
|
|
# it's not polite to omit the 'Subject:' header...
|
2004-02-11 03:47:00 +08:00
|
|
|
|
|
|
|
# You will probably find using this script in conjunction with clcommit
|
2010-06-05 06:40:40 +08:00
|
|
|
# saves you a lot of typing.
|
2004-02-11 03:47:00 +08:00
|
|
|
|
|
|
|
# Report bugs to <gary@gnu.org>
|
|
|
|
|
|
|
|
: ${HOST=`hostname`}
|
2004-10-22 20:10:31 +08:00
|
|
|
: ${SENDMAIL=sendmail}
|
2004-10-09 05:56:10 +08:00
|
|
|
|
2004-02-11 03:47:00 +08:00
|
|
|
PROGRAM=mailnotify
|
|
|
|
|
2008-11-10 15:25:24 +08:00
|
|
|
m4_divert_pop
|
2004-10-09 05:56:10 +08:00
|
|
|
m4_include([getopt.m4sh])
|
2004-02-11 03:47:00 +08:00
|
|
|
|
2007-03-06 08:46:56 +08:00
|
|
|
M4SH_VERBATIM([[
|
2004-02-11 03:47:00 +08:00
|
|
|
sed_mail_address='s,^.*<\(.*\)>.*$,\1,'
|
2010-06-05 06:40:40 +08:00
|
|
|
]])
|
2004-02-11 03:47:00 +08:00
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
dnl SHORT LONG DEFAULT INIT
|
|
|
|
dnl ----------------------------------------------------------------------
|
|
|
|
dnl There are several options supported below for backwards compatibility,
|
|
|
|
dnl but which are not mentioned in the help.
|
|
|
|
M4SH_GETOPTS(
|
|
|
|
[C^!], [--carbon-copy], [], [],
|
|
|
|
[F^!], [--from], [], [],
|
|
|
|
[f@+], [--filename], [], [],
|
|
|
|
[h@!], [--headers], [], [],
|
|
|
|
[m+!], [--mime-type], [], [
|
|
|
|
case [$]1 in
|
|
|
|
text/*) ;;
|
|
|
|
*/*) func_error "\`[$]1': only text/* mime-types supported"
|
|
|
|
;;
|
|
|
|
*) func_error "invalid mime-type, \`[$]1'"
|
|
|
|
exit_cmd=exit
|
|
|
|
;;
|
|
|
|
esac],
|
|
|
|
[n], [], [], [],
|
|
|
|
[o!], [--output-file], [], [],
|
|
|
|
[s^!], [--subject], [], [],
|
|
|
|
[v], [--verbose], [], [],
|
|
|
|
[], [--dry-run|--dryrun], [], [],
|
|
|
|
[
|
|
|
|
# ensure destination address(es) available
|
|
|
|
test [$]# -gt 0 ||
|
|
|
|
grep '^\(To\|Cc\|Bcc\): ' "${opt_headers-nosuchfile}" >/dev/null 2>&1 ||
|
|
|
|
func_fatal_help "no destination address"
|
|
|
|
|
|
|
|
# validate headers
|
|
|
|
test "$opt_headers" && {
|
|
|
|
test -n "$opt_carbon_copy" && grep "^Cc: *" "$opt_headers" >/dev/null 2>&1 && {
|
|
|
|
func_error "specify \`Cc:' in either \`$opt_headers' or with \`--carbon-copy'."
|
|
|
|
exit_cmd=exit
|
|
|
|
}
|
|
|
|
test -n "$opt_from" && grep "^From: *" "$opt_headers" >/dev/null 2>&1 && {
|
|
|
|
func_error "specify \`From:' in either \`$opt_headers' or with \`--from'."
|
|
|
|
exit_cmd=exit
|
|
|
|
}
|
|
|
|
test -n "$opt_subject" && grep "^Subject: *" "$opt_headers" >/dev/null 2>&1 && {
|
|
|
|
func_error "specify \`Subject:' in either \`$opt_headers' or with \`--subject'."
|
|
|
|
exit_cmd=exit
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# validate mime parts
|
|
|
|
if test "${opt_mime_type_num-0}" -ne "${opt_filename_num-0}"; then
|
|
|
|
func_fatal_error "One part is incomplete -- each part needs a filename and a mime-type"
|
|
|
|
fi
|
|
|
|
if test -z "$opt_output_file"; then
|
|
|
|
test -f "$opt_headers" || if test -z "$opt_subject" ||
|
|
|
|
eval test -z \"\$opt_mime_type_$opt_mime_type_num\" ||
|
|
|
|
eval test -z \"\$opt_filename_$opt_filename_num\"; then
|
2004-02-11 03:47:00 +08:00
|
|
|
func_fatal_error "if output is not directed to a file -s, -f, and -m are all required"
|
|
|
|
fi
|
|
|
|
else
|
2010-06-05 06:40:40 +08:00
|
|
|
eval test -n \"\$opt_filename_$opt_filename_num\" ||
|
2004-02-11 03:47:00 +08:00
|
|
|
func_fatal_error "-f is required."
|
2010-06-05 06:40:40 +08:00
|
|
|
eval test -n \"\$opt_mime_type_$opt_mime_type_num\" ||
|
2004-02-11 03:47:00 +08:00
|
|
|
func_fatal_error "with output directed to a file, -m is required"
|
|
|
|
fi
|
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
# validate $opt_dry_run
|
|
|
|
$opt_dry_run && SENDMAIL="echo $SENDMAIL"
|
|
|
|
])
|
|
|
|
|
|
|
|
M4SH_VERBATIM([[
|
|
|
|
# Bail out on command errors!
|
|
|
|
set -e
|
2004-02-11 03:47:00 +08:00
|
|
|
|
|
|
|
# func_headers outfile destination
|
|
|
|
# Generate common headers to OUTFILE, where DESTINATION is a comma
|
|
|
|
# separated list of fully qualified destination addresses.
|
|
|
|
func_headers ()
|
|
|
|
{
|
2010-06-10 22:02:48 +08:00
|
|
|
$opt_debug
|
|
|
|
|
2004-02-11 03:47:00 +08:00
|
|
|
my_outfile="$1"
|
|
|
|
my_destination="$2"
|
2006-01-22 00:44:41 +08:00
|
|
|
my_sed_version_no='
|
|
|
|
/^# '$PROGRAM' (GNU / {
|
|
|
|
s/^# .*version //
|
|
|
|
p
|
|
|
|
}
|
|
|
|
d'
|
2004-02-11 03:47:00 +08:00
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
$opt_dry_run || {
|
2004-02-12 21:18:52 +08:00
|
|
|
echo "User-Agent: $PROGRAM/`$SED \"$my_sed_version_no\" < $progpath`"
|
2004-02-11 03:47:00 +08:00
|
|
|
echo "MIME-Version: 1.0"
|
2010-06-05 06:40:40 +08:00
|
|
|
|
|
|
|
# Deprecated command line options take precedence at the moment
|
|
|
|
my_elide="Bcc"
|
|
|
|
test -n "$opt_from" &&
|
|
|
|
my_elide="${my_elide+$my_elide\|}From" && eval echo From: $opt_from
|
|
|
|
test -n "$my_destination" &&
|
|
|
|
my_elide="${my_elide+$my_elide\|}To" && eval echo To: $my_destination
|
|
|
|
test -n "$opt_carbon_copy" &&
|
|
|
|
my_elide="${my_elide+$my_elide\|}Cc" && eval echo CC: $opt_carbon_copy
|
|
|
|
test -n "$opt_subject" &&
|
|
|
|
my_elide="${my_elide+$my_elide\|}Subject" && eval echo Subject: $opt_subject
|
|
|
|
|
|
|
|
# Plus any additional headers
|
|
|
|
test -n "$opt_headers" && $SED "/^\($my_elide\): */d" "$opt_headers"
|
2004-02-11 03:47:00 +08:00
|
|
|
} > "$my_outfile"
|
2010-06-05 06:40:40 +08:00
|
|
|
|
|
|
|
:
|
2004-02-11 03:47:00 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# func_single_content outfile
|
|
|
|
# Send the only message part as a single mime mail part.
|
|
|
|
func_single_content ()
|
|
|
|
{
|
2010-06-10 22:02:48 +08:00
|
|
|
$opt_debug
|
|
|
|
|
2004-02-11 03:47:00 +08:00
|
|
|
my_outfile="$1"
|
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
$opt_dry_run || cat >> "$my_outfile" <<EOF
|
|
|
|
Content-Type: $opt_mime_type_1;
|
2004-02-11 03:47:00 +08:00
|
|
|
Content-Transfer-Encoding: 7bit
|
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
`cat $opt_filename_1`
|
2004-02-11 03:47:00 +08:00
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# func_multipart_content outfile
|
|
|
|
# Send the various message parts to OUTFILE as a multipart mime mail.
|
|
|
|
func_multipart_content ()
|
|
|
|
{
|
2010-06-10 22:02:48 +08:00
|
|
|
$opt_debug
|
|
|
|
|
2004-02-11 03:47:00 +08:00
|
|
|
my_outfile="$1"
|
2004-10-09 05:56:10 +08:00
|
|
|
boundary="boundary-${HOST}-$$-`date | tr ' :' -`"
|
2010-06-05 06:40:40 +08:00
|
|
|
$opt_dry_run || {
|
|
|
|
cat <<EOF >> "$my_outfile"
|
2004-10-09 05:56:10 +08:00
|
|
|
Content-Type: multipart/mixed;
|
2004-02-11 03:47:00 +08:00
|
|
|
boundary="$boundary"
|
|
|
|
|
|
|
|
This is a multimedia message in MIME format. If you are reading
|
|
|
|
this prefix, your mail reader does not understand MIME. You may
|
|
|
|
wish to look into upgrading to a mime-aware mail reader.
|
|
|
|
EOF
|
2010-06-05 06:40:40 +08:00
|
|
|
i=0
|
|
|
|
while test $i -lt $opt_filename_num
|
|
|
|
do
|
|
|
|
i=`expr 1 + $i`
|
|
|
|
eval file=\"\$opt_filename_$i\"
|
|
|
|
name=`echo "$file" | $SED $basename`
|
|
|
|
{
|
|
|
|
echo ""
|
|
|
|
echo "--$boundary"
|
|
|
|
if test $i -gt 1; then
|
|
|
|
eval echo \"Content-Type: \$opt_mime_type_$i\;\"
|
|
|
|
echo " name=\"$name\""
|
|
|
|
else
|
|
|
|
eval echo \"Content-Type: \$opt_mime_type_$i\"
|
|
|
|
fi
|
|
|
|
echo "Content-Transfer-Encoding: 7bit"
|
|
|
|
echo ""
|
|
|
|
cat "$file"
|
|
|
|
} >> "$my_outfile"
|
|
|
|
done
|
|
|
|
{
|
|
|
|
echo ""
|
|
|
|
echo "--${boundary}--"
|
|
|
|
echo ""
|
|
|
|
} >> "$my_outfile"
|
|
|
|
}
|
|
|
|
|
|
|
|
:
|
2004-02-11 03:47:00 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# func_sendmail infile destination [from]
|
|
|
|
# Send the message in INFILE to the space delimited list of destination
|
|
|
|
# addresses in DESTINATION. If FROM is given, it is the address the
|
|
|
|
# mail purports to be from.
|
|
|
|
# BEWARE: Many MTAs will refuse mail where FROM does not match the actual
|
|
|
|
# sending domain.
|
|
|
|
func_sendmail ()
|
|
|
|
{
|
2010-06-10 22:02:48 +08:00
|
|
|
$opt_debug
|
|
|
|
|
2004-02-11 03:47:00 +08:00
|
|
|
my_infile="$1"
|
|
|
|
my_destination="$2"
|
|
|
|
my_from="$3"
|
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
$opt_dry_run && my_infile=/dev/null
|
|
|
|
|
2004-10-22 20:10:31 +08:00
|
|
|
from_name=`eval echo "X$my_from" | $Xsed -e 's, *<.*> *$,,'`
|
|
|
|
from_addr=`eval echo "X$my_from" | $Xsed -e "$sed_mail_address"`
|
2004-02-11 03:47:00 +08:00
|
|
|
|
2004-10-22 20:10:31 +08:00
|
|
|
save_PATH="$PATH"
|
|
|
|
PATH="/usr/lib:/usr/sbin:$PATH"
|
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
$opt_dry_run || {
|
|
|
|
save_IFS="$IFS"
|
|
|
|
IFS=':'
|
|
|
|
for try_sendmail_dir in $PATH; do
|
|
|
|
IFS="$save_IFS"
|
|
|
|
PATH="$save_PATH"
|
|
|
|
if test -x "$try_sendmail_dir/$SENDMAIL"; then
|
|
|
|
SENDMAIL="$try_sendmail_dir/$SENDMAIL"
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
2004-10-22 20:10:31 +08:00
|
|
|
IFS="$save_IFS"
|
2010-06-05 06:40:40 +08:00
|
|
|
PATH="$save_PATH"
|
|
|
|
test -x "$SENDMAIL" || func_fatal_error "sendmail executable not found"
|
|
|
|
}
|
2004-02-13 03:02:28 +08:00
|
|
|
|
2004-02-11 03:47:00 +08:00
|
|
|
func_verbose "Delivering mail, please wait..."
|
|
|
|
if test -n "$from_name"; then
|
2004-02-13 03:02:28 +08:00
|
|
|
$SENDMAIL -F "$from_name" -f "$from_addr" $my_destination < "$my_infile"
|
2004-02-11 03:47:00 +08:00
|
|
|
elif test -n "$from_addr"; then
|
2004-02-13 03:02:28 +08:00
|
|
|
$SENDMAIL -f "$from_addr" $my_destination < "$my_infile"
|
2004-02-11 03:47:00 +08:00
|
|
|
else
|
2004-02-13 03:02:28 +08:00
|
|
|
$SENDMAIL $my_destination < "$my_infile"
|
2004-02-11 03:47:00 +08:00
|
|
|
fi
|
|
|
|
if test $? -eq 0; then
|
|
|
|
func_verbose "...succeeded."
|
2010-06-05 06:40:40 +08:00
|
|
|
$opt_dry_run || $RM $my_infile
|
2004-02-11 03:47:00 +08:00
|
|
|
else
|
|
|
|
func_fatal_error "Mail delivery failed, draft mail is in $my_infile"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
# func_extract_email_from_header re_header headerfile
|
|
|
|
func_extract_email ()
|
|
|
|
{
|
2010-06-10 22:02:48 +08:00
|
|
|
$opt_debug
|
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
my_re_header="$1"
|
|
|
|
my_headerfile="$2"
|
|
|
|
$as_unset func_extract_email_result
|
|
|
|
|
|
|
|
save_IFS="$IFS"
|
|
|
|
IFS='
|
|
|
|
'
|
|
|
|
for to in : `grep "$my_re_header" "$my_headerfile" 2>/dev/null`; do
|
|
|
|
IFS="$save_IFS"
|
|
|
|
test "X$to" = X: && continue
|
|
|
|
|
|
|
|
line=`echo "$to" | $SED "s,$my_re_header,,"`
|
|
|
|
|
|
|
|
IFS=,
|
|
|
|
for addr in $line; do
|
|
|
|
IFS="$save_IFS"
|
|
|
|
func_quote_for_eval "$addr"
|
|
|
|
to_addr=`echo "$func_quote_for_eval_result" | $SED "$sed_mail_address"`
|
|
|
|
test -n "$to_addr" || to_addr="$func_quote_for_eval_result"
|
|
|
|
func_extract_email_result="${func_extract_email_result+$func_extract_email_result }$to_addr"
|
|
|
|
done
|
|
|
|
done
|
|
|
|
IFS="$save_IFS"
|
|
|
|
}
|
2004-02-11 03:47:00 +08:00
|
|
|
|
|
|
|
## ----- ##
|
|
|
|
## main. ##
|
|
|
|
## ----- ##
|
|
|
|
|
|
|
|
{
|
2004-11-20 01:04:22 +08:00
|
|
|
tmp_dir="`func_mktempdir`"
|
2010-06-05 06:40:40 +08:00
|
|
|
headers="$tmp_dir/headers"
|
2004-11-20 01:04:22 +08:00
|
|
|
fname="$tmp_dir/mail"
|
2010-06-05 06:40:40 +08:00
|
|
|
|
2004-11-20 01:04:22 +08:00
|
|
|
trap '$RM -r "$tmp_dir"; exit $EXIT_FAILURE' 1 2 15
|
2004-02-11 03:47:00 +08:00
|
|
|
|
2004-10-22 20:10:31 +08:00
|
|
|
# Generate a comma separated list of destination addresses for the
|
|
|
|
# mail headers:
|
2010-06-05 06:40:40 +08:00
|
|
|
$as_unset destination
|
2004-10-22 20:10:31 +08:00
|
|
|
for to in : ${1+"$@"}
|
2004-02-11 03:47:00 +08:00
|
|
|
do
|
2004-10-22 20:10:31 +08:00
|
|
|
test "X$to" = X: && continue
|
|
|
|
|
|
|
|
func_quote_for_eval "$to"
|
2010-06-05 06:40:40 +08:00
|
|
|
destination="${destination+$destination, }$func_quote_for_eval_result"
|
2004-02-11 03:47:00 +08:00
|
|
|
done
|
|
|
|
func_headers "$fname" "$destination"
|
2010-06-05 06:40:40 +08:00
|
|
|
|
|
|
|
if test $opt_filename_num -gt 1; then
|
2004-02-11 03:47:00 +08:00
|
|
|
func_multipart_content "$fname"
|
|
|
|
else
|
|
|
|
func_single_content "$fname"
|
|
|
|
fi
|
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
# Generate a list of destination addresses for sendmail:
|
|
|
|
if test -z "$opt_output_file"; then
|
|
|
|
$as_unset destination
|
2004-10-22 20:10:31 +08:00
|
|
|
for to in : ${1+"$@"}
|
|
|
|
do
|
|
|
|
test "X$to" = X: && continue
|
|
|
|
|
|
|
|
func_quote_for_eval "$to"
|
|
|
|
|
2010-06-05 06:40:40 +08:00
|
|
|
to_addr=`echo "$func_quote_for_eval_result" | $SED "$sed_mail_address"`
|
2004-10-22 20:10:31 +08:00
|
|
|
test -n "$to_addr" || to_addr="$func_quote_for_eval_result"
|
2010-06-05 06:40:40 +08:00
|
|
|
destination="${destination+$destination }$to_addr"
|
2004-02-11 03:47:00 +08:00
|
|
|
done
|
2010-06-05 06:40:40 +08:00
|
|
|
func_extract_email '^To: *' "$opt_headers"
|
|
|
|
destination="${destination+$destination }$func_extract_email_result"
|
|
|
|
func_extract_email '^Cc: *' "$opt_headers"
|
|
|
|
destination="${destination+$destination }$func_extract_email_result"
|
|
|
|
func_extract_email '^Bcc: *' "$opt_headers"
|
|
|
|
destination="${destination+$destination }$func_extract_email_result"
|
|
|
|
|
|
|
|
test -n "$opt_from" || {
|
|
|
|
func_extract_email '^From: *' "$opt_headers"
|
|
|
|
opt_from="$func_extract_email_result"
|
|
|
|
}
|
|
|
|
|
|
|
|
func_sendmail "$fname" "$destination" "$opt_from"
|
2004-02-11 03:47:00 +08:00
|
|
|
else
|
2010-06-05 06:40:40 +08:00
|
|
|
mv $fname $opt_output_file || exit $EXIT_FAILURE
|
2004-02-11 03:47:00 +08:00
|
|
|
fi
|
2004-11-20 01:04:22 +08:00
|
|
|
|
|
|
|
$RM -r "$tmp_dir"
|
2004-02-11 03:47:00 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
exit $EXIT_SUCCESS
|
2004-02-12 21:18:52 +08:00
|
|
|
|
|
|
|
# Local Variables:
|
|
|
|
# mode:shell-script
|
|
|
|
# sh-indentation:2
|
|
|
|
# End:
|
2007-03-06 08:46:56 +08:00
|
|
|
]])
|
|
|
|
|