From 892703a4397f69602e0ff7e955ec3c31296fea01 Mon Sep 17 00:00:00 2001
From: Sergey Poznyakoff <gray@gnu.org.ua>
Date: Thu, 5 Nov 2009 18:48:47 +0200
Subject: [PATCH] Minor fixes

* doc/README.tex: Document the discard mailer.
* smar/mtinit.c (smar_mt_init): Allow for @ in LHS.
---
 doc/README.tex |    5 +++++
 smar/mtinit.c  |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/doc/README.tex b/doc/README.tex
index c22c20f..dd85195 100644
--- a/doc/README.tex
+++ b/doc/README.tex
@@ -2222,6 +2222,7 @@ RHS	& ::= &  [[ port "\verb|^|" ] ["{\tt esmtp:}"]] hosts
 	$|$ port "\verb|^|"{\tt lmtp:}" hosts \\
     & & $|$ "\{" ["protocol" "=" "esmtp" ";"] [portdef] hostdef "\}" \\
     & & $|$ "\{" "protocol" "=" "lmtp" ";" [portdef hostdef] "\}" \\
+    & & $|$ "{\tt discard:}" \\
 port	& ::= &  integer \\
 hosts & ::= & hostname  $|$ iplist \\
 iplist & ::= &  "[" IPv4-address "]" [ " " iplist ] \\
@@ -2244,6 +2245,9 @@ consisting of an optional port number,
 an optional ({\tt esmtp}) protocol
 and a hostname or a list of IPv4 addreses (in square brackets)
 which are separated by spaces.
+
+The special ``protocol'' {\tt discard} means that all data sent
+to the LHS will be silently discarded.
 \end{itemize}
 
 If LMTP should be used, then the {\tt lmtp} protocol must be selected.
@@ -2262,6 +2266,7 @@ Example:
 {\tt
 \begin{tabular}{ll}
 localhost           & lmtp:	\\
+null@localhost      & discard:  \\
 SPAM.FILTER.DOMAIN  & \{ port=2525; protocol=esmtp; ipv4=\{127.0.0.1\} \}	\\
 LMTPHOST.MY.DOMAIN  & \{ protocol=lmtp; port = 525; ipv4= \{ 10.11.12.13 \} \}	\\
 MY.DOMAIN           & esmtp:[10.1.2.3]	\\
diff --git a/smar/mtinit.c b/smar/mtinit.c
index fda4f5b..d55388d 100644
--- a/smar/mtinit.c
+++ b/smar/mtinit.c
@@ -70,7 +70,7 @@ smar_mt_init(smar_ctx_P smar_ctx)
 		else
 		{
 			while ((c = sm_io_getc(fp)) != SM_IO_EOF &&
-				(ISALNUM(c) || c == '.' || c == '-'
+				(ISALNUM(c) || c == '.' || c == '-' || c == '@'
 				 || (c == '[' && i == 0) || (c == ']' && i > 0)))
 			{
 				hn[i++] = (char) c;
-- 
1.6.0.3

