X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/f2753d64be0a74a22018e03ec9c04cc9ca45d3ab..fc5b73a4b95c03c2c81b04ee8c819471b66de52d:/uip/sendsbr.c diff --git a/uip/sendsbr.c b/uip/sendsbr.c index 64a1ed68..2d4d0a86 100644 --- a/uip/sendsbr.c +++ b/uip/sendsbr.c @@ -24,7 +24,9 @@ #ifdef OAUTH_SUPPORT #include #endif +#include "../sbr/m_maildir.h" #include "../sbr/m_mktemp.h" +#include "../sbr/message_id.h" #ifdef OAUTH_SUPPORT static int setup_oauth_params(char *[], int *, const char *, const char **); @@ -535,7 +537,7 @@ alert (char *file, int out) if ((in = open (file, O_RDONLY)) == NOTOK) { admonish (file, "unable to re-open"); } else { - lseek (out, (off_t) 0, SEEK_END); + lseek(out, 0, SEEK_END); strncpy (buf, "\nMessage not delivered to anyone.\n", sizeof(buf)); if (write (out, buf, strlen (buf)) < 0) { advise (file, "write"); @@ -554,7 +556,7 @@ alert (char *file, int out) admonish (buf, "unable to rename %s to", file); } } - lseek (out, (off_t) 0, SEEK_SET); + lseek(out, 0, SEEK_SET); dup2 (out, fileno (stdin)); close (out); /* create subject for error notification */ @@ -712,7 +714,7 @@ annoaux (int fd) goto oops; } - lseek (fd, (off_t) 0, SEEK_SET); + lseek(fd, 0, SEEK_SET); if ((fp = fdopen (fd, "r")) == NULL) { if (debugsw) inform("unable to fdopen annotation list, continuing..."); @@ -885,8 +887,7 @@ get_from_header_info(const char *filename, const char **addr, const char **host, /* Use the hostformat that corresponds to the successful addrformat. */ if ((*host = get_message_header_info(in, hostformat)) == NULL) { - fclose(in); - *message = "unable to find sender host in"; + *message = "unable to find sender host"; fclose(in); return NOTOK; }