Imported Upstream version 2.7
[ossec-hids.git] / src / os_maild / maild.h
index 43a5709..efa09fd 100755 (executable)
@@ -1,14 +1,15 @@
-/* @(#) $Id: maild.h,v 1.23 2009/06/24 17:06:30 dcid Exp $ */
+/* @(#) $Id: ./src/os_maild/maild.h, 2011/09/08 dcid Exp $
+ */
 
 /* Copyright (C) 2009 Trend Micro Inc.
  * All rights reserved.
  *
  * This program is a free software; you can redistribute it
  * and/or modify it under the terms of the GNU General Public
- * License (version 3) as published by the FSF - Free Software
+ * License (version 2) as published by the FSF - Free Software
  * Foundation.
  *
- * License details at the LICENSE file included with OSSEC or 
+ * License details at the LICENSE file included with OSSEC or
  * online at: http://www.ossec.net/en/licensing.html
  */
 
@@ -21,7 +22,7 @@
 
 /* Each timeout is x * 5 */
 #define NEXTMAIL_TIMEOUT    2    /* Time to check for next msg - 5 */
-#define DEFAULT_TIMEOUT     18   /* socket read timeout - 18 (*5)*/ 
+#define DEFAULT_TIMEOUT     18   /* socket read timeout - 18 (*5)*/
 #define SUBJECT_SIZE        128  /* Maximum subject size */
 
  /* Maximum body size */
 #define MAIL_SUBJECT_FULL2   "%d - %s - %s"
 #endif
 
+#ifdef GEOIP
 #define MAIL_BODY           "\r\nOSSEC HIDS Notification.\r\n" \
                             "%s\r\n\r\n" \
                             "Received From: %s\r\n" \
                             "Rule: %d fired (level %d) -> \"%s\"\r\n" \
+                           "%s" \
+                            "%s" \
                             "Portion of the log(s):\r\n\r\n%s\r\n" \
                             "\r\n\r\n --END OF NOTIFICATION\r\n\r\n\r\n"
-
+#else
+#define MAIL_BODY           "\r\nOSSEC HIDS Notification.\r\n" \
+                            "%s\r\n\r\n" \
+                            "Received From: %s\r\n" \
+                            "Rule: %d fired (level %d) -> \"%s\"\r\n" \
+                            "Portion of the log(s):\r\n\r\n%s\r\n" \
+                            "\r\n\r\n --END OF NOTIFICATION\r\n\r\n\r\n"
+#endif
 
 /* Mail msg structure */
 typedef struct _MailMsg
@@ -55,7 +66,7 @@ typedef struct _MailMsg
 #include "config/mail-config.h"
 
 
-/* Config function */    
+/* Config function */
 int MailConf(int test_config, char *cfgfile, MailConfig *Mail);
 
 
@@ -66,6 +77,7 @@ MailMsg *OS_RecvMailQ(file_queue *fileq, struct tm *p, MailConfig *mail,
 /* Sends an email */
 int OS_Sendmail(MailConfig *mail, struct tm *p);
 int OS_Sendsms(MailConfig *mail, struct tm *p, MailMsg *sms_msg);
+int OS_SendCustomEmail(char **to, char *subject, char *smtpserver, char *from, FILE *fp, struct tm *p);
 
 
 /* Mail timeout used by the file-queue */