- /* null-pad to allow some lazy compares */
- buf[strlen(buf)+1] = 0;
- buf[strlen(buf)+2] = 0;
- buf[strlen(buf)+3] = 0;
-
- if (!strncasecmp(buf, "QUIT", 4)) {
- printf("221 Later, dude.\n");
- }
- else if (!strncasecmp(buf, "HELP", 4)) {
- printf("214 You think _you_ need help?\n");
- }
- else if (!strncasecmp(buf, "HELO", 4)) {
- printf("250 Howdy ho, Mr. Hankey!\n");
- }
- else if (!strncasecmp(buf, "MAIL", 4)) {
- printf("250 Sure, whatever...\n");
- }
-
-
- else if (!strncasecmp(buf, "RCPT To: ", 9)) {
- if (strlen(recp) > 0) {
- printf("571 Multiple recipients not supported.\n");
- }
- else {
- strcpy(recp, &buf[9]);
- if (haschar(recp, ',')) {
- printf("571 Multiple recipients not supported.\n");
- strcpy(recp, "");
- }
- else {
- syslog(LOG_NOTICE,"recp: %s",recp);
- for (a=0; a<2; ++a) {
- alias(recp);
- }
-
- /* did we alias it back to a remote address? */
- if ( (haschar(recp,'%'))
- || (haschar(recp,'@'))
- || (haschar(recp,'!')) ) {