Feature: SASL support for the LMTP client. Recent CYRUS
software requires this for Postfix over TCP sockets.
This was just a cloning operation.
+
+20010120
+
+ Bugfix: the 20001005 revised fallback_relay support caused
+ Postfix to send mail to the fallback even when the local
+ machine was an MX host for the final destination. Result:
+ mailer loop. Found by Laurent Wacrenier (teaser.fr). Files:
+ smtp/smtp_connect.c, smtp/smtp_addr.c.
* When locking a mailbox, how often to try and how long to wait.
*/
#define VAR_FLOCK_TRIES "deliver_lock_attempts"
-#define DEF_FLOCK_TRIES 5
+#define DEF_FLOCK_TRIES 10
extern int var_flock_tries;
#define VAR_FLOCK_DELAY "deliver_lock_delay"
* Version of this program.
*/
#define VAR_MAIL_VERSION "mail_version"
-#define DEF_MAIL_VERSION "Release-20010119"
+#define DEF_MAIL_VERSION "Release-20010120"
extern char *var_mail_version;
/* LICENSE
*/
extern SMTP_SESSION *smtp_connect(char *, VSTRING *);
extern SMTP_SESSION *smtp_connect_host(char *, unsigned, VSTRING *);
-extern SMTP_SESSION *smtp_connect_domain(char *, unsigned, VSTRING *);
+extern SMTP_SESSION *smtp_connect_domain(char *, unsigned, VSTRING *, int *);
/*
* smtp_proto.c
/* SYNOPSIS
/* #include "smtp_addr.h"
/*
-/* DNS_RR *smtp_domain_addr(name, why)
+/* DNS_RR *smtp_domain_addr(name, why, found_myself)
/* char *name;
/* VSTRING *why;
+/* int *found_myself;
/*
/* DNS_RR *smtp_host_addr(name, why)
/* char *name;
/* smtp_domain_addr - mail exchanger address lookup */
-DNS_RR *smtp_domain_addr(char *name, VSTRING *why)
+DNS_RR *smtp_domain_addr(char *name, VSTRING *why, int *found_myself)
{
DNS_RR *mx_names;
DNS_RR *addr_list = 0;
- DNS_RR *self;
+ DNS_RR *self = 0;
unsigned best_pref;
unsigned best_found;
/*
* Clean up.
*/
+ *found_myself = (self != 0);
return (addr_list);
}
* Internal interfaces.
*/
extern DNS_RR *smtp_host_addr(char *, VSTRING *);
-extern DNS_RR *smtp_domain_addr(char *, VSTRING *);
+extern DNS_RR *smtp_domain_addr(char *, VSTRING *, int *);
/* LICENSE
/* .ad
/* smtp_connect_domain - connect to smtp server for domain */
-SMTP_SESSION *smtp_connect_domain(char *name, unsigned port, VSTRING *why)
+SMTP_SESSION *smtp_connect_domain(char *name, unsigned port, VSTRING *why,
+ int *found_myself)
{
SMTP_SESSION *session = 0;
DNS_RR *addr_list;
* the primary MX host is reachable but does not want to receive our
* mail, there is no point in trying the backup hosts.
*/
- addr_list = smtp_domain_addr(name, why);
+ addr_list = smtp_domain_addr(name, why, found_myself);
for (addr = addr_list; addr; addr = addr->next) {
if ((session = smtp_connect_addr(addr, port, why)) != 0) {
session->best = (addr->pref == addr_list->pref);
char *save;
char *dest;
char *cp;
+ int found_myself;
/*
* First try to deliver to the indicated destination, then try to deliver
if (var_disable_dns || *dest == '[') {
session = smtp_connect_host(host, port, why);
} else {
- session = smtp_connect_domain(host, port, why);
+ session = smtp_connect_domain(host, port, why, &found_myself);
}
myfree(dest_buf);
* is the best MX relay for the destination. Agreed, an errno of OK
* after failure is a weird way to reporting progress.
*/
- if (session != 0 || smtp_errno == SMTP_OK)
+ if (session != 0 || smtp_errno == SMTP_OK || found_myself)
break;
}