return (0);
} else if (res == -2) {
/*
- * If the return code is -2, then then the login attempt failed,
+ * If the return code is -2, then then the login attempt failed,
* do not try other login mechanisms
*/
return (1);
int port;
int error = 1, smarthost = 0;
- host = strrchr(it->addr, '@');
- /* Should not happen */
- if (host == NULL) {
- snprintf(errmsg, sizeof(errmsg), "Internal error: badly formed address %s",
- it->addr);
- return(-1);
- } else {
- /* Step over the @ */
- host++;
- }
-
port = SMTP_PORT;
/* Smarthost support? */
port = config.port;
syslog(LOG_INFO, "using smarthost (%s:%i)", host, port);
smarthost = 1;
+ } else {
+ host = strrchr(it->addr, '@');
+ /* Should not happen */
+ if (host == NULL) {
+ snprintf(errmsg, sizeof(errmsg), "Internal error: badly formed address %s",
+ it->addr);
+ return(-1);
+ } else {
+ /* Step over the @ */
+ host++;
+ }
}
error = dns_get_mx_list(host, port, &hosts, smarthost);