summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2008-07-14 03:52:03 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2008-07-14 03:52:03 +0000
commitc063f0a6acb55f240a69ec5ec838f2b1dc8dc827 (patch)
tree105c1c0fd2548421d342665aaa48ae2a1c3bd2cd /mail-mta
parentDo not use append-ldflags to add libraries, per bug #226913. (diff)
downloadhistorical-c063f0a6acb55f240a69ec5ec838f2b1dc8dc827.tar.gz
historical-c063f0a6acb55f240a69ec5ec838f2b1dc8dc827.tar.bz2
historical-c063f0a6acb55f240a69ec5ec838f2b1dc8dc827.zip
Clean up old version and files.
Package-Manager: portage-2.2_rc1/cvs/Linux 2.6.26-rc4-00103-g1beee8d x86_64
Diffstat (limited to 'mail-mta')
-rw-r--r--mail-mta/nullmailer/ChangeLog9
-rw-r--r--mail-mta/nullmailer/Manifest9
-rw-r--r--mail-mta/nullmailer/files/mailer.conf52
-rw-r--r--mail-mta/nullmailer/files/nullmailer-1.00-gcc34-fix.patch24
-rw-r--r--mail-mta/nullmailer/files/nullmailer-1.00-smtp-auth.patch143
-rw-r--r--mail-mta/nullmailer/files/nullmailer-1.00-syslog.patch301
-rw-r--r--mail-mta/nullmailer/files/remotes.sample17
-rw-r--r--mail-mta/nullmailer/nullmailer-1.00.ebuild127
8 files changed, 9 insertions, 673 deletions
diff --git a/mail-mta/nullmailer/ChangeLog b/mail-mta/nullmailer/ChangeLog
index 6cff81f11bfc..b5a9a179db8e 100644
--- a/mail-mta/nullmailer/ChangeLog
+++ b/mail-mta/nullmailer/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for mail-mta/nullmailer
# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/nullmailer/ChangeLog,v 1.33 2008/06/26 17:34:55 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/nullmailer/ChangeLog,v 1.34 2008/07/14 03:52:02 robbat2 Exp $
+
+ 14 Jul 2008; Robin H. Johnson <robbat2@gentoo.org>
+ -files/nullmailer-1.00-gcc34-fix.patch,
+ -files/nullmailer-1.00-smtp-auth.patch,
+ -files/nullmailer-1.00-syslog.patch, -files/mailer.conf,
+ -files/remotes.sample, -nullmailer-1.00.ebuild:
+ Clean up old version and files.
26 Jun 2008; Robin H. Johnson <robbat2@gentoo.org> nullmailer-1.04.ebuild:
Stabilize on amd64 per bug 229505, tested in my work prod env for months.
diff --git a/mail-mta/nullmailer/Manifest b/mail-mta/nullmailer/Manifest
index c400881896c1..ce6c9baa9fe3 100644
--- a/mail-mta/nullmailer/Manifest
+++ b/mail-mta/nullmailer/Manifest
@@ -1,14 +1,7 @@
AUX init.d-nullmailer 1221 RMD160 9e793a57acc9f2123c75e5a27f4b6123ce1d171a SHA1 154b3c92512151d6d4f9dc63125536c44e207f1e SHA256 279dd0519b62b57b4f5f6a7bcbfcd8337dd3d5e6e785de1d443f2005def64d72
-AUX mailer.conf 1564 RMD160 e0f712940ee2d15981793cceabf9da7b1a4aa2fc SHA1 3d14fc27ce89ec0d3b0ff898927760fa383828c8 SHA256 011da5dc334c36df2dc951864f11fa0eb6379f854e37c58ccba8595aa83bc52d
-AUX nullmailer-1.00-gcc34-fix.patch 618 RMD160 e294a7728b968b70e88f3882994c766eabd46e24 SHA1 a70487ce55316bc6dec86765341fc93e9142c8fc SHA256 41f25b50859cf391ca8f9f9163bd5ce05553b70acef4413930a85e6df6b61ddb
-AUX nullmailer-1.00-smtp-auth.patch 3990 RMD160 a773a74362e49fe4ee72234cd0f1c8ecf845a642 SHA1 07da7435ca1230314a923490755d9a0d69f07692 SHA256 dac4fed444ebbdd6c372e918c86ab2d5046fdb66faf55c9efe485f4b768cdf1a
-AUX nullmailer-1.00-syslog.patch 10047 RMD160 c27eecec6a1f0e1017217d4baaa9dfe6a5d05206 SHA1 7f964b9ea2a85f90c2e1ec5ae4b8f54381771f19 SHA256 c158e90fa9e16bf4d9f71cb0d92eb1f8223ad899862dcd939e67f6867f7abfb9
-AUX remotes.sample 444 RMD160 00d2f8ccade03f6ba9cca2f3f0a157f42e3b8b98 SHA1 1cc94a1191f4bf20e1bd437fda70b5d40c127f8e SHA256 c3c6b0efc100142ecbe65b9af3e20900f9b21449619f35ef3ba2334dd0888b1f
AUX remotes.sample-1.04 540 RMD160 41a6f50c7d0cd0423be8d2e485e07148504316f7 SHA1 8aecf00f27f705a28e9c45c2e9807a3a4f4f309a SHA256 d9f756d9a2b21e7f7166c1b29a34c4dda1eb1ab0c57168ded3d0ed225cf692ee
-DIST nullmailer-1.00.tar.gz 170605 RMD160 cd45934be7a8a9391f31452fe56b6166cb730306 SHA1 e17b524b857b0a2eaf97df78e040f6e804764f4d SHA256 1ebb63f010a46dce9559b1025f76e74741429071cd2d4f380a63a5ced3ce8340
DIST nullmailer-1.04.tar.gz 176867 RMD160 13deaf37a392dfd7b57ac61b50d496dfdb9c362f SHA1 f3815fec726a776be050a6be59b91e696779f5a9 SHA256 364b7888720469d1494c6084a8de7cd39cfc8f841f3be02dfc417e111572fe8b
DIST nullmailer_1.04-1.diff.gz 47284 RMD160 0f6ba5985d6b47678f35b090a635630646dbbd14 SHA1 61525c2b5d9297c2a976c7107e1d16dab43d2259 SHA256 daa2a9388e8fa2a93401b9ee060a7f56f2f8e820af57aeba82a8abde838fcd75
-EBUILD nullmailer-1.00.ebuild 4027 RMD160 cf8c4fa7e574a4d549bf0b09e0b9368e096b74d3 SHA1 81c8197502ce4dc75d80279b23e00b34f733118d SHA256 df574a30e49e4c228d55670d0ee03089035b97f667cf97f2a8f3375d08309216
EBUILD nullmailer-1.04.ebuild 3730 RMD160 0e70f372cb69642284bd66e4b0a4dade4e639473 SHA1 277c4c438702e2ea0dd2b81d7737a210037075a1 SHA256 1f32febdf3b9c44abd1a3c3c3dae89080f3d889b510604af1a6555570d5dbe82
-MISC ChangeLog 7865 RMD160 e0e54b45570dbd39a9d3af6ce8116205383f2022 SHA1 316a94837853d8af22dfbf42b916f87edbfc1b27 SHA256 56c1cb4ff50b4c4cd0ba89eea72c747fd82d4316f60a9e20294b08edd2fce5dd
+MISC ChangeLog 8146 RMD160 1b4e6911795b2520ff8d2eb6528a929de350f0f6 SHA1 8d4e1ee0c543b9922bbcfa44561f28425d8d1e00 SHA256 3e2bfa89f135eb6112487900defac0deac39ef35058907a5b71553f4b5ec4dd5
MISC metadata.xml 392 RMD160 2ab4e8534884a8d887e0e619b5a2685b7a8b1a06 SHA1 e53462014fe3598699f7a86ceef1f28ec1f1c104 SHA256 bd4f44a5482232a527b27507b0d18e88358193360752722a0bd1aedef85a4732
diff --git a/mail-mta/nullmailer/files/mailer.conf b/mail-mta/nullmailer/files/mailer.conf
deleted file mode 100644
index 5e8f474bc723..000000000000
--- a/mail-mta/nullmailer/files/mailer.conf
+++ /dev/null
@@ -1,52 +0,0 @@
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/nullmailer/files/mailer.conf,v 1.5 2006/02/11 10:35:51 robbat2 Exp $
-# $OpenBSD: mailer.conf,v 1.3 2000/04/06 18:24:19 millert Exp $
-
-# Execute the "real" sendmail program from nullmailer
-# named /usr/sbin/sendmail.nullmailer
-sendmail /usr/sbin/sendmail.nullmailer
-send-mail /usr/sbin/sendmail.nullmailer
-mailq /usr/bin/mailq.nullmailer
-newaliases /bin/true
-
-
-# Execute the "real" sendmail program from exim,
-# named /usr/sbin/exim
-#
-#sendmail /usr/sbin/exim
-#send-mail /usr/sbin/exim
-#mailq /usr/sbin/exim
-#newaliases /usr/sbin/exim
-#rsmtp /usr/sbin/exim
-#rmail /usr/sbin/exim
-#mail /usr/sbin/exim
-
-# Execute the "real" sendmail program from nullmailer
-# named /usr/sbin/sendmail.nullmailer
-#sendmail /usr/sbin/sendmail.nullmailer
-#mailq /usr/bin/mailq.nullmailer
-
-# Execute the "real" sendmail program from postfix,
-# named /usr/sbin/sendmail.postfix
-#
-#sendmail /usr/sbin/sendmail.postfix
-#send-mail /usr/sbin/sendmail.postfix
-#mailq /usr/sbin/sendmail.postfix
-#newaliases /usr/sbin/sendmail.postfix
-
-# Execute the "real" sendmail program from ssmtp,
-# named /usr/sbin/ssmtp
-#
-#sendmail /usr/sbin/ssmtp
-#send-mail /usr/sbin/ssmtp
-#mailq /usr/sbin/ssmtp
-#newaliases /usr/sbin/ssmtp
-
-# Execute the "real" sendmail program, named /usr/sbin/sendmail
-#
-#sendmail /usr/sbin/sendmail.sendmail
-#send-mail /usr/sbin/sendmail.sendmail
-#mailq /usr/sbin/sendmail.sendmail
-#newaliases /usr/sbin/sendmail.sendmail
-#hoststat /usr/sbin/sendmail.sendmail
-#purgestat /usr/sbin/sendmail.sendmail
-
diff --git a/mail-mta/nullmailer/files/nullmailer-1.00-gcc34-fix.patch b/mail-mta/nullmailer/files/nullmailer-1.00-gcc34-fix.patch
deleted file mode 100644
index 15aa0e7fb3e3..000000000000
--- a/mail-mta/nullmailer/files/nullmailer-1.00-gcc34-fix.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- lib/fdbuf/fdobuf.h~ Sat Mar 5 01:12:32 2005
-+++ lib/fdbuf/fdobuf.h Sat Mar 5 01:12:53 2005
-@@ -17,6 +17,8 @@
- #ifndef FDBUF__FDOBUF__H__
- #define FDBUF__FDOBUF__H__
-
-+#include <pwd.h>
-+
- class fdobuf : protected fdbuf
- {
- public:
---- lib/list.h~ Sat Mar 5 01:16:28 2005
-+++ lib/list.h Sat Mar 5 01:13:35 2005
-@@ -18,8 +18,8 @@
- typedef list_node<T> node;
- typedef list_iterator<T> iter;
- typedef const_list_iterator<T> const_iter;
-- friend class iter;
-- friend class const_iter;
-+ friend class list_iterator<T>;;
-+ friend class const_list_iterator<T>;;
-
- list()
- : head(0), tail(0), cnt(0)
diff --git a/mail-mta/nullmailer/files/nullmailer-1.00-smtp-auth.patch b/mail-mta/nullmailer/files/nullmailer-1.00-smtp-auth.patch
deleted file mode 100644
index 23aa47837114..000000000000
--- a/mail-mta/nullmailer/files/nullmailer-1.00-smtp-auth.patch
+++ /dev/null
@@ -1,143 +0,0 @@
---- doc/nullmailer-send.8~ Sat Mar 5 10:13:38 2005
-+++ doc/nullmailer-send.8 Sat Mar 5 10:16:51 2005
-@@ -57,10 +57,11 @@
- The protocol name defaults to
- .IR smtp ,
- and may be followed by command-line arguments for that module.
--For example, to connect to port 2525 on your SMTP smart host, use:
-+For example, to connect to port 2525 on your SMTP smart host,
-+which also requires SMTP authentication, use:
-
- .EX
-- smarthost.dom smtp --port=2525
-+ smarthost.dom smtp --port=2525 --auth=user,pass
- .EE
-
- Blank lines and lines starting with a pound are ignored.
---- protocols/protocol.cc~ Sat Mar 5 09:38:23 2005
-+++ protocols/protocol.cc Sat Mar 5 09:39:42 2005
-@@ -30,10 +30,12 @@
- const char* cli_help_suffix = "";
- const char* cli_args_usage = "remote-address < mail-file";
- const int cli_args_min = 1;
--const int cli_args_max = 1;
-+const int cli_args_max = 2;
- cli_option cli_options[] = {
- { 'p', "port", cli_option::integer, 0, &port,
- "Set the port number on the remote host to connect to", 0 },
-+ { 'a', "auth", cli_option::string, 0, &auth,
-+ "Set the user and password for authentication (user,pass)", 0 },
- {0, 0, cli_option::flag, 0, 0, 0, 0}
- };
-
---- protocols/protocol.h~ Sat Mar 5 09:40:15 2005
-+++ protocols/protocol.h Sat Mar 5 09:40:46 2005
-@@ -8,6 +8,7 @@
-
- // This must be provided by the protocol, but will be set by the lib.
- extern int port;
-+extern char* auth;
-
- extern void protocol_prep(fdibuf* in);
- extern void protocol_send(fdibuf* in, int fd);
---- protocols/qmqp.cc~ Sat Mar 5 09:40:59 2005
-+++ protocols/qmqp.cc Sat Mar 5 09:41:21 2005
-@@ -31,6 +31,7 @@
- #include "protocol.h"
-
- int port = 628;
-+char* auth = "";
- const char* cli_program = "qmqp";
- const char* cli_help_prefix = "Send an emal message via QMQP\n";
-
---- protocols/smtp.cc~ Sat Mar 5 09:41:31 2005
-+++ protocols/smtp.cc Sat Mar 5 09:44:58 2005
-@@ -30,6 +30,7 @@
- #include "protocol.h"
-
- int port = 25;
-+char* auth = "";
- const char* cli_program = "smtp";
- const char* cli_help_prefix = "Send an email message via SMTP\n";
-
-@@ -136,6 +137,11 @@
- {
- }
-
-+void to64(char* infile, char* outfile);
-+void to64(const mystring& infile, mystring& outfile);
-+void output64chunk(int c1, int c2, int c3, int pads, char** outfile);
-+void output64chunk(int c1, int c2, int c3, int pads, mystring& outfile);
-+
- void protocol_send(fdibuf* in, int fd)
- {
- mystring hh = getenv("HELOHOST");
-@@ -143,5 +149,68 @@
- smtp conn(fd);
- conn.docmd("", 200);
- conn.docmd("HELO " + hh, 200);
-+
-+ if ( strlen(auth) > 0 )
-+ {
-+ mystring authstr = auth;
-+ mystring uname = authstr.left(authstr.find_first(','));
-+ mystring pass = authstr.sub(authstr.find_first(',')+1,authstr.length());
-+ mystring plain = uname + "\1" + uname + "\1" + pass;
-+ mystring encoded = "AUTH PLAIN ";
-+ to64(plain,encoded);
-+ conn.docmd(encoded,200);
-+ }
-+
- conn.send(in);
- }
-+
-+static char basis_64[] =
-+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-+
-+void to64(const mystring& infile, mystring& outfile)
-+{
-+ int c1, c2, c3;
-+ size_t inpos = 0;
-+ while ((c1 = infile[inpos++])) {
-+ c2 = infile[inpos++];
-+ if (!c2) {
-+ output64chunk(c1, 0, 0, 2, outfile);
-+ } else {
-+ c3 = infile[inpos++];
-+ if (!c3) {
-+ output64chunk(c1, c2, 0, 1, outfile);
-+ } else {
-+ output64chunk(c1, c2, c3, 0, outfile);
-+ }
-+ }
-+ }
-+}
-+
-+void output64chunk(int c1, int c2, int c3, int pads, mystring& outfile)
-+{
-+ if (c1==1) c1 = 0;
-+ if (c2==1) c2 = 0;
-+ if (c3==1) c3 = 0;
-+
-+ char out[5];
-+ out[0] = basis_64[c1>>2];
-+ out[1] = basis_64[((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4)];
-+ switch (pads)
-+ {
-+ case 0:
-+ out[2] = basis_64[((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6)];
-+ out[3] = basis_64[c3 & 0x3F];
-+ break;
-+ case 1:
-+ out[2] = basis_64[((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6)];
-+ out[3] = '=';
-+ break;
-+ case 2:
-+ out[2] = '=';
-+ out[3] = '=';
-+ break;
-+ };
-+ out[4] = 0;
-+ outfile += out;
-+}
-+
diff --git a/mail-mta/nullmailer/files/nullmailer-1.00-syslog.patch b/mail-mta/nullmailer/files/nullmailer-1.00-syslog.patch
deleted file mode 100644
index 33a6cdfb79cb..000000000000
--- a/mail-mta/nullmailer/files/nullmailer-1.00-syslog.patch
+++ /dev/null
@@ -1,301 +0,0 @@
-diff -NuarwbB nullmailer-1.00.orig/doc/nullmailer-send.8 nullmailer-1.00/doc/nullmailer-send.8
---- nullmailer-1.00.orig/doc/nullmailer-send.8 2005-06-01 20:47:27.000000000 -0700
-+++ nullmailer-1.00/doc/nullmailer-send.8 2005-06-01 20:47:59.000000000 -0700
-@@ -3,6 +3,7 @@
- nullmailer-send \- Send queued messages
- .SH SYNOPSIS
- .B nullmailer-send
-+.RB [ \-\-daemon ]\ [ \-\-syslog ]
- .SH DESCRIPTION
- This program is responsible for coordinating the transmission of
- messages that have been queued by
-@@ -37,6 +38,15 @@
- sleeps for a number of seconds specified by
- .B pausetime
- before retrying sending the contents of the queue.
-+.SH OPTIONS
-+.TP
-+.BR \-d ,\ \-\-daemon
-+Fork into the background, implies --syslog.
-+.TP
-+.BR \-s ,\ \-\-syslog
-+Use syslog for error and log messages.
-+With --daemon, syslog will be used exclusively, without --daemon,
-+syslog will be used additionally.
- .SH CONTROL FILES
- All the control files are reread each time the queue is run.
- .TP
-diff -NuarwbB nullmailer-1.00.orig/protocols/protocol.cc nullmailer-1.00/protocols/protocol.cc
---- nullmailer-1.00.orig/protocols/protocol.cc 2005-06-01 20:47:27.000000000 -0700
-+++ nullmailer-1.00/protocols/protocol.cc 2005-06-01 20:52:54.000000000 -0700
-@@ -22,11 +22,15 @@
- #include <config.h>
- #include <stdio.h>
- #include <stdlib.h>
-+#include <sys/syslog.h>
- #include "connect.h"
- #include "errcodes.h"
- #include "protocol.h"
- #include "cli++.h"
-
-+static int use_syslog = 0;
-+static int daemonize = 0;
-+
- const char* cli_help_suffix = "";
- const char* cli_args_usage = "remote-address < mail-file";
- const int cli_args_min = 1;
-@@ -36,23 +40,35 @@
- "Set the port number on the remote host to connect to", 0 },
- { 'a', "auth", cli_option::string, 0, &auth,
- "Set the user and password for authentication (user,pass)", 0 },
-+ { 'd', "daemon", cli_option::flag, 1, &daemonize, "use syslog exclusively ", 0 },
-+ { 's', "syslog", cli_option::flag, 1, &use_syslog, "use syslog additionally", 0 },
- {0, 0, cli_option::flag, 0, 0, 0, 0}
- };
-
- void protocol_fail(int e, const char* msg)
- {
-+ if (use_syslog)
-+ syslog(LOG_ERR, "%s: Failed: %s", cli_program, msg);
-+ if (!daemonize)
- ferr << cli_program << ": Failed: " << msg << endl;
- exit(e);
- }
-
- void protocol_succ(const char* msg)
- {
-+ if (use_syslog)
-+ syslog(LOG_ERR, "%s: Succeeded: %s", cli_program, msg);
-+ if (!daemonize)
- ferr << cli_program << ": Succeeded: " << msg << endl;
- exit(0);
- }
-
- int cli_main(int, char* argv[])
- {
-+ if (daemonize)
-+ use_syslog = 1;
-+ if (use_syslog)
-+ openlog("nullmailer", LOG_CONS | LOG_PID, LOG_MAIL);
- const char* remote = argv[0];
- fdibuf in(0, true);
- protocol_prep(&in);
-diff -NuarwbB nullmailer-1.00.orig/src/Makefile.in nullmailer-1.00/src/Makefile.in
---- nullmailer-1.00.orig/src/Makefile.in 2005-02-28 09:39:50.000000000 -0800
-+++ nullmailer-1.00/src/Makefile.in 2005-06-01 20:51:15.000000000 -0700
-@@ -65,7 +65,7 @@
- nullmailer_queue_DEPENDENCIES = ../lib/libnullmailer.a
- am_nullmailer_send_OBJECTS = send.$(OBJEXT)
- nullmailer_send_OBJECTS = $(am_nullmailer_send_OBJECTS)
--nullmailer_send_DEPENDENCIES = ../lib/libnullmailer.a
-+nullmailer_send_DEPENDENCIES = ../lib/cli++/libcli++.a ../lib/libnullmailer.a
- am_sendmail_OBJECTS = sendmail.$(OBJEXT)
- sendmail_OBJECTS = $(am_sendmail_OBJECTS)
- sendmail_DEPENDENCIES = ../lib/cli++/libcli++.a ../lib/libnullmailer.a
-@@ -173,13 +173,13 @@
- #noinst_PROGRAMS = address
- INCLUDES = -I../lib -I../lib/cli++
- mailq_SOURCES = mailq.cc
--mailq_LDADD = ../lib/libnullmailer.a
-+mailq_LDADD = ../lib/cli++/libcli++.a ../lib/libnullmailer.a
- nullmailer_inject_SOURCES = inject.cc
- nullmailer_inject_LDADD = ../lib/cli++/libcli++.a ../lib/libnullmailer.a
- nullmailer_queue_SOURCES = queue.cc
- nullmailer_queue_LDADD = ../lib/libnullmailer.a
- nullmailer_send_SOURCES = send.cc
--nullmailer_send_LDADD = ../lib/libnullmailer.a
-+nullmailer_send_LDADD = ../lib/cli++/libcli++.a ../lib/libnullmailer.a
- sendmail_SOURCES = sendmail.cc
- sendmail_LDADD = ../lib/cli++/libcli++.a ../lib/libnullmailer.a
- all: all-am
-diff -NuarwbB nullmailer-1.00.orig/src/send.cc nullmailer-1.00/src/send.cc
---- nullmailer-1.00.orig/src/send.cc 2005-02-28 09:48:54.000000000 -0800
-+++ nullmailer-1.00/src/send.cc 2005-06-01 20:47:59.000000000 -0700
-@@ -27,6 +27,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <sys/stat.h>
-+#include <sys/syslog.h>
- #include <sys/types.h>
- #include <sys/wait.h>
- #include <unistd.h>
-@@ -38,11 +39,27 @@
- #include "hostname.h"
- #include "itoa.h"
- #include "list.h"
-+#include "cli++/cli++.h"
-
- typedef list<mystring> slist;
-
--#define fail(MSG) do { ferr << MSG << endl; return false; } while(0)
--#define fail_sys(MSG) do{ ferr << MSG << strerror(errno) << endl; return false; }while(0)
-+static int use_syslog = 0;
-+static int daemonize = 0;
-+
-+const char* cli_program = "nullmailer-send";
-+const char* cli_help_prefix = "nullmailer daemon\n";
-+const char* cli_help_suffix = "";
-+const char* cli_args_usage = "";
-+const int cli_args_min = 0;
-+const int cli_args_max = 0;
-+cli_option cli_options[] = {
-+ { 'd', "daemon", cli_option::flag, 1, &daemonize, "daemonize , implies --syslog", 0 },
-+ { 's', "syslog", cli_option::flag, 1, &use_syslog, "use syslog", 0 },
-+ { 0, 0, cli_option::flag, 0, 0, 0, 0 }
-+};
-+
-+#define fail(MSG) do { if (use_syslog) syslog(LOG_ERR, "%s", MSG); if (!daemonize) ferr << MSG << endl; return false; } while (0)
-+#define fail_sys(MSG) do { if (use_syslog) syslog(LOG_ERR, "%s %s", MSG, strerror(errno)); if (!daemonize) ferr << MSG << strerror(errno) << endl; return false; } while (0)
-
- struct remote
- {
-@@ -141,6 +158,9 @@
- bool load_files()
- {
- reload_files = false;
-+ if (use_syslog)
-+ syslog(LOG_INFO, "Rescanning queue.");
-+ if (!daemonize)
- fout << "Rescanning queue." << endl;
- DIR* dir = opendir(".");
- if(!dir)
-@@ -159,12 +179,19 @@
-
- void exec_protocol(int fd, remote& remote)
- {
-- if(close(0) == -1 || dup2(fd, 0) == -1 || close(fd) == -1)
-+ if (!daemonize && close(STDIN_FILENO) < 0)
-+ return;
-+ if (fd != STDIN_FILENO)
-+ if (dup2(fd, STDIN_FILENO) < 0 || close(fd) < 0)
- return;
- mystring program = PROTOCOL_DIR + remote.proto;
-- const char* args[3+remote.options.count()];
-+ const char* args[5+remote.options.count()];
- unsigned i = 0;
- args[i++] = program.c_str();
-+ if (daemonize)
-+ args[i++] = "-d";
-+ if (use_syslog)
-+ args[i++] = "-s";
- for(slist::const_iter opt(remote.options); opt; opt++)
- args[i++] = strdup((*opt).c_str());
- args[i++] = remote.host.c_str();
-@@ -173,8 +200,8 @@
- }
-
- #undef fail
--#define fail(MSG) do { fout << MSG << endl; return false; } while(0)
--#define fail2(MSG1,MSG2) do{ fout << MSG1 << MSG2 << endl; return false; }while(0)
-+#define fail(MSG) do { if (use_syslog) syslog(LOG_ERR, "%s", MSG); if (!daemonize) fout << MSG << endl; return false; } while (0)
-+#define fail2(MSG1,MSG2) do { if (use_syslog) syslog(LOG_ERR, "%s %s", MSG1, MSG2); if (!daemonize) fout << MSG1 << MSG2 << endl; return false; } while (0)
-
- bool catchsender(pid_t pid)
- {
-@@ -187,6 +214,9 @@
- if(status)
- fail2("Sending failed: ", errorstr[status]);
- else {
-+ if (use_syslog)
-+ syslog(LOG_INFO, "Sent file.");
-+ if (!daemonize)
- fout << "Sent file." << endl;
- return true;
- }
-@@ -200,9 +230,16 @@
- {
- int fd = open(filename.c_str(), O_RDONLY);
- if(fd == -1) {
-+ if (use_syslog)
-+ syslog(LOG_ERR, "Can't open file '%s'", filename.c_str());
-+ if (!daemonize)
- fout << "Can't open file '" << filename << "'" << endl;
- return false;
- }
-+ if (use_syslog)
-+ syslog(LOG_INFO, "Starting delivery: protocol: %s host: %s file: %s",
-+ remote.proto.c_str(), remote.host.c_str(), filename.c_str());
-+ if (!daemonize)
- fout << "Starting delivery: protocol: " << remote.proto
- << " host: " << remote.host
- << " file: " << filename << endl;
-@@ -231,6 +268,9 @@
- fail("No remote hosts listed for delivery");
- if(files.count() == 0)
- return true;
-+ if (use_syslog)
-+ syslog(LOG_INFO, "Starting delivery, %d message(s) in queue.", files.count());
-+ if (!daemonize)
- fout << "Starting delivery, "
- << itoa(files.count()) << " message(s) in queue." << endl;
- for(rlist::iter remote(remotes); remote; remote++) {
-@@ -242,6 +282,9 @@
- file++;
- }
- }
-+ if (use_syslog)
-+ syslog(LOG_INFO, "Delivery complete, %d message(s) remain.", files.count());
-+ if (!daemonize)
- fout << "Delivery complete, "
- << itoa(files.count()) << " message(s) remain." << endl;
- return true;
-@@ -287,6 +330,9 @@
- int s = select(trigger+1, &readfds, 0, 0,
- (files.count() == 0) ? 0 : &timeout);
- if(s == 1) {
-+ if (use_syslog)
-+ syslog(LOG_INFO, "Trigger pulled.");
-+ if (!daemonize)
- fout << "Trigger pulled." << endl;
- read_trigger();
- reload_files = true;
-@@ -300,21 +346,46 @@
- return true;
- }
-
--int main(int, char*[])
-+int cli_main(int, char*[])
- {
- mystring hh;
-+ pid_t pid;
-+
-+ if (daemonize)
-+ use_syslog = 1;
-+ if (use_syslog)
-+ openlog("nullmailer", LOG_CONS | LOG_PID, LOG_MAIL);
-
- read_hostnames();
- if (!config_read("helohost", hh)) hh = me;
- setenv("HELOHOST", hh.c_str(), 1);
-
-- if(!open_trigger())
-+ if(!open_trigger()) {
-+ if (use_syslog)
-+ syslog(LOG_CRIT, "Could not open trigger.");
-+ if (!daemonize)
-+ ferr << "Could not open trigger." << endl;
- return 1;
-+ }
- if(chdir(QUEUE_MSG_DIR) == -1) {
-- fout << "Could not chdir to queue message directory." << endl;
-+ if (use_syslog)
-+ syslog(LOG_CRIT, "Could not chdir to queue message directory.");
-+ if (!daemonize)
-+ ferr << "Could not chdir to queue message directory." << endl;
- return 1;
- }
-
-+ if (daemonize) {
-+ if ((pid = fork()) < 0) {
-+ syslog(LOG_CRIT, "Could not fork.");
-+ return 1;
-+ }
-+ if (pid)
-+ return 0;
-+ close(STDIN_FILENO);
-+ close(STDOUT_FILENO);
-+ close(STDERR_FILENO);
-+ }
- signal(SIGALRM, catch_alrm);
- signal(SIGHUP, SIG_IGN);
- load_config();
diff --git a/mail-mta/nullmailer/files/remotes.sample b/mail-mta/nullmailer/files/remotes.sample
deleted file mode 100644
index ebcf5dc2cbe1..000000000000
--- a/mail-mta/nullmailer/files/remotes.sample
+++ /dev/null
@@ -1,17 +0,0 @@
-# Format is: HOST PROTOCOL [OPTIONS]
-# HOST = IP or DNS
-# PROTOCOL = smtp | qmtp
-# OPTIONS = [--port=NUMBER] [--auth=user,pass]
-#
-# Examples:
-# A standard SMTP server:
-# somesendmailserver.domain.com smtp
-#
-# A qmail server with QMQP setup:
-# someqmailserver.domain.com qmqp
-#
-# A nonstandard SMTP server setup:
-# someotherserver.domain.com smtp --port=2525
-#
-# As of 1.00, nullmailer also supports SMTP AUTH
-# mailserver smtp --auth=user,pass
diff --git a/mail-mta/nullmailer/nullmailer-1.00.ebuild b/mail-mta/nullmailer/nullmailer-1.00.ebuild
deleted file mode 100644
index 2b0c3308a60e..000000000000
--- a/mail-mta/nullmailer/nullmailer-1.00.ebuild
+++ /dev/null
@@ -1,127 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/nullmailer/nullmailer-1.00.ebuild,v 1.11 2007/10/28 14:05:21 phreak Exp $
-
-inherit eutils flag-o-matic
-
-MY_P="${P/_rc/RC}"
-S=${WORKDIR}/${MY_P}
-DESCRIPTION="Simple relay-only local mail transport agent"
-SRC_URI="http://untroubled.org/${PN}/${MY_P}.tar.gz"
-HOMEPAGE="http://untroubled.org/${PN}/"
-
-SLOT="0"
-LICENSE="GPL-2"
-KEYWORDS="x86 ~ppc"
-IUSE="mailwrapper"
-
-DEPEND="virtual/libc
- sys-apps/groff"
-RDEPEND="!mailwrapper? ( !virtual/mta )
- mailwrapper? ( >=net-mail/mailwrapper-0.2 )
- virtual/libc
- >=sys-process/supervise-scripts-3.2
- >=sys-process/daemontools-0.76-r1
- sys-apps/shadow
- virtual/logger"
-PROVIDE="virtual/mta"
-
-NULLMAILER_GROUP_NAME=nullmail
-NULLMAILER_GROUP_GID=88
-NULLMAILER_USER_NAME=nullmail
-NULLMAILER_USER_UID=88
-NULLMAILER_USER_SHELL=-1
-NULLMAILER_USER_GROUPS=nullmail
-NULLMAILER_USER_HOME=/var/nullmailer
-
-setupuser() {
- enewgroup ${NULLMAILER_GROUP_NAME} ${NULLMAILER_GROUP_GID}
- enewuser ${NULLMAILER_USER_NAME} ${NULLMAILER_USER_UID} ${NULLMAILER_USER_SHELL} ${NULLMAILER_USER_HOME} ${NULLMAILER_USER_GROUPS}
-}
-
-src_unpack() {
- unpack ${MY_P}.tar.gz
- EPATCH_OPTS="-d ${S} -p0" \
- epatch "${FILESDIR}/${P}-smtp-auth.patch" || die "SMTP auth patch failed"
- EPATCH_OPTS="-d ${S} -p1" \
- epatch "${FILESDIR}/${P}-syslog.patch" || die "syslog patch failed"
- EPATCH_OPTS="-d ${S} -p0" \
- epatch "${FILESDIR}/${P}-gcc34-fix.patch" || die "GCC-3.4 patch failed"
-}
-
-pkg_setup() {
- setupuser
-}
-
-src_compile() {
- append-ldflags $(bindnow-flags)
- # Note that we pass a different directory below due to bugs in the makefile!
- econf --localstatedir=/var || die "econf failed"
- emake || die "emake failed"
-}
-
-src_install () {
- einstall localstatedir=${D}/var/nullmailer || die "einstall failed"
- if use mailwrapper; then
- mv ${D}/usr/sbin/sendmail ${D}/usr/sbin/sendmail.nullmailer
- mv ${D}/usr/bin/mailq ${D}/usr/bin/mailq.nullmailer
- insinto /etc/mail
- doins ${FILESDIR}/mailer.conf
- fi
- dodoc AUTHORS BUGS COPYING HOWTO INSTALL NEWS README YEAR2000 TODO ChangeLog
- # A small bit of sample config
- insinto /etc/nullmailer
- newins ${FILESDIR}/remotes.sample remotes
- # daemontools stuff
- dodir /var/nullmailer/service{,/log}
- insinto /var/nullmailer/service
- newins scripts/nullmailer.run run
- fperms 700 /var/nullmailer/service/run
- insinto /var/nullmailer/service/log
- newins scripts/nullmailer-log.run run
- fperms 700 /var/nullmailer/service/log/run
- # usablity
- dodir /usr/lib
- dosym /usr/sbin/sendmail usr/lib/sendmail
- # permissions stuff
- keepdir /var/log/nullmailer /var/nullmailer/{tmp,queue}
- fperms 770 /var/log/nullmailer /var/nullmailer/{tmp,queue}
- fowners nullmail:nullmail /usr/sbin/nullmailer-queue /usr/bin/mailq
- fperms 4711 /usr/sbin/nullmailer-queue /usr/bin/mailq
- fowners nullmail:nullmail /var/log/nullmailer /var/nullmailer/{tmp,queue,trigger}
- fperms 660 /var/nullmailer/trigger
- msg_mailerconf
-}
-
-pkg_config() {
- [ ! -s /etc/nullmailer/me ] && /bin/hostname --fqdn >/etc/nullmailer/me
- [ ! -s /etc/nullmailer/defaultdomain ] && /bin/hostname --domain >/etc/nullmailer/defaultdomain
- msg_svscan
- msg_mailerconf
-}
-
-msg_svscan() {
- elog "To start nullmailer at boot you have to enable the /etc/init.d/svscan rc file"
- elog "and create the following link :"
- elog "ln -fs /var/nullmailer/service /service/nullmailer"
-}
-msg_mailerconf() {
- use mailwrapper && \
- ewarn "Please ensure you have selected nullmailer in your /etc/mailer.conf"
-}
-
-pkg_postinst() {
- setupuser
- # Do this again for good measure
- [ ! -e /var/nullmailer/trigger ] && mkfifo /var/nullmailer/trigger
- chown nullmail:nullmail /var/log/nullmailer /var/nullmailer/{tmp,queue,trigger}
- chmod 770 /var/log/nullmailer /var/nullmailer/{tmp,queue}
- chmod 660 /var/nullmailer/trigger
-
- use mailwrapper && dosym /usr/sbin/sendmail /usr/bin/mailq
-
- elog "To create an initial setup, please do:"
- elog "emerge --config =${CATEGORY}/${PF}"
- msg_svscan
- msg_mailerconf
-}