httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From soc-r...@apache.org
Subject svn commit: r290222 - in /httpd/mod_smtpd/trunk/modules: ./ access/rbl/ auth/ misc/ misc/mod_smtpd_rcpt_ok/ queue/ queue/mod_smtpd_queue_postfix/ queue/postfix/ rcpt/ rcpt/ok/ vrfy/ vrfy/regex/
Date Mon, 19 Sep 2005 18:05:37 GMT
Author: soc-rian
Date: Mon Sep 19 11:05:31 2005
New Revision: 290222

URL: http://svn.apache.org/viewcvs?rev=290222&view=rev
Log:
Modules directory update: Addition of a simple build system, plus some directory renames.

Added:
    httpd/mod_smtpd/trunk/modules/Makefile
    httpd/mod_smtpd/trunk/modules/auth/Makefile
    httpd/mod_smtpd/trunk/modules/misc/Makefile
    httpd/mod_smtpd/trunk/modules/queue/Makefile
    httpd/mod_smtpd/trunk/modules/queue/postfix/
      - copied from r290212, httpd/mod_smtpd/trunk/modules/queue/mod_smtpd_queue_postfix/
    httpd/mod_smtpd/trunk/modules/queue/postfix/Makefile
    httpd/mod_smtpd/trunk/modules/rcpt/
    httpd/mod_smtpd/trunk/modules/rcpt/ok/
      - copied from r290212, httpd/mod_smtpd/trunk/modules/misc/mod_smtpd_rcpt_ok/
    httpd/mod_smtpd/trunk/modules/rcpt/ok/Makefile
    httpd/mod_smtpd/trunk/modules/vrfy/
    httpd/mod_smtpd/trunk/modules/vrfy/regex/
    httpd/mod_smtpd/trunk/modules/vrfy/regex/Makefile
    httpd/mod_smtpd/trunk/modules/vrfy/regex/mod_smtpd_vrfy_regex.c
Removed:
    httpd/mod_smtpd/trunk/modules/access/rbl/Makefile.in
    httpd/mod_smtpd/trunk/modules/misc/mod_smtpd_rcpt_ok/
    httpd/mod_smtpd/trunk/modules/queue/mod_smtpd_queue_postfix/
Modified:
    httpd/mod_smtpd/trunk/modules/queue/postfix/mod_smtpd_queue_postfix.c

Added: httpd/mod_smtpd/trunk/modules/Makefile
URL: http://svn.apache.org/viewcvs/httpd/mod_smtpd/trunk/modules/Makefile?rev=290222&view=auto
==============================================================================
--- httpd/mod_smtpd/trunk/modules/Makefile (added)
+++ httpd/mod_smtpd/trunk/modules/Makefile Mon Sep 19 11:05:31 2005
@@ -0,0 +1,7 @@
+BUILD_SUBDIRS=access auth misc queue rcpt vrfy
+
+all: make-all-subdir
+clean: make-clean-subdir
+install: make-install-subdir
+
+include ../recurbuild.mk

Added: httpd/mod_smtpd/trunk/modules/auth/Makefile
URL: http://svn.apache.org/viewcvs/httpd/mod_smtpd/trunk/modules/auth/Makefile?rev=290222&view=auto
==============================================================================
--- httpd/mod_smtpd/trunk/modules/auth/Makefile (added)
+++ httpd/mod_smtpd/trunk/modules/auth/Makefile Mon Sep 19 11:05:31 2005
@@ -0,0 +1,7 @@
+BUILD_SUBDIRS=
+
+all: make-all-subdir
+clean: make-clean-subdir
+install: make-clean-install
+
+include ../../recurbuild.mk

Added: httpd/mod_smtpd/trunk/modules/misc/Makefile
URL: http://svn.apache.org/viewcvs/httpd/mod_smtpd/trunk/modules/misc/Makefile?rev=290222&view=auto
==============================================================================
--- httpd/mod_smtpd/trunk/modules/misc/Makefile (added)
+++ httpd/mod_smtpd/trunk/modules/misc/Makefile Mon Sep 19 11:05:31 2005
@@ -0,0 +1,7 @@
+BUILD_SUBDIRS=
+
+all: make-all-subdir
+clean: make-clean-subdir
+install: make-install-subdir
+
+include ../../recurbuild.mk

Added: httpd/mod_smtpd/trunk/modules/queue/Makefile
URL: http://svn.apache.org/viewcvs/httpd/mod_smtpd/trunk/modules/queue/Makefile?rev=290222&view=auto
==============================================================================
--- httpd/mod_smtpd/trunk/modules/queue/Makefile (added)
+++ httpd/mod_smtpd/trunk/modules/queue/Makefile Mon Sep 19 11:05:31 2005
@@ -0,0 +1,7 @@
+BUILD_SUBDIRS=postfix smtp
+
+all: make-all-subdir
+clean: make-clean-subdir
+install: make-install-subdir
+
+include ../../recurbuild.mk

Added: httpd/mod_smtpd/trunk/modules/queue/postfix/Makefile
URL: http://svn.apache.org/viewcvs/httpd/mod_smtpd/trunk/modules/queue/postfix/Makefile?rev=290222&view=auto
==============================================================================
--- httpd/mod_smtpd/trunk/modules/queue/postfix/Makefile (added)
+++ httpd/mod_smtpd/trunk/modules/queue/postfix/Makefile Mon Sep 19 11:05:31 2005
@@ -0,0 +1,19 @@
+include ../../../include.mk
+
+CFLAGS=-Wall
+APXSFLAGS=
+SRCS=mod_smtpd_queue_postfix.c
+
+all: mod_smtpd_queue_postfix.la
+
+mod_smtpd_queue_postfix.la: $(SRCS)
+	$(APXS) -Wc,"$(CFLAGS)" $(APXSFLAGS) -o \
+	mod_smtpd_queue_postfix.la -c $(SRCS)
+
+install: all
+	$(APXS) -i -a mod_smtpd_queue_postfix.la
+
+clean-objs:
+	rm -rf *.lo *.o *.slo *~ *.la .libs
+
+clean: clean-objs

Modified: httpd/mod_smtpd/trunk/modules/queue/postfix/mod_smtpd_queue_postfix.c
URL: http://svn.apache.org/viewcvs/httpd/mod_smtpd/trunk/modules/queue/postfix/mod_smtpd_queue_postfix.c?rev=290222&r1=290212&r2=290222&view=diff
==============================================================================
--- httpd/mod_smtpd/trunk/modules/queue/postfix/mod_smtpd_queue_postfix.c (original)
+++ httpd/mod_smtpd/trunk/modules/queue/postfix/mod_smtpd_queue_postfix.c Mon Sep 19 11:05:31
2005
@@ -1,6 +1,9 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/un.h>
+#include <sys/uio.h>
+#include <fcntl.h>
+#include <unistd.h>
 
 #include "httpd.h"
 #include "http_config.h"
@@ -42,7 +45,7 @@
 static int open_cleanup(const char *cleanup_path)
 {
     struct sockaddr_un cleanup_sockaddr;
-    int fd, rv, servlen;
+    int fd, rv;
     
     rv = socket(AF_UNIX, SOCK_STREAM, 0);
     if (rv < 0)
@@ -153,6 +156,8 @@
     char stack_buf[1024];
     sprintf(stack_buf, "%s: %s", key, val);
     print_msg_line((int)fd, stack_buf);
+
+    return 1;
 }
 
 smtpd_retcode postfix_queue(smtpd_conn_rec *scr, smtpd_return_data *out)
@@ -236,7 +241,7 @@
 
     if (status_int) {
         *((char **)apr_array_push(out->msgs)) =
-          apr_psprintf(out->p, "Unable to queue message ($status, $reason)",
+          apr_psprintf(out->p, "Unable to queue message (%s, %s",
                        status, reason);
         return SMTPD_DECLINED;
     }

Added: httpd/mod_smtpd/trunk/modules/rcpt/ok/Makefile
URL: http://svn.apache.org/viewcvs/httpd/mod_smtpd/trunk/modules/rcpt/ok/Makefile?rev=290222&view=auto
==============================================================================
--- httpd/mod_smtpd/trunk/modules/rcpt/ok/Makefile (added)
+++ httpd/mod_smtpd/trunk/modules/rcpt/ok/Makefile Mon Sep 19 11:05:31 2005
@@ -0,0 +1,19 @@
+include ../../../include.mk
+
+CFLAGS=-Wall
+APXSFLAGS=
+SRCS=mod_smtpd_rcpt_ok.c
+
+all: mod_smtpd_rcpt_ok.la
+
+mod_smtpd_rcpt_ok.la: $(SRCS)
+	$(APXS) -Wc,"$(CFLAGS)" $(APXSFLAGS) -o \
+	mod_smtpd_rcpt_ok.la -c $(SRCS)
+
+install: all
+	$(APXS) -i -a mod_smtpd_rcpt_ok.la
+
+clean-objs:
+	rm -rf *.lo *.o *.slo *~ *.la .libs
+
+clean: clean-objs

Added: httpd/mod_smtpd/trunk/modules/vrfy/regex/Makefile
URL: http://svn.apache.org/viewcvs/httpd/mod_smtpd/trunk/modules/vrfy/regex/Makefile?rev=290222&view=auto
==============================================================================
--- httpd/mod_smtpd/trunk/modules/vrfy/regex/Makefile (added)
+++ httpd/mod_smtpd/trunk/modules/vrfy/regex/Makefile Mon Sep 19 11:05:31 2005
@@ -0,0 +1,19 @@
+include ../../../include.mk
+
+CFLAGS=-Wall
+APXSFLAGS=
+SRCS=mod_smtpd_vrfy_regex.c
+
+all: mod_smtpd_vrfy_regex.la
+
+mod_smtpd_vrfy_regex.la: $(SRCS)
+	$(APXS) -Wc,"$(CFLAGS)" $(APXSFLAGS) -o \
+	mod_smtpd_vrfy_regex.la -c $(SRCS)
+
+install: all
+	$(APXS) -i -a mod_smtpd_vrfy_regex.la
+
+clean-objs:
+	rm -rf *.lo *.o *.slo *~ *.la .libs
+
+clean: clean-objs

Added: httpd/mod_smtpd/trunk/modules/vrfy/regex/mod_smtpd_vrfy_regex.c
URL: http://svn.apache.org/viewcvs/httpd/mod_smtpd/trunk/modules/vrfy/regex/mod_smtpd_vrfy_regex.c?rev=290222&view=auto
==============================================================================
--- httpd/mod_smtpd/trunk/modules/vrfy/regex/mod_smtpd_vrfy_regex.c (added)
+++ httpd/mod_smtpd/trunk/modules/vrfy/regex/mod_smtpd_vrfy_regex.c Mon Sep 19 11:05:31 2005
@@ -0,0 +1,47 @@
+#include "httpd.h"
+#include "http_config.h"
+#include "ap_regex.h"
+
+#include "mod_smtpd.h"
+
+smtpd_retcode
+default_vrfy(smtpd_conn_rec *scr, smtpd_return_data *out, char *address) {
+  ap_regex_t *compiled;
+  int error;
+  char *rexp = "^[-a-zA-Z0-9!#\\$%&'\\*\\+\\/=\\?\\^_`\\{\\}\\|~]+"
+    "(\\.[-a-zA-Z0-9!#\\$%&'\\*\\+\\/=\\?\\^_`\\{\\}\\|~]+)*@"
+    "[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?"
+    "(\\.[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?)*$";
+ 
+  /* just check if the email address is syntactically correct */
+  /* we use out->p because it gets cleared after each smtp command */
+  compiled = ap_pregcomp(out->p, rexp,
+			 AP_REG_EXTENDED | AP_REG_NOSUB);
+
+  /* out of memory close connection */
+  if (!compiled) {
+    smtpd_respond_oneline(scr, 421, "Error: Internal");
+    return SMTPD_DONE_DISCONNECT;
+  }
+
+  error = ap_regexec(compiled, address, 0, NULL, 0);
+  ap_pregfree(out->p, compiled);
+  
+  return (error) ? SMTPD_DENY : SMTPD_DECLINED;
+}
+
+static void
+register_hooks (apr_pool_t *p)
+{
+  APR_OPTIONAL_HOOK(smtpd, vrfy, default_vrfy, NULL, NULL, APR_HOOK_FIRST);
+}
+
+module AP_MODULE_DECLARE_DATA smtpd_vrfy_regex_module = {
+  STANDARD20_MODULE_STUFF,
+  NULL,                       /* create per-directory config structure */
+  NULL,                       /* merge per-directory config structures */
+  NULL,
+  NULL,                       /* merge per-server config structures */
+  NULL,
+  register_hooks              /* register hooks */
+};



Mime
View raw message