diff options
author | Bruce Guenter <bruce@untroubled.org> | 2017-03-01 12:38:03 -0600 |
---|---|---|
committer | Bruce Guenter <bruce@untroubled.org> | 2017-03-01 12:38:03 -0600 |
commit | 2dec8d22e1f3ea926069899ed20707669f2d3bf9 (patch) | |
tree | 0a393eac46475cd64707340b54a4851a2d8f62ab /src/dsn.cc | |
parent | e4cc153582dc1acf5515108f063245e2f001f68a (diff) |
nullmailer-dsn: Restore the --max-lines options and fix tests
Diffstat (limited to 'src/dsn.cc')
-rw-r--r-- | src/dsn.cc | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -49,7 +49,7 @@ static const char* opt_envelope_id = 0; static const char* opt_status = 0; static const char* opt_remote = 0; static const char* opt_diagnostic_code = 0; -static int opt_lines = 0; +static int opt_lines = -1; static bool opt_ddn = false; const char* cli_program = "nullmailer-dsn"; @@ -77,6 +77,8 @@ cli_option cli_options[] = { "Name of remote server", 0 }, { 0, "retry-until", cli_option::uinteger, 0, &opt_retry_until, "UNIX timestamp of the (future) final attempt", 0 }, + { 0, "max-lines", cli_option::integer, 0, &opt_lines, + "Maximum number of lines of the original message to copy", "none" }, {0, 0, cli_option::flag, 0, 0, 0, 0} }; @@ -110,7 +112,11 @@ int cli_main(int, char* argv[]) || opt_status[5] != '\0') die1("Status must be in the format 4.#.# or 5.#.#"); opt_ddn = opt_status[0] == '4'; - config_readint("bouncelines", opt_lines); + if (opt_lines < 0) { + config_readint("bouncelines", opt_lines); + if (opt_lines < 0) + opt_lines = 0; + } if (!config_read("doublebounceto", doublebounceto) || !doublebounceto) |