#include <pwd.h>
#include <errno.h>
#include <sys/types.h>
-#include <sys/time.h>
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
#include <sys/wait.h>
#include <ctype.h>
#include <string.h>
#include <limits.h>
-#include <time.h>
#include "citadel.h"
#include "server.h"
#include "sysdep_decls.h"
CtdlAllocUserData(SYM_SMTP_RECP, SIZ);
sprintf(SMTP_RECP, "%s", "");
- cprintf("220 Welcome to the Citadel/UX ESMTP server at %s\r\n",
- config.c_fqdn);
+ cprintf("220 %s ESMTP Citadel/UX server ready.\r\n", config.c_fqdn);
}
cprintf("250 Greetings and joyous salutations.\r\n");
}
else {
- cprintf("250-Greetings and joyous salutations.\r\n");
+ cprintf("250-Extended greetings and joyous salutations.\r\n");
cprintf("250-HELP\r\n");
cprintf("250-SIZE %ld\r\n", config.c_maxmsglen);
cprintf("250 AUTH=LOGIN\r\n");
* Implement HELP command.
*/
void smtp_help(void) {
- cprintf("214-Here's the frequency, Kenneth:\r\n");
+ cprintf("214-Commands accepted:\r\n");
cprintf("214- DATA\r\n");
cprintf("214- EHLO\r\n");
cprintf("214- EXPN\r\n");
cprintf("214- RCPT\r\n");
cprintf("214- RSET\r\n");
cprintf("214- VRFY\r\n");
- cprintf("214 I could tell you more, but then I'd have to kill you.\r\n");
+ cprintf("214 \r\n");
}
case rfc822_address_nonlocal:
if (SMTP->message_originated_locally == 0) {
- cprintf("551 Relaying denied\r\n");
+ cprintf("551 Third-party relaying denied.\r\n");
}
else {
cprintf("250 Remote recipient %s ok\r\n", recp);
CtdlFreeMessage(msg);
if (!retval) {
- cprintf("250 Message accepted for delivery.\r\n");
+ cprintf("250 ok terrific\r\n");
}
else {
cprintf("550 Internal delivery errors: %d\r\n", retval);
}
else {
- cprintf("502 I'm sorry Dave, I'm afraid I can't do that.\r\n");
+ cprintf("502 I'm afraid I can't do that.\r\n");
}
}
if (!strcasecmp(key, "retry")) {
/* double the retry interval after each attempt */
retry = extract_long(buf, 1) * 2L;
+ if (retry > SMTP_RETRY_MAX) {
+ retry = SMTP_RETRY_MAX;
+ }
remove_token(instr, i, '\n');
}
if (!strcasecmp(key, "attempted")) {
smtp_greeting,
smtp_command_loop);
- create_room(SMTP_SPOOLOUT_ROOM, 3, "", 0);
+ create_room(SMTP_SPOOLOUT_ROOM, 3, "", 0, 1);
CtdlRegisterSessionHook(smtp_do_queue, EVT_TIMER);
return "$Id$";
}