httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r391080 - in /httpd/mod_smtpd/trunk/src: Makefile.am smtp_bouncer.c smtp_protocol.c smtp_util.c
Date Mon, 03 Apr 2006 16:40:20 GMT
Author: rian
Date: Mon Apr  3 09:40:17 2006
New Revision: 391080

URL: http://svn.apache.org/viewcvs?rev=391080&view=rev
Log:
removed unportable mx record resolving, fixed bouncing logic, removed bug
in bouncing code.

Modified:
    httpd/mod_smtpd/trunk/src/Makefile.am
    httpd/mod_smtpd/trunk/src/smtp_bouncer.c
    httpd/mod_smtpd/trunk/src/smtp_protocol.c
    httpd/mod_smtpd/trunk/src/smtp_util.c

Modified: httpd/mod_smtpd/trunk/src/Makefile.am
URL: http://svn.apache.org/viewcvs/httpd/mod_smtpd/trunk/src/Makefile.am?rev=391080&r1=391079&r2=391080&view=diff
==============================================================================
--- httpd/mod_smtpd/trunk/src/Makefile.am (original)
+++ httpd/mod_smtpd/trunk/src/Makefile.am Mon Apr  3 09:40:17 2006
@@ -1,7 +1,7 @@
 mod_smtpd_la_SOURCES = smtp_core.c smtp_filters.c smtp_protocol.c smtp_util.c \
 smtp_bouncer.c smtp.h smtp_filters.h 
 mod_smtpd_la_LDFLAGS = @APREQ2_LIBS@ -rpath ${AP_LIBEXECDIR} \
--module -avoid-version -lresolv -lbind
+-module -avoid-version
 
 include_HEADERS = mod_smtpd.h
 mod_LTLIBRARIES = mod_smtpd.la

Modified: httpd/mod_smtpd/trunk/src/smtp_bouncer.c
URL: http://svn.apache.org/viewcvs/httpd/mod_smtpd/trunk/src/smtp_bouncer.c?rev=391080&r1=391079&r2=391080&view=diff
==============================================================================
--- httpd/mod_smtpd/trunk/src/smtp_bouncer.c (original)
+++ httpd/mod_smtpd/trunk/src/smtp_bouncer.c Mon Apr  3 09:40:17 2006
@@ -72,7 +72,7 @@
                                          scr->envelope->headers);
         /* duplicate file */
         apr_file_name_get(&file_name, scr->envelope->tfp);
-        new_file_name = apr_pstrcat(bd->pool, file_name, "-2");
+        new_file_name = apr_pstrcat(bd->pool, file_name, "-2", NULL);
         
         do {
             apr_err = apr_file_copy(file_name, new_file_name,

Modified: httpd/mod_smtpd/trunk/src/smtp_protocol.c
URL: http://svn.apache.org/viewcvs/httpd/mod_smtpd/trunk/src/smtp_protocol.c?rev=391080&r1=391079&r2=391080&view=diff
==============================================================================
--- httpd/mod_smtpd/trunk/src/smtp_protocol.c (original)
+++ httpd/mod_smtpd/trunk/src/smtp_protocol.c Mon Apr  3 09:40:17 2006
@@ -519,18 +519,18 @@
     apr_table_do(smtpd_count_unqueued, &amount_unqueued,
                  scr->envelope->rcpt_to, NULL);
 
-    if (amount_unqueued > 0) {
-        ap_log_error(APLOG_MARK, APLOG_INFO, 0, scr->s,
-                     "[mod_smtpd] Not all recipients were queued in message "
-                     "from %s.", scr->envelope->mail_from);
-        smtpd_bounce_unqueued(scr);
-    }
-
     /* we don't bounce any messages if all of them
        were unqueued, we just report failure to deliver */
     if (amount_unqueued == rcpts->nelts) {
         smtpd_respond_oneline(scr, 550, "Message could not be delivered");
     } else {
+        if (amount_unqueued > 0) {
+            ap_log_error(APLOG_MARK, APLOG_INFO, 0, scr->s,
+                         "Not all recipients were queued in message "
+                         "from %s.", scr->envelope->mail_from);
+            smtpd_bounce_unqueued(scr);
+        }
+
         smtpd_respond_msgs(scr, 220, "Queued", scr->queued_greeting);
     }
 }

Modified: httpd/mod_smtpd/trunk/src/smtp_util.c
URL: http://svn.apache.org/viewcvs/httpd/mod_smtpd/trunk/src/smtp_util.c?rev=391080&r1=391079&r2=391080&view=diff
==============================================================================
--- httpd/mod_smtpd/trunk/src/smtp_util.c (original)
+++ httpd/mod_smtpd/trunk/src/smtp_util.c Mon Apr  3 09:40:17 2006
@@ -76,15 +76,17 @@
     smtpd_run_on_reset_envelope(scr);
     smtpd_clear_envelope_rec(scr);
 }
-
+#if 0
 #include <netinet/in.h>
 #include <arpa/nameser.h>
 #include <resolv.h>
+#endif
 
 SMTPD_DECLARE_NONSTD(apr_status_t)
 smtpd_get_mailex(apr_pool_t *pool, /* out */ char **resolved_host,
                  char *original_host) 
 {
+#if 0
     /* res_search hack, too dependent */
     unsigned char buf[NS_PACKETSZ];
     ns_msg handle;
@@ -130,6 +132,8 @@
                        ns_rr_rdata(rr) + 2,
                        *resolved_host,
                        MAXDNAME);
+#endif
+    *resolved_host = apr_pstrdup(pool, original_host);
 
     return APR_SUCCESS;
 }



Mime
View raw message