X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Fos_maild%2Fmaild.h;h=efa09fd9e52915d1e2ff546d5905e5a667a3c694;hb=6ef2f786c6c8ead94841b5f93baf9f43421f08c8;hp=43a570964396d27a038361fef88c7a62acfe908b;hpb=914feba5d54f979cd5d7e69c349c3d01f630042a;p=ossec-hids.git diff --git a/src/os_maild/maild.h b/src/os_maild/maild.h index 43a5709..efa09fd 100755 --- a/src/os_maild/maild.h +++ b/src/os_maild/maild.h @@ -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 */ @@ -36,13 +37,23 @@ #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 */