config.features |= INSECURE;
else if (strcmp(word, "FULLBOUNCE") == 0 && data == NULL)
config.features |= FULLBOUNCE;
+ else if (strcmp(word, "NULLCLIENT") == 0 && data == NULL)
+ config.features |= NULLCLIENT;
else {
errlogx(1, "syntax error in %s:%d", config_path, lineno);
/* NOTREACHED */
}
}
+ if ((config.features & NULLCLIENT) && config.smarthost == NULL) {
+ errlogx(1, "%s: NULLCLIENT requires SMARTHOST", config_path);
+ /* NOTREACHED */
+ }
+
fclose(conf);
}
.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd April 22, 2010
+.Dd February 13, 2014
.Dt DMA 8
.Os
.Sh NAME
will send all mails as
.Ql Sm off Va username @percolator .
.Sm on
+.It Ic NULLCLIENT Xo
+.Xc
+Bypass aliases and local delivery, and instead forward all mails to
+the defined
+.Sq SMARTHOST .
+.Sq NULLCLIENT
+requires
+.Sq SMARTHOST
+to be set.
.El
.Ss Environment variables
The behavior of
}
}
LIST_INSERT_HEAD(&queue->queue, it, next);
- if (strrchr(it->addr, '@') == NULL) {
+
+ /**
+ * Do local delivery if there is no @.
+ * Do not do local delivery when NULLCLIENT is set.
+ */
+ if (strrchr(it->addr, '@') == NULL && (config.features & NULLCLIENT) == 0) {
it->remote = 0;
if (expand) {
aliased = do_alias(queue, it->addr);
# MASQUERADE john@ on host "hamlet" will send all mails as john@hamlet
# MASQUERADE percolator will send mails as $username@percolator, e.g. fish@percolator
# MASQUERADE herb@ert will send all mails as herb@ert
+
+# Directly forward the mail to the SMARTHOST bypassing aliases and local delivery
+#NULLCLIENT
#define INSECURE 0x020 /* Allow plain login w/o encryption */
#define FULLBOUNCE 0x040 /* Bounce the full message */
#define TLS_OPP 0x080 /* Opportunistic STARTTLS */
+#define NULLCLIENT 0x100 /* Nullclient support */
#ifndef CONF_PATH
#error Please define CONF_PATH