| |||||||||||||||||||||||||||||||
|
[ Charset ISO-8859-1 unsupported, converting... ] > Hi, > Thanks, the name was nothing special, so I have updated it, and I > realised changing the resp->code was doing nothing as it is not kept, > so I dropped it. I fixed the comment style too. I feel its probably > better to only bounce an auth failure, as we might want to know about > those other failures... My only concern would be if some mailservers > returned unreliable error codes? I have attached an updated patch that > still looks for a 535 error, but I am willing to go with whatever will > get the change incoporated upstream, as it makes the maintainance of > several mailservers much easier. The old version of the patch had been > thoroughly tested - but these changes should not affect functionality. I'll adopt this and then ignore the 35 portion of 535. > I also have a question... can I get bounces to take a different route? No. There are gazillion ways mail can fail. Making the bounce path error-dependent would suck up development cycles until the end of time. Wietse > For example if this new feature (smtp_sasl_auth_soft_bounce) is not > enabled, the bounce messages go nowhere (as they are sent back to the > same relay - where the authentication fails again). Effectively I want > any soft failure from the relayhost to cause a mail to be queued and a > hard failure to cause the bounce message to be sent directly, or via > another relay. Is this currently possible? > > Regards > Keean Schupke, Fry-IT Ltd. > > Here is the patch (v2): > > diff -r -U5 postfix-2.4.5.orig/src/global/mail_params.h > postfix-2.4.5/src/global/mail_params.h > --- postfix-2.4.5.orig/src/global/mail_params.h 2007-07-11 > 00:47:45.000000000 +0100 > +++ postfix-2.4.5/src/global/mail_params.h 2007-11-20 > 15:30:16.000000000 +0000 > @@ -1421,10 +1421,14 @@ > */ > #define VAR_SMTP_SASL_ENABLE "smtp_sasl_auth_enable" > #define DEF_SMTP_SASL_ENABLE 0 > extern bool var_smtp_sasl_enable; > > +#define VAR_SMTP_SASL_AUTH_SOFT_BOUNCE "smtp_sasl_auth_soft_bounce" > +#define DEF_SMTP_SASL_AUTH_SOFT_BOUNCE 0 > +extern bool var_smtp_sasl_auth_soft_bounce; > + > #define VAR_SMTP_SASL_PASSWD "smtp_sasl_password_maps" > #define DEF_SMTP_SASL_PASSWD "" > extern char *var_smtp_sasl_passwd; > > #define VAR_SMTP_SASL_OPTS "smtp_sasl_security_options" > @@ -1516,10 +1520,14 @@ > */ > #define VAR_LMTP_SASL_ENABLE "lmtp_sasl_auth_enable" > #define DEF_LMTP_SASL_ENABLE 0 > extern bool var_lmtp_sasl_enable; > > +#define VAR_LMTP_SASL_AUTH_SOFT_BOUNCE "lmtp_sasl_auth_soft_bounce" > +#define DEF_LMTP_SASL_AUTH_SOFT_BOUNCE 0 > +extern bool var_lmtp_sasl_auth_soft_bounce; > + > #define VAR_LMTP_SASL_PASSWD "lmtp_sasl_password_maps" > #define DEF_LMTP_SASL_PASSWD "" > extern char *var_lmtp_sasl_passwd; > > #define VAR_LMTP_SASL_OPTS "lmtp_sasl_security_options" > diff -r -U5 postfix-2.4.5.orig/src/smtp/smtp_params.c > postfix-2.4.5/src/smtp/smtp_params.c > --- postfix-2.4.5.orig/src/smtp/smtp_params.c 2006-10-05 > 17:37:40.000000000 +0100 > +++ postfix-2.4.5/src/smtp/smtp_params.c 2007-11-20 > 15:27:49.000000000 +0000 > @@ -86,10 +86,11 @@ > VAR_IGN_MX_LOOKUP_ERR, DEF_IGN_MX_LOOKUP_ERR, &var_ign_mx_lookup_err, > VAR_SKIP_QUIT_RESP, DEF_SKIP_QUIT_RESP, &var_skip_quit_resp, > VAR_SMTP_ALWAYS_EHLO, DEF_SMTP_ALWAYS_EHLO, &var_smtp_always_ehlo, > VAR_SMTP_NEVER_EHLO, DEF_SMTP_NEVER_EHLO, &var_smtp_never_ehlo, > VAR_SMTP_SASL_ENABLE, DEF_SMTP_SASL_ENABLE, &var_smtp_sasl_enable, > + VAR_SMTP_SASL_AUTH_SOFT_BOUNCE, > DEF_SMTP_SASL_AUTH_SOFT_BOUNCE, &var_smtp_sasl_auth_soft_bounce, > VAR_SMTP_RAND_ADDR, DEF_SMTP_RAND_ADDR, &var_smtp_rand_addr, > VAR_SMTP_QUOTE_821_ENV, DEF_SMTP_QUOTE_821_ENV, &var_smtp_quote_821_env, > VAR_SMTP_DEFER_MXADDR, DEF_SMTP_DEFER_MXADDR, &var_smtp_defer_mxaddr, > VAR_SMTP_SEND_XFORWARD, DEF_SMTP_SEND_XFORWARD, &var_smtp_send_xforward, > VAR_SMTP_CACHE_DEMAND, DEF_SMTP_CACHE_DEMAND, &var_smtp_cache_demand, > diff -r -U5 postfix-2.4.5.orig/src/smtp/smtp_sasl_glue.c > postfix-2.4.5/src/smtp/smtp_sasl_glue.c > --- postfix-2.4.5.orig/src/smtp/smtp_sasl_glue.c 2006-07-19 > 21:03:31.000000000 +0100 > +++ postfix-2.4.5/src/smtp/smtp_sasl_glue.c 2007-11-20 > 16:06:42.000000000 +0000 > @@ -338,10 +338,15 @@ > > /* > * We completed the authentication protocol. > */ > if (resp->code / 100 != 2) { > + /* begin: KPS20071120 - fix: SASL auth soft bounce */ > + if (var_smtp_sasl_auth_soft_bounce && resp->code == 535) { > + STR(resp->dsn_buf)[0] = '4'; > + } > + /* end: KPS20071120 - fix: SASL auth soft bounce */ > dsb_update(why, resp->dsn, DSB_DEF_ACTION, > DSB_MTYPE_DNS, session->host, > var_procname, resp->str, > "SASL authentication failed; server %s said: %s", > session->namaddr, resp->str); > >
| ||||||||||||||||||||||||||||||
© 2004-2008 readlist.com