]>
Commit | Line | Data |
---|---|---|
2568882e JR |
1 | diff -ur postfix-2.4.5/src/smtpd/smtpd.c postfix-2.4.5-proxy/src/smtpd/smtpd.c |
2 | --- postfix-2.4.5/src/smtpd/smtpd.c 2007-09-11 00:27:31.181567626 +0200 | |
3 | +++ postfix-2.4.5-proxy/src/smtpd/smtpd.c 2007-09-11 00:26:54.177444169 +0200 | |
ce5d3fb8 | 4 | @@ -2526,7 +2526,9 @@ |
2568882e JR |
5 | int out_error; |
6 | char **cpp; | |
ce5d3fb8 ER |
7 | const CLEANUP_STAT_DETAIL *detail; |
8 | - const char *rfc3848_sess; | |
2568882e JR |
9 | + VSTRING *proxy_why = 0; |
10 | + int proxy_code; | |
ce5d3fb8 ER |
11 | + const char *rfc3848_sess; |
12 | const char *rfc3848_auth; | |
2568882e JR |
13 | |
14 | #ifdef USE_TLS | |
2568882e | 15 | @@ -2705,8 +2707,19 @@ |
642652f5 | 16 | if (state->err == CLEANUP_STAT_OK) { |
a9621843 | 17 | (void) proxy->cmd(state, SMTPD_PROX_WANT_ANY, "."); |
642652f5 | 18 | if (state->err == CLEANUP_STAT_OK && |
a9621843 JR |
19 | - *STR(proxy->buffer) != '2') |
20 | + *STR(proxy->buffer) != '2') { | |
642652f5 | 21 | state->err = CLEANUP_STAT_CONT; |
2568882e | 22 | + proxy_why = vstring_alloc(10); |
a9621843 | 23 | + vstring_strncpy(proxy_why, STR(proxy->buffer), 3); |
2568882e JR |
24 | + if (alldig(STR(proxy_why))) |
25 | + proxy_code = atol(STR(proxy_why)); | |
26 | + else | |
27 | + proxy_code = 554; | |
a9621843 | 28 | + vstring_strncpy(proxy_why, STR(proxy->buffer)+4, 5); |
afe23fca | 29 | + smtpd_check_reject(state, MAIL_ERROR_POLICY, proxy_code, STR(proxy_why), |
a9621843 | 30 | + "%s", STR(proxy->buffer)); |
2568882e | 31 | + vstring_free(proxy_why); |
642652f5 | 32 | + } |
a9621843 JR |
33 | } |
34 | } | |
35 | ||
0a41a8cf | 36 | --- postfix-2.6.1/src/smtpd/smtpd_check.c.orig 2009-05-25 19:29:43.159923869 +0200 |
37 | +++ postfix-2.6.1/src/smtpd/smtpd_check.c 2009-05-25 19:31:30.299567709 +0200 | |
38 | @@ -386,7 +386,7 @@ | |
2568882e JR |
39 | * mail. |
40 | */ | |
0a41a8cf | 41 | static int PRINTFLIKE(5, 6) defer_if(SMTPD_DEFER *, int, int, const char *, const char *,...); |
2568882e JR |
42 | -static int PRINTFLIKE(5, 6) smtpd_check_reject(SMTPD_STATE *, int, int, const char *, const char *,...); |
43 | +int PRINTFLIKE(5, 6) smtpd_check_reject(SMTPD_STATE *, int, int, const char *, const char *,...); | |
44 | ||
45 | #define DEFER_IF_REJECT2(state, class, code, dsn, fmt, a1, a2) \ | |
46 | defer_if(&(state)->defer_if_reject, (class), (code), (dsn), (fmt), (a1), (a2)) | |
0a41a8cf | 47 | @@ -758,7 +758,7 @@ |
642652f5 JR |
48 | |
49 | /* smtpd_check_reject - do the boring things that must be done */ | |
50 | ||
51 | -static int smtpd_check_reject(SMTPD_STATE *state, int error_class, | |
52 | +int smtpd_check_reject(SMTPD_STATE *state, int error_class, | |
df1cfd1e JR |
53 | int code, const char *dsn, |
54 | const char *format,...) | |
642652f5 | 55 | { |
2568882e JR |
56 | diff -ur postfix-2.4.5/src/smtpd/smtpd_check.h postfix-2.4.5-proxy/src/smtpd/smtpd_check.h |
57 | --- postfix-2.4.5/src/smtpd/smtpd_check.h 2007-09-11 00:27:30.414953649 +0200 | |
58 | +++ postfix-2.4.5-proxy/src/smtpd/smtpd_check.h 2007-09-11 00:10:33.808156052 +0200 | |
642652f5 JR |
59 | @@ -25,6 +25,7 @@ |
60 | extern char *smtpd_check_data(SMTPD_STATE *); | |
61 | extern char *smtpd_check_eod(SMTPD_STATE *); | |
62 | extern char *smtpd_check_policy(SMTPD_STATE *, char *); | |
2568882e | 63 | +extern int smtpd_check_reject(SMTPD_STATE *state, int error_class, int code, const char *dsn, const char *format,...); |
642652f5 JR |
64 | |
65 | /* LICENSE | |
66 | /* .ad |