[1384] in Moira
Re: reject addresses ending in @
daemon@ATHENA.MIT.EDU (Robert A Basch)
Mon Feb 21 17:32:55 2000
Message-Id: <200002212232.RAA43819@aupair.mit.edu>
To: Garry Zacheiss <zacheiss@MIT.EDU>
cc: Jonathon Weiss <jweiss@MIT.EDU>, moiradev@MIT.EDU
In-Reply-To: Your message of "Mon, 21 Feb 2000 00:39:46 EST."
<200002210539.AAA13960@e40-spare-ss20.mit.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Date: Mon, 21 Feb 2000 17:32:51 -0500
From: Robert A Basch <rbasch@MIT.EDU>
> ! com_err(whoami, 0, "No hostname in address \"%s\".", address);
Note that address points to the original passed-in argument, which may
contain multiple addresses. So, doing:
Foreign PO Box for this user? rbasch@, rbasch@foo.com
will produce the following diagnostic:
moira: No hostname in address "rbasch@, rbasch@foo.com".
Since we know at this point that nothing except whitespace follows the at
sign, why not just cheat a little and append the at sign to the stripped
address:
Index: pobox.c
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/moiradev/repository/moira/clients/
lib/pobox.c,v
retrieving revision 1.2
diff -c -r1.2 pobox.c
*** pobox.c 2000/02/21 21:16:32 1.2
--- pobox.c 2000/02/21 22:18:32
***************
*** 62,68 ****
}
else
{
! com_err(whoami, 0, "No hostname in address \"%s\".", address);
status = MRCL_REJECT;
goto cleanup;
}
--- 62,68 ----
}
else
{
! com_err(whoami, 0, "No hostname in address \"%s@\".", p);
status = MRCL_REJECT;
goto cleanup;
}