Commit Graph

26 Commits

Author SHA1 Message Date
Kaarle Ritvanen
4e03d41342 sendmail: use FQDN in default envelope sender
RFC 5321 requires the return path to be supplied with a proper domain
name.

Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-09 09:49:36 +01:00
Denys Vlasenko
07f417b6ab sendmail: make -f optional, document its default value
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-05 15:01:39 +01:00
Denys Vlasenko
a42f530e03 sendmail: code shrink on top of previous patches
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-18 18:47:16 +01:00
Aaro Koskinen
e82bfef839 sendmail: don't add multiple To: headers
When adding To: header, add only a single header. If there are multiple
addresses, make it multiline.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-18 18:46:31 +01:00
Aaro Koskinen
4a732220e9 sendmail: don't add To: header if it already exists
If the message we are sending already has To: header, don't add a new one.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-18 18:45:15 +01:00
Aaro Koskinen
236f222cde sendmail: support long header fields for recipients
Support long header fields in To:, Cc: and Bcc: headers.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-18 18:45:15 +01:00
Aaro Koskinen
a8ba0a0d0c sendmail: support address lists
Headers To:, Cc: and Bcc: may have a list of comma-separated
addresses. Add support for that. Commas inside double quotes are ignored.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-18 18:45:14 +01:00
Aaro Koskinen
06ad964ae6 sendmail: support addresses inside angle brackets
When we extract addresses from the e-mail, try to first check for an
address inside angle brackets.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-18 18:45:14 +01:00
Aaro Koskinen
95e99e5271 sendmail: don't mangle e-mail headers
Leave the original To: and Cc: headers untouched, when we try to extract
addresses from them.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-18 18:45:13 +01:00
Aaro Koskinen
14285d14a5 sendmail: avoid sending mail to wrong addresses
If we get an address we cannot parse properly, we currently just strip
the unknown characters and still try to send it. This is considered
harmful as the resulting address may still be valid but different from
what the user originally intended.

Instead, skip sending to an address we cannot fully understand and
print the characters what we have scanned so far. Leading and trailing
whitespace is allowed and silently stripped.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-18 18:45:13 +01:00
Ron Yorston
576b1d3c41 sendmail: use host rather than NIS domain name for HELO
According to RFC 5321 the argument to HELO "contains the fully-qualified
domain name of the SMTP client" or its IP address if no FQDN is available.
BusyBox sendmail uses the NIS domain name instead which, in many cases,
is likely to be the default "(none)". [vda: yes, I checked my machine
and its uts.domainname was indeed "(none)"]

Using the host name is more likely to satisfy the intent of the RFC while
allowing the otherwise unused safe_getdomainname function to be removed.

Signed-off-by: Ron Yorston <rmy@tigress.co.uk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-04-28 17:04:19 +02:00
Denys Vlasenko
578b817151 sendmail: fix a mistake in previous commit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-19 13:54:50 +01:00
Denys Vlasenko
41fea01066 sendmail: stop doing -t unconditionally; makemime: generate 76 char base64 lines
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-11-18 22:25:35 +01:00
Denys Vlasenko
34c469ae04 sendmail: don't talk until 220 code is seen. Closes 3487
function                                             old     new   delta
sendmail_main                                        934     939      +5
smtp_checkp                                          167     165      -2
packed_usage                                       28634   28621     -13

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-18 03:01:49 +02:00
Denys Vlasenko
d616ab6bbb reformime: do not require \r\n
function                                             old     new   delta
parse                                                958    1063    +105
packed_usage                                       28691   28712     +21

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-22 03:46:33 +02:00
Denys Vlasenko
51d714ce7e sendmail: remove forgotten commenting-out on a "if (verbose)"
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-12-20 12:19:46 +01:00
Denys Vlasenko
5707b52fd4 mailutils/*: add verbose option to sendmail; remove -m and -j from makemime
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-20 05:12:39 +01:00
Vladimir Dronnikov
5b34300178 sendmail: fix assumption that headers should have a space after the colon
Signed-off-by: Vladimir Dronnikov <dronnikov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-05 01:21:32 +02:00
Denys Vlasenko
0ef64bdb40 *: make GNU licensing statement forms more regular
This change retains "or later" state! No licensing _changes_ here,
only form is adjusted (article, space between "GPL" and "v2" and so on).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16 20:14:46 +02:00
Denys Vlasenko
a7ccdeef39 libbb: added xfdopen_for_read/write
function                                             old     new   delta
xfdopen_helper                                         -      40     +40
logdir_open                                         1163    1184     +21
process_stdin                                        433     443     +10
xfdopen_for_write                                      -       9      +9
doCommands                                          2465    2474      +9
patch_main                                          1214    1222      +8
bbunpack                                             457     465      +8
xfdopen_for_read                                       -       7      +7
scan_tree                                            258     262      +4
xstrtoul_range_sfx                                   230     231      +1
sendmail_main                                        957     955      -2
passwd_main                                         1027    1023      -4
parse                                                969     964      -5
test_main                                            253     247      -6
sed_main                                             655     649      -6
dos2unix_main                                        437     429      -8
fbsplash_main                                        950     938     -12
handle_dir_common                                    371     354     -17
expand_vars_to_list                                 2197    2169     -28
update_passwd                                       1275    1246     -29
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 7/10 up/down: 117/-117)           Total: 0 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-15 23:28:11 +01:00
Vladimir Dronnikov
8dbe9bba8e sendmail: fix for long headers (by Vladimir)
Signed-off-by: Vladimir Dronnikov <dronnikov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-17 03:35:10 +02:00
Vladimir Dronnikov
944d275175 sendmail: update by Vladimir
function                                             old     new   delta
sendmail_main                                        897     939     +42
rcptto                                                17      40     +23

Signed-off-by: Vladimir Dronnikov <dronnikov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-15 23:50:48 +02:00
Vladimir Dronnikov
b618dba103 sendmail: accept -i too, not only -oi
Signed-off-by: Vladimir Dronnikov <dronnikov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-04 01:34:54 +02:00
Denis Vlasenko
88b8f0a347 sendmail: update by Vladimir
build system: tweak for rare case where include/autoconf.h
  does not get updated

function                                             old     new   delta
packed_usage                                       26238   26242      +4
sendmail_main                                       1353     897    -456
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 4/-456)           Total: -452 bytes
2009-03-31 23:41:53 +00:00
Denis Vlasenko
0c68a874e7 libbb: password/group function helpers rewritten by Tito:
function                                             old     new   delta
xgetpwuid                                              -      27     +27
uid2uname_utoa                                         -      22     +22
gid2group_utoa                                         -      22     +22
uid2uname                                              -      18     +18
gid2group                                              -      18     +18
buffer_fill_and_print                                179     196     +17
print_user                                            12      24     +12
print_group                                           12      24     +12
get_cached                                            89      99     +10
...
print_common                                         134     120     -14
vlock_main                                           415     396     -19
logger_main                                          410     387     -23
crontab_main                                         642     609     -33
bb_getpwuid                                           42       -     -42
bb_getgrgid                                           42       -     -42
bb_getug                                              80       -     -80
------------------------------------------------------------------------------
(add/remove: 6/3 grow/shrink: 9/11 up/down: 187/-296)        Total: -109 bytes
2008-12-02 22:56:59 +00:00
Denis Vlasenko
239d06bd47 add mailutils/* 2008-11-06 23:42:42 +00:00