Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 94064 invoked from network); 3 Apr 2006 16:42:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Apr 2006 16:42:12 -0000 Received: (qmail 5376 invoked by uid 500); 3 Apr 2006 16:42:10 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 5327 invoked by uid 500); 3 Apr 2006 16:42:09 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 5315 invoked by uid 99); 3 Apr 2006 16:42:09 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Apr 2006 09:42:09 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 03 Apr 2006 09:42:08 -0700 Received: (qmail 93566 invoked by uid 65534); 3 Apr 2006 16:41:09 -0000 Message-ID: <20060403164109.93457.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: cvs@httpd.apache.org From: rian@apache.org X-Mailer: svnmailer-1.0.7 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 #include #include +#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; }