-/* $OpenBSD: mta.c,v 1.221 2018/07/25 16:00:48 eric Exp $ */
+/* $OpenBSD: mta.c,v 1.222 2018/08/22 10:11:43 eric Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
return;
}
+ if (relayh.flags & RELAY_AUTH && dispatcher->u.remote.auth == NULL) {
+ log_warnx("warn: No auth table on action \"%s\" for relay %s",
+ evp->dispatcher, smarthost);
+ m_create(p_queue, IMSG_MTA_DELIVERY_TEMPFAIL, 0, 0, -1);
+ m_add_evpid(p_queue, evp->id);
+ m_add_string(p_queue, "No auth table for relaying");
+ m_add_int(p_queue, ESC_OTHER_STATUS);
+ m_close(p_queue);
+ return;
+ }
+
relay = mta_relay(evp, &relayh);
/* ignore if we don't know the limits yet */
if (relay->limits &&