oldphase = phase;
phase = LISTENER_WAIT;
+ set_timeout(ctl->server.timeout);
for (idp = ctl->smtphunt; idp; idp = idp->next)
{
char *cp;
const char *portnum = SMTP_PORT;
- set_timeout(ctl->server.timeout);
ctl->smtphost = idp->id; /* remember last host tried. */
if (ctl->smtphost[0]=='/')
{
* so it's safest not to assume the socket will still be good.
*/
smtp_close(ctl, 0);
- set_timeout(ctl->server.timeout);
/* if opening for ESMTP failed, try SMTP */
if (ctl->smtphost[0]=='/')
for (dp = after, sp = before; (*dp = *sp); dp++, sp++) {
if (sp[0] != '%') continue;
+ if (sp > before && sp[-1] == '\'') {
+ report(stderr, GT_("MDA option contains single-quoted %%%c expansion.\n"), sp[1]);
+ report(stderr, GT_("Refusing to deliver. Check the manual and fix your mda option.\n"));
+ free(before);
+ free(after);
+ if (from) free(from);
+ if (names) free(names);
+ return PS_SYNTAX;
+ }
+
/* need to expand? BTW, no here overflow, because in
** the worst case (end of string) sp[1] == '\0' */
if (sp[1] == 's' || sp[1] == 'T') {