--- rfcparse.c 2000/12/13 13:19:24 1.1
+++ rfcparse.c 2000/12/13 15:35:14 1.2
@@ -1,19 +1,29 @@
/*
- * $Source: /v/ossp/cvs/ossp-pkg/petidomo/rfcparse.c,v $
- * $Revision: 1.1 $
- * $Date: 2000/12/13 13:19:24 $
- *
- * Copyright (C) 1996 by CyberSolutions GmbH.
- * All rights reserved.
- */
+ $Source: /v/ossp/cvs/ossp-pkg/petidomo/rfcparse.c,v $
+ $Revision: 1.2 $
+
+ Copyright (C) 2000 by CyberSolutions GmbH, Germany.
+
+ This file is part of OpenPetidomo.
+
+ OpenPetidomo is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ OpenPetidomo is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+*/
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
-#include <rfc822.h>
-#include <text.h>
-#include <petidomo.h>
+#include "librfc822/rfc822.h"
+#include "libtext/text.h"
+#include "petidomo.h"
void
RemoveCarrigeReturns(char * buffer)
@@ -343,6 +353,24 @@
MailStruct->Subject += 1;
debug((DEBUG_RFCPARSE, 5, "Subject: is \"%s\".", MailStruct->Subject));
}
+ else if (strncasecmp("Sender:", currLine, strlen("Sender:")) == 0) {
+ if (MailStruct->Envelope != NULL)
+ syslog(LOG_NOTICE, "Received mail with multiple sender addresses.");
+ MailStruct->Envelope = &currLine[strlen("Sender:")];
+ if (*MailStruct->Envelope == ' ')
+ MailStruct->Envelope += 1;
+ debug((DEBUG_RFCPARSE, 5, "Sender: is \"%s\".", MailStruct->Envelope));
+ }
+ else if (strncasecmp("Return-Path:", currLine, strlen("Return-Path:")) == 0 &&
+ MailStruct->Envelope == NULL)
+ {
+ if (MailStruct->Envelope != NULL)
+ syslog(LOG_NOTICE, "Received mail with multiple sender addresses.");
+ MailStruct->Envelope = &currLine[strlen("Return-Path:")];
+ if (*MailStruct->Envelope == ' ')
+ MailStruct->Envelope += 1;
+ debug((DEBUG_RFCPARSE, 5, "Return-Path: is \"%s\".", MailStruct->Envelope));
+ }
}
*result = MailStruct;
|