[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
smtpserver/router server init call problem
[zmailer-2.99.42 on DEC Unix 4.0]
I encountered an interesting problem this evening. While fooling around
with the smtpserver calls to the router, I noticed strange behavior.
When smtpserver uses the router "server" function, it starts by calling
server with key="init" with two arguments: a host name (potentially from
the HELO command?) and the IP address of the socket. These are the
same two values that end up on the "rcvdfrom" line in the router
control file. The second argument is at least fairly reliable and I hope
to use it as the basis of my filtering.
So the problem: the IP address is passed in brackets (""), just as it is
in the router control file. Somewhere along the line, this gets evaluated
as a "test" command in zmsh. It returns a value of ".". So, instead of getting:
in $* or $@,I get:
which is not very useful.
Escaping the open bracket fixed the problem. Diff follows sig.
Tim DiLauro Milton S. Eisenhower Library
Library Systems Jack Johns Hopkins University
(410) 516-5263 3400 N. Charles Street
firstname.lastname@example.org Baltimore, MD 21218
--- smtpserver.c Thu Apr 3 01:22:04 1997
+++ smtpserver.c.orig Mon Nov 18 02:55:20 1996
@@ -2488,7 +2488,7 @@
if (rhostname[strlen(rhostname)-1] == '\\')
rhostname[strlen(rhostname)-1] = '?';
- fprintf(tofp, "PS1='%s' ; %s %s '%s' '\\%s'\n", promptbuf,
+ fprintf(tofp, "PS1='%s' ; %s %s '%s' '%s'\n", promptbuf,
ROUTER_SERVER, RKEY_INIT, rhostname, ihostaddr);