~ubuntu-branches/ubuntu/wily/syslog-ng/wily-proposed

« back to all changes in this revision

Viewing changes to modules/afsmtp/afsmtp-parser.c

  • Committer: Package Import Robot
  • Author(s): Gergely Nagy, Gergely Nagy
  • Date: 2013-11-04 15:27:37 UTC
  • mfrom: (1.3.12)
  • Revision ID: package-import@ubuntu.com-20131104152737-mqh6eqtna2xk97jq
Tags: 3.5.1-1
[ Gergely Nagy <algernon@madhouse-project.org> ]
* New upstream release.
  + Support auto-loading modules (Closes: #650814)
  + The SMTP module is available in syslog-ng-mod-smtp (Closes: #722746)
  + New modules: amqp, geoip, stomp, redis and smtp.
  + Multi-line input support (indented multiline and regexp-based)
  + Template type hinting for the MongoDB destination and $(format-json)
  + Support for unit suffixes in the configuration file
  + New filters, template functions and other miscellaneous changes
* New (team) maintainer, Laszlo Boszormenyi, Attila Szalay and myself
  added to Uploaders.
* Ship /var/lib/syslog-ng in the syslog-ng-core package, instead of
  creating it in the init script. Thanks Michael Biebl
  <biebl@debian.org> for the report & assistance. (Closes: #699942, #719910)
* Use dh-systemd for proper systemd-related maintainer scripts. Based on
  a patch by Michael Biebl <biebl@debian.org>. (Closes: #713982,
  #690067)
* Do not wait for syslog-ng to settle down during installation / update.
  This also fixes installing via debootstrap and a fake
  start-stop-daemon. (Closes: #714254)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 2011-2012 BalaBit IT Ltd, Budapest, Hungary
 
3
 * Copyright (c) 2011-2012 Gergely Nagy <algernon@balabit.hu>
 
4
 *
 
5
 * This program is free software; you can redistribute it and/or modify it
 
6
 * under the terms of the GNU General Public License version 2 as published
 
7
 * by the Free Software Foundation, or (at your option) any later version.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program; if not, write to the Free Software
 
16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
17
 *
 
18
 * As an additional exemption you are allowed to compile & link against the
 
19
 * OpenSSL libraries as published by the OpenSSL project. See the file
 
20
 * COPYING for details.
 
21
 *
 
22
 */
 
23
 
 
24
#include "afsmtp.h"
 
25
#include "cfg-parser.h"
 
26
#include "afsmtp-grammar.h"
 
27
 
 
28
extern int afsmtp_debug;
 
29
int afsmtp_parse(CfgLexer *lexer, LogDriver **instance, gpointer arg);
 
30
 
 
31
static CfgLexerKeyword afsmtp_keywords[] = {
 
32
  { "smtp",                     KW_SMTP },
 
33
  { "host",                     KW_HOST },
 
34
  { "port",                     KW_PORT },
 
35
  { "subject",                  KW_SUBJECT },
 
36
  { "from",                     KW_FROM },
 
37
  { "to",                       KW_TO },
 
38
  { "cc",                       KW_CC },
 
39
  { "bcc",                      KW_BCC },
 
40
  { "reply_to",                 KW_REPLY_TO },
 
41
  { "sender",                   KW_SENDER },
 
42
  { "body",                     KW_BODY },
 
43
  { "header",                   KW_HEADER },
 
44
  { NULL }
 
45
};
 
46
 
 
47
CfgParser afsmtp_parser =
 
48
{
 
49
#if ENABLE_DEBUG
 
50
  .debug_flag = &afsmtp_debug,
 
51
#endif
 
52
  .name = "afsmtp",
 
53
  .keywords = afsmtp_keywords,
 
54
  .parse = (int (*)(CfgLexer *lexer, gpointer *instance, gpointer)) afsmtp_parse,
 
55
  .cleanup = (void (*)(gpointer)) log_pipe_unref,
 
56
};
 
57
 
 
58
CFG_PARSER_IMPLEMENT_LEXER_BINDING(afsmtp_, LogDriver **)