Skip to content

Commit

Permalink
Merge pull request #678 from timopollmeier/sendmail-args
Browse files Browse the repository at this point in the history
Use read instead of xargs for sendmail (master)
  • Loading branch information
mattmundell authored Aug 9, 2019
2 parents 5fc7f5e + 69f852e commit 8bfa109
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Update Postgres to SQLite migration. [#581](https://github.com/greenbone/gvmd/pull/581) [#601](https://github.com/greenbone/gvmd/pull/601) [#604](https://github.com/greenbone/gvmd/pull/604) [#605](https://github.com/greenbone/gvmd/pull/605)
- Update result diff generation at delta reports [#650](https://github.com/greenbone/gvmd/pull/650)
- Check and create default permissions individually [#671](https://github.com/greenbone/gvmd/pull/671)
- Add -f arg to sendmail call in email alert [#676](https://github.com/greenbone/gvmd/pull/676)
- Add -f arg to sendmail call in email alert [#676](https://github.com/greenbone/gvmd/pull/676) [#678](https://github.com/greenbone/gvmd/pull/678)

### Fixed
- Fix iCalendar recurrence and timezone handling [#654](https://github.com/greenbone/gvmd/pull/654)
Expand Down
6 changes: 3 additions & 3 deletions src/manage_sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -9506,7 +9506,7 @@ email (const char *to_address, const char *from_address, const char *subject,
return -1;
}

sendmail_args = g_strdup_printf ("-f %s %s",
sendmail_args = g_strdup_printf ("%s %s",
from_address,
to_address);
g_file_set_contents (args_file_name,
Expand All @@ -9524,8 +9524,8 @@ email (const char *to_address, const char *from_address, const char *subject,
return -1;
}

command = g_strdup_printf ("xargs -a %s -I XXX"
" /usr/sbin/sendmail XXX < %s"
command = g_strdup_printf ("read FROM TO < %s;"
" /usr/sbin/sendmail -f \"$FROM\" \"$TO\" < %s"
" > /dev/null 2>&1",
args_file_name,
content_file_name);
Expand Down

0 comments on commit 8bfa109

Please sign in to comment.