aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--fetchmail.c4
-rw-r--r--sink.c5
3 files changed, 8 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 4946c690..420fd6b7 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@
fetchmail-4.7.2 ():
* Don't append the destination address to a postmaster name containing @.
+* Added John Summerfield's getfetchmail script.
+* Minor fixes in bouncemail format.
There are 246 people on fetchmail-friends and 329 on fetchmail-announce.
diff --git a/fetchmail.c b/fetchmail.c
index 66f5043b..1bdccaa2 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -217,7 +217,9 @@ int main (int argc, char **argv)
/* set up to do lock protocol */
#define FETCHMAIL_PIDFILE "fetchmail.pid"
- xalloca(tmpbuf, char *, strlen(home) + strlen(FETCHMAIL_PIDFILE) + 3);
+ xalloca(tmpbuf, char *, !getuid?
+ (strlen(PID_DIR) + strlen(FETCHMAIL_PIDFILE) + 2):
+ (strlen(home) + strlen(FETCHMAIL_PIDFILE) + 3));
if (!getuid())
sprintf(tmpbuf, "%s/%s", PID_DIR, FETCHMAIL_PIDFILE);
else {
diff --git a/sink.c b/sink.c
index e98630e3..c7e476b6 100644
--- a/sink.c
+++ b/sink.c
@@ -288,7 +288,7 @@ static int send_bouncemail(struct msgblk *msg,
SockPrintf(sock, "From: FETCHMAIL-DAEMON@%s\r\n", fetchmailhost);
SockPrintf(sock, "To: %s\n", msg->return_path);
SockPrintf(sock, "MIME-Version: 1.0\r\n");
- SockPrintf(sock, "Content-Type: multipart/report; report-type=delivery-status boundary=\"%s\"\r\n", boundary);
+ SockPrintf(sock, "Content-Type: multipart/report; report-type=delivery-status; boundary=\"%s\"\r\n", boundary);
SockPrintf(sock, "\r\n");
SockPrintf(sock, "Content-Transfer-Encoding: 7bit\r\n");
SockPrintf(sock, "\r\n");
@@ -299,6 +299,7 @@ static int send_bouncemail(struct msgblk *msg,
SockPrintf(sock, "\r\n");
SockWrite(sock, message, strlen(message));
SockPrintf(sock, "\r\n");
+ SockPrintf(sock, "\r\n");
if (nerrors)
{
@@ -307,7 +308,7 @@ static int send_bouncemail(struct msgblk *msg,
SockPrintf(sock,"Content-Type: message/delivery-status\r\n");
SockPrintf(sock, "\r\n");
for (i = 0; i < nerrors; i++)
- SockPrintf(sock, errors[i]);
+ SockPrintf(sock, "%s\r\n", errors[i]);
SockPrintf(sock, "\r\n");
}