diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2008-07-14 03:52:03 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2008-07-14 03:52:03 +0000 |
commit | b8f3b674865f9543547aab415f4dd6b3cb64d405 (patch) | |
tree | d070f3472a7cb0971a54dba73edbf04cc17ad615 /mail-mta/nullmailer | |
parent | Do not use append-ldflags to add libraries, per bug #226913. (diff) | |
download | gentoo-2-b8f3b674865f9543547aab415f4dd6b3cb64d405.tar.gz gentoo-2-b8f3b674865f9543547aab415f4dd6b3cb64d405.tar.bz2 gentoo-2-b8f3b674865f9543547aab415f4dd6b3cb64d405.zip |
Clean up old version and files.
(Portage version: 2.2_rc1/cvs/Linux 2.6.26-rc4-00103-g1beee8d x86_64)
Diffstat (limited to 'mail-mta/nullmailer')
-rw-r--r-- | mail-mta/nullmailer/ChangeLog | 9 | ||||
-rw-r--r-- | mail-mta/nullmailer/files/mailer.conf | 52 | ||||
-rw-r--r-- | mail-mta/nullmailer/files/nullmailer-1.00-gcc34-fix.patch | 24 | ||||
-rw-r--r-- | mail-mta/nullmailer/files/nullmailer-1.00-smtp-auth.patch | 143 | ||||
-rw-r--r-- | mail-mta/nullmailer/files/nullmailer-1.00-syslog.patch | 301 | ||||
-rw-r--r-- | mail-mta/nullmailer/files/remotes.sample | 17 | ||||
-rw-r--r-- | mail-mta/nullmailer/nullmailer-1.00.ebuild | 127 |
7 files changed, 8 insertions, 665 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/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 -} |