Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
79bdcece
Commit
79bdcece
authored
3 weeks ago
by
Rob Swindell
Browse files
Options
Downloads
Patches
Plain Diff
When listing mail messages with no "to" field, display SMTP forward path
... if there is one.
parent
583789f0
No related branches found
No related tags found
No related merge requests found
Pipeline
#8899
passed
3 weeks ago
Stage: build
Stage: test
Stage: cleanup
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sbbs3/readmail.cpp
+16
-15
16 additions, 15 deletions
src/sbbs3/readmail.cpp
with
16 additions
and
15 deletions
src/sbbs3/readmail.cpp
+
16
−
15
View file @
79bdcece
...
@@ -57,6 +57,15 @@ static uint count_msgs(mail_t* mail, uint total)
...
@@ -57,6 +57,15 @@ static uint count_msgs(mail_t* mail, uint total)
return
count
;
return
count
;
}
}
static
const
char
*
msg_to
(
smbmsg_t
*
msg
)
{
if
(
msg
->
to
!=
nullptr
&&
*
msg
->
to
!=
'\0'
)
return
msg
->
to
;
if
(
msg
->
forward_path
!=
nullptr
)
return
msg
->
forward_path
;
return
""
;
}
/****************************************************************************/
/****************************************************************************/
/* Reads mail waiting for usernumber. */
/* Reads mail waiting for usernumber. */
/****************************************************************************/
/****************************************************************************/
...
@@ -154,9 +163,7 @@ int sbbs_t::readmail(uint usernumber, int which, int lm_mode)
...
@@ -154,9 +163,7 @@ int sbbs_t::readmail(uint usernumber, int which, int lm_mode)
smb_unlockmsghdr
(
&
smb
,
&
msg
);
smb_unlockmsghdr
(
&
smb
,
&
msg
);
bprintf
(
P_TRUNCATE
|
(
msg
.
hdr
.
auxattr
&
MSG_HFIELDS_UTF8
)
bprintf
(
P_TRUNCATE
|
(
msg
.
hdr
.
auxattr
&
MSG_HFIELDS_UTF8
)
,
msghdr_text
(
&
msg
,
MailWaitingLstFmt
),
smb
.
curmsg
+
1
,
msghdr_text
(
&
msg
,
MailWaitingLstFmt
),
smb
.
curmsg
+
1
,
which
==
MAIL_SENT
?
msg
.
to
,
which
==
MAIL_SENT
?
msg_to
(
&
msg
)
:
(
msg
.
hdr
.
attr
&
MSG_ANONYMOUS
)
&&
!
SYSOP
?
text
[
Anonymous
]
:
msg
.
from
:
(
msg
.
hdr
.
attr
&
MSG_ANONYMOUS
)
&&
!
SYSOP
?
text
[
Anonymous
]
:
msg
.
from
,
mail_listing_flag
(
&
msg
)
,
mail_listing_flag
(
&
msg
)
,
msg
.
subj
);
,
msg
.
subj
);
smb_freemsgmem
(
&
msg
);
smb_freemsgmem
(
&
msg
);
...
@@ -528,15 +535,13 @@ int sbbs_t::readmail(uint usernumber, int which, int lm_mode)
...
@@ -528,15 +535,13 @@ int sbbs_t::readmail(uint usernumber, int which, int lm_mode)
if
(
which
==
MAIL_ALL
)
if
(
which
==
MAIL_ALL
)
bprintf
(
P_TRUNCATE
|
(
msg
.
hdr
.
auxattr
&
MSG_HFIELDS_UTF8
)
bprintf
(
P_TRUNCATE
|
(
msg
.
hdr
.
auxattr
&
MSG_HFIELDS_UTF8
)
,
msghdr_text
(
&
msg
,
MailOnSystemLstFmt
)
,
msghdr_text
(
&
msg
,
MailOnSystemLstFmt
)
,
u
+
1
,
msg
.
from
,
msg
.
to
,
u
+
1
,
msg
.
from
,
msg
_
to
(
&
msg
)
,
mail_listing_flag
(
&
msg
)
,
mail_listing_flag
(
&
msg
)
,
msg
.
subj
);
,
msg
.
subj
);
else
else
bprintf
(
P_TRUNCATE
|
(
msg
.
hdr
.
auxattr
&
MSG_HFIELDS_UTF8
)
bprintf
(
P_TRUNCATE
|
(
msg
.
hdr
.
auxattr
&
MSG_HFIELDS_UTF8
)
,
msghdr_text
(
&
msg
,
MailWaitingLstFmt
),
u
+
1
,
msghdr_text
(
&
msg
,
MailWaitingLstFmt
),
u
+
1
,
which
==
MAIL_SENT
?
msg
.
to
,
which
==
MAIL_SENT
?
msg_to
(
&
msg
)
:
(
msg
.
hdr
.
attr
&
MSG_ANONYMOUS
)
&&
!
SYSOP
?
text
[
Anonymous
]
:
msg
.
from
:
(
msg
.
hdr
.
attr
&
MSG_ANONYMOUS
)
&&
!
SYSOP
?
text
[
Anonymous
]
:
msg
.
from
,
mail_listing_flag
(
&
msg
)
,
mail_listing_flag
(
&
msg
)
,
msg
.
subj
);
,
msg
.
subj
);
smb_freemsgmem
(
&
msg
);
smb_freemsgmem
(
&
msg
);
...
@@ -747,15 +752,13 @@ int sbbs_t::readmail(uint usernumber, int which, int lm_mode)
...
@@ -747,15 +752,13 @@ int sbbs_t::readmail(uint usernumber, int which, int lm_mode)
if
(
which
==
MAIL_ALL
)
if
(
which
==
MAIL_ALL
)
bprintf
(
P_TRUNCATE
|
(
msg
.
hdr
.
auxattr
&
MSG_HFIELDS_UTF8
)
bprintf
(
P_TRUNCATE
|
(
msg
.
hdr
.
auxattr
&
MSG_HFIELDS_UTF8
)
,
msghdr_text
(
&
msg
,
MailOnSystemLstFmt
)
,
msghdr_text
(
&
msg
,
MailOnSystemLstFmt
)
,
u
+
1
,
msg
.
from
,
msg
.
to
,
u
+
1
,
msg
.
from
,
msg
_
to
(
&
msg
)
,
mail_listing_flag
(
&
msg
)
,
mail_listing_flag
(
&
msg
)
,
msg
.
subj
);
,
msg
.
subj
);
else
else
bprintf
(
P_TRUNCATE
|
(
msg
.
hdr
.
auxattr
&
MSG_HFIELDS_UTF8
)
bprintf
(
P_TRUNCATE
|
(
msg
.
hdr
.
auxattr
&
MSG_HFIELDS_UTF8
)
,
msghdr_text
(
&
msg
,
MailWaitingLstFmt
),
u
+
1
,
msghdr_text
(
&
msg
,
MailWaitingLstFmt
),
u
+
1
,
which
==
MAIL_SENT
?
msg
.
to
,
which
==
MAIL_SENT
?
msg_to
(
&
msg
)
:
(
msg
.
hdr
.
attr
&
MSG_ANONYMOUS
)
&&
!
SYSOP
?
text
[
Anonymous
]
:
msg
.
from
:
(
msg
.
hdr
.
attr
&
MSG_ANONYMOUS
)
&&
!
SYSOP
?
text
[
Anonymous
]
:
msg
.
from
,
mail_listing_flag
(
&
msg
)
,
mail_listing_flag
(
&
msg
)
,
msg
.
subj
);
,
msg
.
subj
);
smb_freemsgmem
(
&
msg
);
smb_freemsgmem
(
&
msg
);
...
@@ -919,15 +922,13 @@ int sbbs_t::searchmail(mail_t *mail, int start, int msgs, int which, const char
...
@@ -919,15 +922,13 @@ int sbbs_t::searchmail(mail_t *mail, int start, int msgs, int which, const char
if
(
which
==
MAIL_ALL
)
if
(
which
==
MAIL_ALL
)
bprintf
(
P_TRUNCATE
|
(
msg
.
hdr
.
auxattr
&
MSG_HFIELDS_UTF8
)
bprintf
(
P_TRUNCATE
|
(
msg
.
hdr
.
auxattr
&
MSG_HFIELDS_UTF8
)
,
msghdr_text
(
&
msg
,
MailOnSystemLstFmt
)
,
msghdr_text
(
&
msg
,
MailOnSystemLstFmt
)
,
l
+
1
,
msg
.
from
,
msg
.
to
,
l
+
1
,
msg
.
from
,
msg
_
to
(
&
msg
)
,
mail_listing_flag
(
&
msg
)
,
mail_listing_flag
(
&
msg
)
,
msg
.
subj
);
,
msg
.
subj
);
else
else
bprintf
(
P_TRUNCATE
|
(
msg
.
hdr
.
auxattr
&
MSG_HFIELDS_UTF8
)
bprintf
(
P_TRUNCATE
|
(
msg
.
hdr
.
auxattr
&
MSG_HFIELDS_UTF8
)
,
msghdr_text
(
&
msg
,
MailWaitingLstFmt
),
l
+
1
,
msghdr_text
(
&
msg
,
MailWaitingLstFmt
),
l
+
1
,
which
==
MAIL_SENT
?
msg
.
to
,
which
==
MAIL_SENT
?
msg_to
(
&
msg
)
:
(
msg
.
hdr
.
attr
&
MSG_ANONYMOUS
)
&&
!
SYSOP
?
text
[
Anonymous
]
:
msg
.
from
:
(
msg
.
hdr
.
attr
&
MSG_ANONYMOUS
)
&&
!
SYSOP
?
text
[
Anonymous
]
:
msg
.
from
,
mail_listing_flag
(
&
msg
)
,
mail_listing_flag
(
&
msg
)
,
msg
.
subj
);
,
msg
.
subj
);
found
++
;
found
++
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment