}
if (sock < 0) {
- *status = 3; /* dsn is already filled in */
+ *status = 4; /* dsn is already filled in */
return;
}
/* Process the SMTP greeting from the server */
if (sock_gets(sock, buf) < 0) {
- *status = 3;
+ *status = 4;
strcpy(dsn, "Connection broken during SMTP conversation");
sock_close(sock);
return;
lprintf(9, "%s\n", buf);
if (buf[0] != '2') {
if (buf[0] == '4') {
- *status = 3;
+ *status = 4;
strcpy(dsn, &buf[4]);
sock_close(sock);
return;
sprintf(buf, "HELO %s", config.c_fqdn);
sock_puts(sock, buf);
if (sock_gets(sock, buf) < 0) {
- *status = 3;
+ *status = 4;
strcpy(dsn, "Connection broken during SMTP conversation");
sock_close(sock);
return;
lprintf(9, "%s\n", buf);
if (buf[0] != '2') {
if (buf[0] == '4') {
- *status = 3;
+ *status = 4;
strcpy(dsn, &buf[4]);
sock_close(sock);
return;
/* HELO succeeded, now try the MAIL From: command */
- sprintf(buf, "MAIL From: ajc@uncnsrd.mt-kisco.ny.us"); /* FIX */
+ sprintf(buf, "MAIL From: FIX@uncnsrd.mt-kisco.ny.us"); /* FIX */
sock_puts(sock, buf);
if (sock_gets(sock, buf) < 0) {
- *status = 3;
+ *status = 4;
strcpy(dsn, "Connection broken during SMTP conversation");
sock_close(sock);
return;
lprintf(9, "%s\n", buf);
if (buf[0] != '2') {
if (buf[0] == '4') {
- *status = 3;
+ *status = 4;
strcpy(dsn, &buf[4]);
sock_close(sock);
return;
sprintf(buf, "RCPT To: %s", addr);
sock_puts(sock, buf);
if (sock_gets(sock, buf) < 0) {
- *status = 3;
+ *status = 4;
strcpy(dsn, "Connection broken during SMTP conversation");
sock_close(sock);
return;
lprintf(9, "%s\n", buf);
if (buf[0] != '2') {
if (buf[0] == '4') {
- *status = 3;
+ *status = 4;
strcpy(dsn, &buf[4]);
sock_close(sock);
return;
/* RCPT succeeded, now try the DATA command */
sock_puts(sock, "DATA");
if (sock_gets(sock, buf) < 0) {
- *status = 3;
+ *status = 4;
strcpy(dsn, "Connection broken during SMTP conversation");
sock_close(sock);
return;
CtdlOutputMsg(msgnum, MT_RFC822, 0, 0, NULL, sock, 1);
sock_puts(sock, ".");
if (sock_gets(sock, buf) < 0) {
- *status = 3;
+ *status = 4;
strcpy(dsn, "Connection broken during SMTP conversation");
sock_close(sock);
return;
lprintf(9, "%s\n", buf);
if (buf[0] != '2') {
if (buf[0] == '4') {
- *status = 3;
+ *status = 4;
strcpy(dsn, &buf[4]);
sock_close(sock);
return;
delivered. The third parameter may contain any of the following values:
0 = No delivery has yet been attempted
2 = Delivery was successful
- 3 = A transient error was experienced ... try again later
+ 4 = A transient error was experienced ... try again later
5 = Delivery to this address failed permanently. The error message
should be placed in the fourth field so that a bounce message may
be generated.