mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Fixed bug with "." replacements in emails
SVN revision: 2406
This commit is contained in:
parent
855b8f60f5
commit
eeb4b94416
14
src/elogd.c
14
src/elogd.c
@ -2214,16 +2214,10 @@ int sendmail(LOGBOOK * lbs, char *smtp_host, char *from, char *to, char *text, c
|
|||||||
if (!check_smtp_error(str, 354, error, error_size))
|
if (!check_smtp_error(str, 354, error, error_size))
|
||||||
goto smtp_error;
|
goto smtp_error;
|
||||||
|
|
||||||
/* analyze text for "." at beginning of line */
|
/* replace "." at beginning of line by ".." */
|
||||||
p = text;
|
strlcpy(str, text, strsize);
|
||||||
str[0] = 0;
|
strsubst(str, strsize, "\r\n.\r\n", "\r\n..\r\n");
|
||||||
while (strstr(p, "\r\n.\r\n")) {
|
|
||||||
i = strstr(p, "\r\n.\r\n") - p + 1;
|
|
||||||
strlcat(str, p, i);
|
|
||||||
p += i + 4;
|
|
||||||
strlcat(str, "\r\n..\r\n", strsize);
|
|
||||||
}
|
|
||||||
strlcat(str, p, strsize);
|
|
||||||
/* add ".<CR>" to signal end of message */
|
/* add ".<CR>" to signal end of message */
|
||||||
strlcat(str, ".\r\n", strsize);
|
strlcat(str, ".\r\n", strsize);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user