The latest stable Synchronet release is v3.21e-Win32 (install), released Mar-2026.

You can donate to the Synchronet project using PayPal.

WebMail

(new in v3.22)

Synchronet includes WebMail: a mail program that runs in a web browser, on a desktop computer or a phone, for the users of your BBS. It is served by the Synchronet Web Server and works directly with the BBS's own mail: what users see in it is the same e-mail they read and send from the terminal server, plus folders of their own.

What users can do

  • Read their e-mail (plain text and HTML mail, with attachments), search it, star messages, mark them read or unread, and step to the previous or next message from the one that is open.
  • File mail into folders of their own (create, rename and delete them), archive it, delete it to Trash and restore it, with an Undo for most actions.
  • Write new mail, reply, reply to all and forward, with attachments, saved automatically as drafts.
  • Keep a list of contacts, which the address fields suggest from.
  • Set a display name, a signature, the sender address to use (where the system offers more than one), a light or dark theme, and forwarding of their mail to another address.
  • Mark mail as spam or not spam.
  • Block an address tag that has started to attract spam, and unblock it again.

The page has three panes on a wide screen (folders, message list, message) and shows one pane at a time on a phone.

WebMail on a desktop browser: folders, the message list and a message

Writing a reply

The message list on a phone A message on a phone

Requirements

  • A Synchronet Web Server of version 3.22 or later. WebMail uses features of this version of the web server and of its JavaScript support, so it cannot be copied onto an older system.
  • HTTPS. By default WebMail refuses to work over plain HTTP, since users sign in with their BBS password and their mail is private. Set up TLS for the Web Server first (for example with letsyncrypt.js). The require_tls setting (below) can turn this off.
  • A current browser. An outdated browser gets a message saying the page could not start.
  • On an upgraded system, update the binaries, restart the servers and then run jsexec update.js.

Turning it on

WebMail's files are installed in the webmail directory beside exec, but it is off until you tell the Web Server where to serve it.

As a path on your web site

Add this line to the [dir] section of ctrl/web_alias.ini:

[dir]
/webmail/ = ../webmail/root/

WebMail is then at https://<your host>/webmail/. A new installation has this line in ctrl/web_alias.ini, commented out (remove the leading ;). An upgrade does not add it: on an upgraded system, add the [dir] section (if the file does not have one) and the line yourself. Other aliases in the file (those not under a section heading) must stay above the [dir] section.

The directory may also be a full path (/sbbs/webmail/root/, for example) instead of one relative to ctrl. The line takes effect when the Web Server next recycles, which it does by itself after the file changes, but only at a moment when it has no client connections; on a busy web site, restart the Web Server instead. The Web Server log then shows Directory alias: /webmail/ = followed by the directory, or a warning beginning Ignoring [dir] alias that says what is wrong with the line. See web_alias.ini.

As a virtual host

Alternatively, with virtual hosts enabled for the Web Server (VIRTUAL_HOSTS in Options of the [Web] section of sbbs.ini), give WebMail a host name of its own (for example mail.example.com): under the web root, create a directory named for that host as a link to webmail/root. The client is then at the top of that host (https://mail.example.com/). A copy of webmail/root also works, but must be copied again after each Synchronet update.

To give WebMail an item in the menu bar of the webv4 web interface, create a text file with the extension .link in webv4/mods/pages/ (create the mods and pages directories if they are not there), for example webv4/mods/pages/005-webmail.link. Its one line is the address to go to, a comma, and the text of the menu item:

/webmail/,WebMail
  • The address is WebMail's path on the same site (as above), or a whole address such as https://mail.example.com/ when WebMail has a host name of its own.
  • The number at the start of the file name sets the item's place: menu items are sorted by file name.
  • To put the item in one of webv4's drop-down menus instead, put the file in that menu's directory (for example webv4/mods/pages/More/).
  • The link opens WebMail in a new browser tab.
  • Your files in webv4/mods/ are never replaced or removed by an update.

Set webv4_login (below) as well if users signed in to webv4 should not have to sign in again to WebMail.

Settings: ctrl/modopts/webmail.ini

Every setting is in ctrl/modopts/webmail.ini. The file as shipped lists each one commented out with its default, so it changes nothing; remove the leading ; from a line and edit the value to change a setting. If you prefer, the same keys can go in a [webmail] section of ctrl/modopts.ini instead, but that section is not read while ctrl/modopts/webmail.ini exists. An upgraded system that has no ctrl/modopts/webmail.ini uses the defaults for everything.

A value that cannot be used (a word where a number is expected, for example) is replaced by the default, and the Web Server log names the setting.

Access and security

Setting Default Meaning
access_requirements (empty) Access requirement string a user must meet to use WebMail. Empty lets in every user except guests. This is the control for WebMail (not the Web Server's own login requirements).
require_tls true When true, WebMail works only over HTTPS; a plain HTTP visit gets a page asking for the https address. Set to false to allow plain HTTP; the sign-in page then warns that the connection is not encrypted.
tls_proxy_header (empty) The request header by which a reverse proxy you trust says the request reached it over HTTPS (for example X-Forwarded-Proto). Empty trusts no proxy. See “Behind a reverse proxy” below.
hsts_max_age 0 Seconds browsers are told to insist on HTTPS for this site (a Strict-Transport-Security header). 0 sends no such header.
webv4_login false When true, a user already signed in to the webv4 web interface is signed in to WebMail without the sign-in form. See “Signing in from webv4” below.
webv4_logout false When true, signing out of WebMail also signs the user out of the webv4 web interface in the same browser. See “Signing in from webv4” below.
webv4_only false When true, WebMail has no sign-in form: users sign in on the webv4 web interface only. Also turns on webv4_login. See “Signing in from webv4” below.
webv4_url / With webv4_only, the address of the page users sign in on: an http:// or https:// address, or a path on this site.

Sessions

Setting Default Meaning
session_timeout 7200 Seconds a signed-in session may sit idle before the user must sign in again (minimum 60). Does not apply to “keep me signed in” sessions. Such a session also ends 24 hours after sign-in, however it is used.
remember_days 30 Days a “keep me signed in” session lasts (minimum 1).
poll_interval (see below) Seconds between an open page's checks for new mail (minimum 15).

When poll_interval is not set, an open page checks for new mail at half the Web Server's MaxInactivity (in the [Web] section of sbbs.ini), between every 15 seconds and once a minute: every 60 seconds at the default MaxInactivity of 2 minutes. A mail check does not count as activity, so it does not keep a session from timing out.

Sizes and limits

Setting Default Meaning
max_message_bytes 20971520 (20 MB) Largest message that may be sent, in bytes: its text and its attachments as they are stored and sent. 0: no limit.
max_attachment_bytes (see below) Largest total size, in bytes, of the files attached to one message.
max_body_bytes 1048576 (1 MB) Largest text, in bytes, of a message being written (2 MB at most).
max_recipients 50 Most recipients (To, CC and BCC together) of one message. 0: no limit.
max_drafts 50 Most drafts a user may keep.
max_draft_bytes 104857600 (100 MB) Most disk space a user's drafts may take: their attachments and their text together.
max_text_part_bytes 1048576 (1 MB) Largest text part of a received message that is shown in full; a larger one is offered as a download.

Message size and the mail server. The default max_message_bytes is the Mail Server's own default largest message (MaxMsgSize in the [Mail] section of sbbs.ini). If you have changed MaxMsgSize, set max_message_bytes to match, so WebMail does not accept a message your Mail Server would not send. Other mail systems have limits of their own, often smaller; a message they refuse comes back to the sender as a delivery failure.

The attachment allowance. Attached files grow by about a third when they are sent (they are encoded as text). So when max_attachment_bytes is not set, it is the largest file that still fits in max_message_bytes once encoded: a little over 14 MB at the default 20 MB (25 MB when max_message_bytes is 0). Users are told before uploading when a file will not fit.

Appearance and wording

Setting Default Meaning
product_name {system} WebMail Name shown in the page title and header. {system} is replaced by the BBS name and {host} by the host name the browser asked for; any other text is shown as written. A system that serves mail for several domains can use {host} WebMail to name each one.
brand (empty) HTML shown in the page header in place of the product name (for example a logo).
login_text (empty) HTML shown under the sign-in form.
footer_links (empty) HTML for links shown in the page footer, under the sign-in form.
fallback_url (empty) The address of a page (for example a simpler mail page) that the message for unsupported browsers links to: an http:// or https:// address, or a path relative to the WebMail page. Empty shows no link.
locale en_us Default language for users who have not chosen one.
directory ../webmail/ Where WebMail's files are. A relative path is relative to the exec directory. Change it only if you have moved them.

In brand, login_text and footer_links, being HTML, a < or & meant as text must be written as &lt; or &amp;. The page also shows a “Powered by Synchronet” line with the system's version.

Who may use it

Any user may sign in with their BBS user name and password, except:

  • guest accounts (and any account with the guest restriction),
  • deleted and inactive accounts,
  • accounts with no password,
  • users who do not meet access_requirements, when you set it.

A refused sign-in looks the same to the visitor as a wrong password; the Web Server log records why a known account was refused. Failed sign-ins are counted by the Web Server like any other failed login. What a user may do once signed in follows their BBS account: sending e-mail, sending to the Internet or to other networks, the daily e-mail limit and the cost of network mail apply in WebMail exactly as on the terminal server.

Sending

Sender addresses

Mail a user sends from WebMail is from their address at the system's Internet address (the System Address under SCFG->Networks->Internet E-mail), as with the terminal server. If your system receives mail for other domains too, you can also let users choose one of those as their sender address, per domain:

  1. In SCFG->Networks->Internet E-mail->Additional Domains, select the domain.
  2. Set Allow Send From to Yes.
  3. Optionally, set Send Requirements to an access requirement string; blank means any user allowed to send Internet e-mail.

This is offered only for a plain domain name, not for a pattern such as *.example.com. A user chooses their default sender address in Settings and can change it per message. The choices are the user's alias at each domain they qualify for, their own Internet e-mail address when it is at one of those domains and the mail server delivers it to them, and their real name written with dots (when the system receives e-mail by real name). A reply starts from the address the message was sent to when the mail server delivers that address to the same user, even one the menu does not list: a name in ctrl/alias.cfg that points to them, or their name with a #tag.

The additional domains used to be a hand-edited file, ctrl/domains.cfg; they are now part of the message configuration, edited in SCFG. On an upgraded system, jsexec update.js (or saving the list in SCFG) copies the entries of ctrl/domains.cfg and leaves the old file in place; it is no longer used once every server runs v3.22. A changed list of domains takes effect after the servers are recycled.

Full mailboxes

A message addressed to a local user whose mailbox is full (see Inbox limit and Storage limit below) is not sent: the sender is told that the mailbox of one of the recipients is full, and nothing goes to any of the recipients. A sysop is not refused: the message is sent, and the notice that follows says that the mailbox of one of the recipients is full.

Interrupted sends

A send that stops part-way (the Web Server is restarted, or the connection drops at the wrong moment) is finished the next time the user opens a folder, some minutes later: recipients that have no copy yet get one, or the message is back in Drafts. When it cannot be known whether the message went out, it comes back to Drafts marked may have been sent, and sending it again asks the user to confirm first.

Mail forwarding

The forwarding option in WebMail's Settings is the BBS's own mail forwarding: the same forwarding address and on/off setting the user has on the terminal server. Turning it on forwards the mail that arrives for them through the Mail Server. It is not offered when forwarding is turned off for the system (Allow Forwarding to NetMail under SCFG->Message Options) or the user has the forward-mail restriction. With Allow Forwarding to NetMail set to Both, mail that is forwarded is also kept in the user's Inbox.

The mailbox

Folders

  • Inbox is the system's mail base: the same mail the user reads on the terminal server.
  • Starred, Sent, Spam, Trash and Archive are built in, and users can create folders of their own.
  • Drafts holds messages being written.

Mail a user files into a folder (or archives) is moved out of the system mail base into a mail base of the user's own. A copy of each message a user sends from WebMail is kept in Sent. It shows as sent once the Mail Server has it queued; if delivery fails later, the failure notice arrives in the Inbox as ordinary mail. Messages to FidoNet and QWK network addresses cannot carry attachments.

How long mail is kept

  • Inbox mail is removed with the age of the system's mail, as on the terminal server (Purge E-mail by Age under SCFG->Message Options). Mail a user moves to a folder or to Archive is not removed by age. The Inbox tells the user how long mail is kept there.
  • Spam mail is removed by Purge SPAM by Age.
  • Trash is emptied of messages older than Purge Mailbox Trash by Age (default 30 days, 0 to never), checked once a day when a user opens WebMail. Users can also empty Trash themselves.

Inbox limit

A user's Inbox may hold as many messages as Maximum E-mail Messages Waiting under SCFG->Message Options allows (default 100, 0 for no limit); mail in Spam counts. New e-mail for a user whose Inbox holds more than that is refused: by the Mail Server (the sending system tries again later), on the terminal server and in WebMail. Mail from the system itself, FidoNet netmail and QWK network mail are delivered anyway.

When a user's Inbox reaches 80% of the limit, WebMail shows a line under the Inbox with the count (for example “Inbox: 85 of 100 messages”); once the Inbox is over the limit, the line also says that new mail is refused and to delete or file some messages. On the terminal server, a user whose mailbox is full is told so at logon.

Storage limit

All of a user's mail (the Inbox and Spam, their folders, Sent and Trash) is limited by Mailbox Quota (per user) under SCFG->Message Options (default 1 GB, 0 for no limit). WebMail shows the user how much of it they use.

New e-mail for a user who has reached the limit is refused, as for a full Inbox, and WebMail tells the user that new mail is being refused and to delete messages and empty Trash. Mail in Trash still counts, so room comes from emptying Trash, not from deleting alone. Moving and deleting mail always works at the limit. When there is no room for the Sent copy of a message the user sends, the oldest mail in Trash is removed to make room; if that is not enough, the message is sent without a copy and the user is told.

Users with the W exemption have neither limit: no mail for them is refused, and WebMail shows how much they use without a limit.

Spam

The Spam folder shows the mail your Mail Server marked as spam, for example by a DNS blacklist set to tag rather than refuse, or by a spam-checking mail processor. Users can mark a message as spam (moving it to Spam) and mark mail in Spam as not spam (back to the Inbox).

Address tags

The Mail Server delivers mail addressed to a user's name with a tag added, name#tag@host, to that user: a user can give each web site or mailing list an address of its own (jane#shopping@example.com) without the sysop creating anything. When one of those addresses starts to receive spam, the user blocks its tag, and the mail server refuses mail sent to it from then on.

In Settings, under Address tags, a user can:

  • see the tags they have blocked,
  • block a tag, typed as the tag alone (shopping) or as the whole address, and
  • unblock a tag.

A tag can also be blocked from a message that arrived at it: the message's More menu offers “Block mail sent to” followed by that address.

A change applies to the next message that arrives; nothing needs to be recycled. A tag blocked here may have letters, digits and . _ + = - only, 64 at most, and a user can block up to 500.

The blocked tags are the lines of the user's data/user/<number>.smtpblock file (the user number in four digits), the same file the mail server has always read, in the format of the filter files. A file written by hand is kept as it is, comments included: an entry that is a pattern (a wildcard, for example) is listed as a pattern and can be removed in Settings, but a new one can only be added by editing the file. A reply to mail that arrived at a tagged address is sent from that address, unless its tag is blocked.

Images in HTML mail

Pictures that HTML mail loads from other sites can tell the sender when and where a message was read, so WebMail does not load them by default. The user can:

  • show the images of one message (“Show images”), or
  • choose “Always show images in mail from this address”, which lists the sender's address in their Settings, where it can be removed again.

Images are never shown automatically for mail in Spam or Trash. A sender's address can be faked, so “always show” is a convenience, not proof of who sent a message.

Sessions and signing out

  • At sign-in the user can choose “keep me signed in”: the browser then stays signed in for remember_days. Otherwise the session ends after session_timeout seconds without use, or 24 hours after sign-in.
  • Signing out ends that browser's session.
  • Changing the account's password, in any way (terminal server, webv4, the sysop), signs the user out of WebMail everywhere.

Signing in from webv4

With webv4_login = true, a user already signed in to the webv4 web interface opens WebMail without signing in again. This works only when WebMail is served on the same host name as webv4 (for example /webmail/ on the same site), and it makes a user's mail only as well protected as their webv4 session.

A WebMail session started this way lasts only as long as the webv4 session it came from: signing out of webv4 (or signing in to webv4 again on another device, which ends the webv4 session on the first one) signs the user out of WebMail as well. A user who signs in to WebMail with their password has a WebMail session of its own, which signing out of webv4 does not end.

Signing out of WebMail leaves the user signed in to webv4 (WebMail says so), unless webv4_logout is true. Then signing out of WebMail also signs the browser out of webv4, when it is signed in there as the same user, however the user signed in to WebMail. Like webv4_login, webv4_logout works only when WebMail is served on the same host name as webv4.

With webv4_only = true, the web site's sign-in is the only one: WebMail shows no sign-in form, and a user who is not signed in is told to sign in on the main site, with a button linking to webv4_url (the top of the site unless you set it). webv4 signs in from its menu bar, so the user then comes back to WebMail from there (see A link in the webv4 menu). WebMail refuses a password sign-in in this mode, so the BBS password is never typed into WebMail. Use it only when WebMail is served on the same host name as webv4: on a host name of its own, no one could sign in.

Branding

Name and header

Set product_name, brand, login_text and footer_links (above). For example, to name the client after the host the user visited and add a link under the sign-in form:

product_name = {host} Mail
footer_links = <a href="https://www.example.com/">Back to the BBS</a>

Colors: custom.css

Every color of WebMail comes from seven color variables:

Variable Used for
--wm-accent buttons, links, the selected item
--wm-bg the page background
--wm-surface panes, dialogs and fields
--wm-text text
--wm-muted less important text (dates, hints)
--wm-border lines and borders
--wm-danger warnings and delete actions

Other shades are mixed from these. To recolor the client, create webmail/root/css/custom.css; it is loaded after the stock style sheet whenever it exists. Synchronet does not ship a custom.css, so an update does not replace yours. There are two sets of colors, light and dark: the dark set applies when the user picks Dark in Settings, or when their device prefers dark and they have not picked Light. For example, a purple accent in both:

:root {
	--wm-accent: #6a3d9a;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--wm-accent: #c7a6ea;
	}
}
:root[data-theme="dark"] {
	--wm-accent: #c7a6ea;
}

Keep text and background colors at a contrast ratio of 4.5:1 or more so that text stays readable.

Wording and translations

The client's text comes from webmail/lib/locale/en_us.ini. To change some of it, or to translate it, create a file in webmail/mods/locale/ named for the language (for example en_us.ini, or de_de.ini for a new language) that lists only the keys you want to change, in the same sections as the stock file. Your files in webmail/mods/ are never replaced or removed by an update. For example, webmail/mods/locale/en_us.ini:

[folders]
trash = Bin
 
[main]
button_sign_in = Log in

Save these files as UTF-8 and keep {placeholders} such as {count} as written. A key ending in _one is the form used when a number is exactly 1; change it together with the key it belongs to. A new language is filled in from English for any key it leaves out. webmail/mods/README.txt has the details.

A user's language is their BBS language setting, else their browser's, else the locale setting, whichever is first available (a language is available when there is a file for it in webmail/lib/locale/ or webmail/mods/locale/); otherwise English.

Where a user's files are

All under the data directory, in the user's own directory data/user/<number>/ (the user number in four digits, such as 0001):

  • mailbox.*: the user's own mail base (folders, Sent, Trash) and the files that keep its lists and folder names.
  • webmail/: WebMail's files for that user: sign-in sessions, settings, contacts and drafts with their attachments.

The user's blocked address tags are in data/user/<number>.smtpblock, beside that directory.

The mail signature is the user's mail signature file in data/user/, the same one the terminal server uses. The Inbox is the system mail base (data/mail.*). Back these up with the rest of the data directory.

Behind a reverse proxy

If a reverse proxy (for example nginx or Apache) receives the HTTPS connections and passes the requests to the Synchronet Web Server:

  • Set tls_proxy_header to the header your proxy sets for the original scheme (for example X-Forwarded-Proto), and make sure the proxy sets it on every request and removes one sent by a browser. Otherwise, with require_tls on, WebMail sees plain HTTP and refuses to work.
  • Pass the Host header through unchanged ({host} in the product name and the webv4 sign-in depend on it).
  • Pass the request path, cookies and the X-Webmail request header unchanged, and allow request bodies of at least 4 MB (attachments are uploaded in pieces of about 1 MB each, sent as text).
  • Do not cache the replies of api.ssjs.

Measuring its speed: the timing script

webmail/tests/timing.sh times the client's main requests against your own server, signed in as you, the way a browser sends them. It needs bash and curl and runs from any computer:

webmail/tests/timing.sh https://bbs.example.com/webmail/ youruser

It asks for your password and prints, for each request, the median, fastest and slowest of 20 runs in milliseconds, beside a target for the median, and PASS or OVER. By default it only reads (nothing in the mailbox changes). Options:

  • -w also times the requests that change mail (starring, moving, saving a draft, uploading an attachment). It uses your oldest read Inbox message and puts back its star and folder, and creates a test folder and a test draft that it removes. It says what it will change and asks before starting.
  • -S address also times sending: it sends real mail, only to your own address (it checks), three messages by default (-N sets how many). They arrive in your Inbox, copies stay in Sent, and they count toward your daily e-mail limit.
  • -n sets the number of runs, -k accepts a self-signed certificate, -s word sets the search term timed (default the), and -y does not ask before changing mail (with -w or -S).

Run it twice: the first run after a long idle time can include work the server does once. A result well over target usually means the data directory is slow to reach (for example on a network share, where every file operation is a round trip) or the server was busy.

Troubleshooting

  • “404 Not Found” at /webmail/: the Web Server is not serving the [dir] line. Look in the Web Server log for its Directory alias: /webmail/ line or an Ignoring [dir] alias warning (the warning gives the reason, such as a directory that does not exist). If there is neither, the Web Server has not recycled since the file changed: restart it. See web_alias.ini.
  • The page does not start: the browser shows “could not start” (an outdated browser, or a script that failed to load), “needs JavaScript”, or “needs a secure connection” (plain HTTP with require_tls on). Check that the /webmail/ line is in the [dir] section of ctrl/web_alias.ini and that the web server can read the webmail directory.
  • A bar saying the user is offline: the browser could not reach the server. Changes the user makes while the bar is shown are sent when the connection is back; one that was on its way when the connection dropped is reported as possibly not done, and is not sent again. If it appears often while the server is up, look for a proxy or firewall closing connections, and at the Web Server log.
  • The Web Server log records WebMail problems in lines beginning webmail: a setting that could not be used, a sign-in refused for a known account and why, and the details of any error (a user only ever sees a short message without them). An unexpected error in a request is logged as an error and the browser gets a “server error” reply.
  • Users cannot save drafts or settings: the account the servers run as cannot write the data directory.

See Also