Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
5b8f8d5a
...
5b8f8d5afa7c0330d3e29ecdb2514e2c2464a0e2
authored
2003-02-22 22:33:53 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Ignore Fcc.
1 parent
eb841dd7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
3 deletions
mailbox/sendmail.c
mailbox/smtp.c
mailbox/sendmail.c
View file @
5b8f8d5
...
...
@@ -38,6 +38,7 @@
#include <mailutils/property.h>
#include <mailutils/stream.h>
#include <mailutils/url.h>
#include <mailutils/header.h>
#include <mailer0.h>
#include <registrar0.h>
...
...
@@ -346,8 +347,35 @@ sendmail_send_message (mailer_t mailer, message_t msg, address_t from,
size_t
len
=
0
;
int
rc
;
size_t
offset
=
0
;
header_t
hdr
;
message_get_stream
(
msg
,
&
stream
);
if
(
message_get_header
(
msg
,
&
hdr
)
&&
header_get_value
(
hdr
,
MU_HEADER_FCC
,
NULL
,
0
,
NULL
)
==
0
)
{
while
((
status
=
stream_readline
(
stream
,
buffer
,
sizeof
(
buffer
),
offset
,
&
len
))
==
0
&&
len
!=
0
)
{
if
(
strncasecmp
(
buffer
,
MU_HEADER_FCC
,
sizeof
(
MU_HEADER_FCC
)
-
1
)
==
0
)
continue
;
if
(
write
(
sendmail
->
fd
,
buffer
,
len
)
==
-
1
)
{
status
=
errno
;
MAILER_DEBUG1
(
mailer
,
MU_DEBUG_TRACE
,
"write() failed: %s
\n
"
,
strerror
(
status
));
break
;
}
offset
+=
len
;
sendmail
->
offset
+=
len
;
}
}
while
((
status
=
stream_read
(
stream
,
buffer
,
sizeof
(
buffer
),
offset
,
&
len
))
==
0
&&
len
!=
0
)
...
...
mailbox/smtp.c
View file @
5b8f8d5
...
...
@@ -713,14 +713,15 @@ smtp_send_message (mailer_t mailer, message_t argmsg, address_t argfrom,
status
=
smtp_writeline
(
smtp
,
".%s
\r\n
"
,
data
);
CHECK_ERROR
(
smtp
,
status
);
}
else
else
if
(
strncasecmp
(
data
,
MU_HEADER_FCC
,
sizeof
(
MU_HEADER_FCC
)
-
1
))
{
status
=
smtp_writeline
(
smtp
,
"%s
\r\n
"
,
data
);
CHECK_ERROR
(
smtp
,
status
);
status
=
smtp_write
(
smtp
);
CHECK_EAGAIN
(
smtp
,
status
);
}
smtp
->
offset
+=
n
;
status
=
smtp_write
(
smtp
);
CHECK_EAGAIN
(
smtp
,
status
);
}
smtp
->
offset
=
0
;
status
=
smtp_writeline
(
smtp
,
".
\r\n
"
);
...
...
Please
register
or
sign in
to post a comment