]> git.pld-linux.org Git - packages/postfix.git/commitdiff
- updated to 2.4.5 functionality
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 10 Sep 2007 22:42:36 +0000 (22:42 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    postfix-log-proxy-rejects.patch -> 1.4

postfix-log-proxy-rejects.patch

index 1fdca09bb3844d36e6cf52d3f90936e4dc1ac5de..1cd2378a18ae8132737b79c9eea07035a137424e 100644 (file)
@@ -1,21 +1,49 @@
---- postfix-2.2.3/src/smtpd/smtpd.c~   2005-09-08 15:51:27.479075120 +0200
-+++ postfix-2.2.3/src/smtpd/smtpd.c    2005-09-08 17:28:05.934984184 +0200
-@@ -2076,8 +2076,11 @@
+diff -ur postfix-2.4.5/src/smtpd/smtpd.c postfix-2.4.5-proxy/src/smtpd/smtpd.c
+--- postfix-2.4.5/src/smtpd/smtpd.c    2007-09-11 00:27:31.181567626 +0200
++++ postfix-2.4.5-proxy/src/smtpd/smtpd.c      2007-09-11 00:26:54.177444169 +0200
+@@ -2452,6 +2452,8 @@
+     int     out_error;
+     char  **cpp;
+     CLEANUP_STAT_DETAIL *detail;
++    VSTRING *proxy_why = 0;
++    int     proxy_code;
+ #ifdef USE_TLS
+     VSTRING *peer_CN;
+@@ -2705,8 +2707,19 @@
        if (state->err == CLEANUP_STAT_OK) {
            (void) smtpd_proxy_cmd(state, SMTPD_PROX_WANT_ANY, ".");
            if (state->err == CLEANUP_STAT_OK &&
 -              *STR(state->proxy_buffer) != '2')
 +              *STR(state->proxy_buffer) != '2') {
                state->err = CLEANUP_STAT_CONT;
-+              smtpd_check_reject(state, MAIL_ERROR_POLICY,
++              proxy_why = vstring_alloc(10);
++              vstring_strncpy(proxy_why, STR(state->proxy_buffer), 3);
++              if (alldig(STR(proxy_why)))
++                      proxy_code = atol(STR(proxy_why));
++              else
++                      proxy_code = 554;
++              vstring_strncpy(proxy_why, STR(state->proxy_buffer)+4, 5);
++              smtpd_check_reject(state, MAIL_ERROR_POLICY, proxy_code, proxy_why,
 +                                      "%s", STR(state->proxy_buffer));
++              vstring_free(proxy_why);
 +          }
        } else if (state->err != CLEANUP_STAT_SIZE) {
            state->err |= CLEANUP_STAT_PROXY;
            detail = cleanup_stat_detail(CLEANUP_STAT_PROXY);
---- postfix-2.2.3/src/smtpd/smtpd_check.c~     2005-09-08 15:51:27.482074664 +0200
-+++ postfix-2.2.3/src/smtpd/smtpd_check.c      2005-09-08 17:28:05.192097120 +0200
-@@ -764,7 +764,7 @@
+diff -ur postfix-2.4.5/src/smtpd/smtpd_check.c postfix-2.4.5-proxy/src/smtpd/smtpd_check.c
+--- postfix-2.4.5/src/smtpd/smtpd_check.c      2007-09-11 00:27:30.414953649 +0200
++++ postfix-2.4.5-proxy/src/smtpd/smtpd_check.c        2007-09-11 00:10:33.804822948 +0200
+@@ -378,7 +378,7 @@
+   * mail.
+   */
+ static void PRINTFLIKE(5, 6) defer_if(SMTPD_DEFER *, int, int, const char *, const char *,...);
+-static int PRINTFLIKE(5, 6) smtpd_check_reject(SMTPD_STATE *, int, int, const char *, const char *,...);
++int PRINTFLIKE(5, 6) smtpd_check_reject(SMTPD_STATE *, int, int, const char *, const char *,...);
+ #define DEFER_IF_REJECT2(state, class, code, dsn, fmt, a1, a2) \
+     defer_if(&(state)->defer_if_reject, (class), (code), (dsn), (fmt), (a1), (a2))
+@@ -759,7 +759,7 @@
  
  /* smtpd_check_reject - do the boring things that must be done */
  
                                      int code, const char *dsn,
                                      const char *format,...)
  {
---- postfix-2.2.3/src/smtpd/smtpd_check.h~     2005-09-08 15:51:27.483074512 +0200
-+++ postfix-2.2.3/src/smtpd/smtpd_check.h      2005-09-08 17:29:17.952035928 +0200
+diff -ur postfix-2.4.5/src/smtpd/smtpd_check.h postfix-2.4.5-proxy/src/smtpd/smtpd_check.h
+--- postfix-2.4.5/src/smtpd/smtpd_check.h      2007-09-11 00:27:30.414953649 +0200
++++ postfix-2.4.5-proxy/src/smtpd/smtpd_check.h        2007-09-11 00:10:33.808156052 +0200
 @@ -25,6 +25,7 @@
  extern char *smtpd_check_data(SMTPD_STATE *);
  extern char *smtpd_check_eod(SMTPD_STATE *);
  extern char *smtpd_check_policy(SMTPD_STATE *, char *);
-+extern int smtpd_check_reject(SMTPD_STATE *state, int error_class, int code, const char *dsn, char *format,...);
++extern int smtpd_check_reject(SMTPD_STATE *state, int error_class, int code, const char *dsn, const char *format,...);
  
  /* LICENSE
  /* .ad
This page took 0.101789 seconds and 4 git commands to generate.