mailpopbox.git
5 months agoBump version to 2.0.1. master v2.0.1
Robert Sesek [Sat, 8 Aug 2020 18:25:22 +0000 (14:25 -0400)]
Bump version to 2.0.1.

5 months agoUpdate docs to cover contributing.
Robert Sesek [Sat, 8 Aug 2020 18:23:57 +0000 (14:23 -0400)]
Update docs to cover contributing.

5 months agoMinor tweaks to the Github workflows.
Robert Sesek [Sat, 8 Aug 2020 17:45:44 +0000 (13:45 -0400)]
Minor tweaks to the Github workflows.

5 months agoAdd Github workflows for CI and PRs.
Robert Sesek [Sat, 8 Aug 2020 17:37:47 +0000 (13:37 -0400)]
Add Github workflows for CI and PRs.

5 months agoRewrite the Makefile to create release archives.
Robert Sesek [Sat, 8 Aug 2020 17:21:23 +0000 (13:21 -0400)]
Rewrite the Makefile to create release archives.

5 months agoLinkstamp the binaries when building with make.
Robert Sesek [Sat, 8 Aug 2020 16:51:45 +0000 (12:51 -0400)]
Linkstamp the binaries when building with make.

5 months agoDelete old tlstest.mm
Robert Sesek [Sat, 8 Aug 2020 15:59:59 +0000 (11:59 -0400)]
Delete old tlstest.mm

5 months agoLog when a send-as occurs.
Robert Sesek [Sat, 8 Aug 2020 15:48:57 +0000 (11:48 -0400)]
Log when a send-as occurs.

5 months agoFix two typos in log messages.
Robert Sesek [Sat, 8 Aug 2020 15:47:35 +0000 (11:47 -0400)]
Fix two typos in log messages.

5 months agoTweak the installation guide.
Robert Sesek [Sat, 8 Aug 2020 15:46:07 +0000 (11:46 -0400)]
Tweak the installation guide.

5 months agoWrite installation guide and clean up README.md.
Robert Sesek [Sun, 2 Aug 2020 22:30:56 +0000 (18:30 -0400)]
Write installation guide and clean up README.md.

7 months agoLog the hostname when starting up.
Robert Sesek [Tue, 9 Jun 2020 04:11:34 +0000 (00:11 -0400)]
Log the hostname when starting up.

7 months agoClean up tests to use `if want, got := X, Y; want != got {`.
Robert Sesek [Tue, 9 Jun 2020 02:54:53 +0000 (22:54 -0400)]
Clean up tests to use `if want, got := X, Y; want != got {`.

This reduces a lot of duplictaive expressions in tests.

7 months agoAdd more verbose pop3 connection logging.
Robert Sesek [Sun, 7 Jun 2020 17:09:12 +0000 (13:09 -0400)]
Add more verbose pop3 connection logging.

7 months agoConvert some TODOs to log statements.
Robert Sesek [Sun, 7 Jun 2020 16:14:49 +0000 (12:14 -0400)]
Convert some TODOs to log statements.

7 months agoRename smtp.Server.OnMessageDelievered to DeliverMessage.
Robert Sesek [Sun, 7 Jun 2020 16:04:24 +0000 (12:04 -0400)]
Rename smtp.Server.OnMessageDelievered to DeliverMessage.

7 months agoAdd missing license header to smtp/server_test.go. v2.0.0
Robert Sesek [Sun, 7 Jun 2020 04:29:55 +0000 (00:29 -0400)]
Add missing license header to smtp/server_test.go.

7 months agoMerge branch 'outbound'
Robert Sesek [Sun, 7 Jun 2020 04:26:43 +0000 (00:26 -0400)]
Merge branch 'outbound'

 Conflicts:
smtp_test.go

7 months agoAdd simple Makefile for common tasks.
Robert Sesek [Sun, 7 Jun 2020 04:21:37 +0000 (00:21 -0400)]
Add simple Makefile for common tasks.

7 months agoAdd some basic tests for the SMTP server component.
Robert Sesek [Sun, 7 Jun 2020 04:15:49 +0000 (00:15 -0400)]
Add some basic tests for the SMTP server component.

7 months agoAdd tests for the pop3 server component.
Robert Sesek [Sun, 7 Jun 2020 03:54:47 +0000 (23:54 -0400)]
Add tests for the pop3 server component.

7 months agoFix TLS connection in relayMessageToHost. v2.0.0-beta.2
Robert Sesek [Sat, 6 Jun 2020 19:15:51 +0000 (15:15 -0400)]
Fix TLS connection in relayMessageToHost.

The host had the port joined, which caused the cert verification to fail.

7 months agoFormat the Reporting-MTA in DSN messages per the spec.
Robert Sesek [Sat, 6 Jun 2020 18:46:43 +0000 (14:46 -0400)]
Format the Reporting-MTA in DSN messages per the spec.

7 months agoFix incorrect delivery-status Content-Type.
Robert Sesek [Sat, 6 Jun 2020 18:38:34 +0000 (14:38 -0400)]
Fix incorrect delivery-status Content-Type.

7 months agoUpdate smtp.connection.getTransportString cipher map.
Robert Sesek [Sat, 6 Jun 2020 16:11:27 +0000 (12:11 -0400)]
Update smtp.connection.getTransportString cipher map.

7 months agoProduce delivery-status failure notifications when failing to relay a message.
Robert Sesek [Sat, 6 Jun 2020 16:06:32 +0000 (12:06 -0400)]
Produce delivery-status failure notifications when failing to relay a message.

8 months agoUpdates for the latest zap. v2.0.0-beta.1
Robert Sesek [Sun, 24 May 2020 05:41:24 +0000 (01:41 -0400)]
Updates for the latest zap.

8 months agoMerge branch 'master' into outbound
Robert Sesek [Sun, 24 May 2020 05:39:12 +0000 (01:39 -0400)]
Merge branch 'master' into outbound

8 months agoEnable Go modules and upgrade zap to 1.15.0.
Robert Sesek [Sun, 24 May 2020 05:31:33 +0000 (01:31 -0400)]
Enable Go modules and upgrade zap to 1.15.0.

8 months agoUpgrade zap to the 1.0.0 release.
Robert Sesek [Sun, 24 May 2020 05:23:37 +0000 (01:23 -0400)]
Upgrade zap to the 1.0.0 release.

The current version was pre-release!

8 months agoStop using smtp.SendMail to relay messages.
Robert Sesek [Sun, 24 May 2020 04:51:30 +0000 (00:51 -0400)]
Stop using smtp.SendMail to relay messages.

Instead, dial the SMTP server and manage the protocol manually.

8 months agoAdd license information.
Robert Sesek [Sat, 23 May 2020 19:25:24 +0000 (15:25 -0400)]
Add license information.

8 months agoChange the send-as functionality to use a string in the Subject.
Robert Sesek [Thu, 30 Apr 2020 05:37:40 +0000 (01:37 -0400)]
Change the send-as functionality to use a string in the Subject.

Using the RCPT TO for BCCs does not work if mailpopbox is not the
original MTA to accept the message. The originating MTA creates two
envelopes with 1 RCPT TO each, rather than 1 envelope with 2 RCPT TO.

Editing the subject breaks Gmail threading on the send-side, but it
works. An alternative was to search the body of the message for a
string, but that gets more complex with complex message Content-Types.

8 months agoHandle initial responses for AUTH PLAIN.
Robert Sesek [Thu, 30 Apr 2020 03:15:36 +0000 (23:15 -0400)]
Handle initial responses for AUTH PLAIN.

See RFC 4954, Section 4.

8 months agoAdd support for outbound SMTP delivery.
Robert Sesek [Thu, 30 Apr 2020 02:17:03 +0000 (22:17 -0400)]
Add support for outbound SMTP delivery.

Messages can be sent through the SMTP server to other MTAs. In a reverse
of the catch-all inbound mail server, a message can be made to appear
From any address at the domain by BCCing <sameas+ANYTHING@DOMAIN> on the
message.

16 months agoSet OOM properties on mailpopbox.service. v1.2.1
Robert Sesek [Fri, 13 Sep 2019 06:10:36 +0000 (02:10 -0400)]
Set OOM properties on mailpopbox.service.

2 years agoIn smtp/conn_test.go, testServer.verifyAddress should check a common domain.
Robert Sesek [Thu, 6 Sep 2018 00:56:27 +0000 (20:56 -0400)]
In smtp/conn_test.go, testServer.verifyAddress should check a common domain.

2 years agoImplement AUTH PLAIN authentication extensions in SMTP.
Robert Sesek [Wed, 5 Sep 2018 04:59:11 +0000 (00:59 -0400)]
Implement AUTH PLAIN authentication extensions in SMTP.

This adds support for the AUTH extension (RFC 2554) and a single
SASL mechanism of PLAIN. This must be done after STARTTLS.

2 years agoRemove smtp.Server.OnEHLO.
Robert Sesek [Mon, 3 Sep 2018 05:14:08 +0000 (01:14 -0400)]
Remove smtp.Server.OnEHLO.

2 years agoAdd a SMTP test for STARTTLS.
Robert Sesek [Mon, 3 Sep 2018 05:03:59 +0000 (01:03 -0400)]
Add a SMTP test for STARTTLS.

2 years agoAdd smtp.DomainForAddress.
Robert Sesek [Mon, 3 Sep 2018 04:16:22 +0000 (00:16 -0400)]
Add smtp.DomainForAddress.

2 years agoMove the mailbox@ string to a MailboxAccount constant.
Robert Sesek [Mon, 3 Sep 2018 00:47:34 +0000 (20:47 -0400)]
Move the mailbox@ string to a MailboxAccount constant.

3 years agoSupport reloading the TLS config via SIGHUP. v1.2.0
Robert Sesek [Fri, 7 Apr 2017 04:06:12 +0000 (00:06 -0400)]
Support reloading the TLS config via SIGHUP.

- Breaks out running an Accept loop into a goroutine.
- Changes how the servers communicate back to the main event loop,
  using an enum instead of an error object.

4 years agoLower-case the addresses in smtp.conn.parsePath. v1.1.1
Robert Sesek [Tue, 17 Jan 2017 02:21:25 +0000 (21:21 -0500)]
Lower-case the addresses in smtp.conn.parsePath.

4 years agoEnsure stable message list order in pop3/conn_test.go. v1.1.0
Robert Sesek [Mon, 2 Jan 2017 08:21:40 +0000 (03:21 -0500)]
Ensure stable message list order in pop3/conn_test.go.

4 years agoImplement the POP3 CAPA command from RFC 2449.
Robert Sesek [Mon, 2 Jan 2017 08:14:15 +0000 (03:14 -0500)]
Implement the POP3 CAPA command from RFC 2449.

4 years agoAdd more logging for the POP3 server.
Robert Sesek [Mon, 2 Jan 2017 08:07:56 +0000 (03:07 -0500)]
Add more logging for the POP3 server.

4 years agoFix slice range panics in the POP3 USER and PASS commands.
Robert Sesek [Mon, 2 Jan 2017 06:47:32 +0000 (01:47 -0500)]
Fix slice range panics in the POP3 USER and PASS commands.

4 years agoFix pop3.Mailbox.Reset implementation.
Robert Sesek [Mon, 2 Jan 2017 06:42:52 +0000 (01:42 -0500)]
Fix pop3.Mailbox.Reset implementation.

4 years agoImplement the POP3 UIDL command.
Robert Sesek [Mon, 2 Jan 2017 06:32:26 +0000 (01:32 -0500)]
Implement the POP3 UIDL command.

4 years agoAdd better logging in the pop3 connection.
Robert Sesek [Mon, 2 Jan 2017 06:05:02 +0000 (01:05 -0500)]
Add better logging in the pop3 connection.

4 years agoAdd list of RFCs to the README.
Robert Sesek [Mon, 2 Jan 2017 05:56:46 +0000 (00:56 -0500)]
Add list of RFCs to the README.

4 years agoFix post-STARTTLS protocol bug.
Robert Sesek [Mon, 2 Jan 2017 01:22:00 +0000 (20:22 -0500)]
Fix post-STARTTLS protocol bug.

After the TLS handshake, the server should *not* reply with a greeting again,
but it should wait for an EHLO, per RFC 3207 ยง 4.2 & 5. Previously the server
would re-send the greeting, which un-syncs the protocol.

4 years agoDo not keep around the old net.Conn when doing SMTP STARTTLS.
Robert Sesek [Sun, 18 Dec 2016 21:47:34 +0000 (16:47 -0500)]
Do not keep around the old net.Conn when doing SMTP STARTTLS.

4 years agoAdd small program to help debug TLS issues using a non-Go stack.
Robert Sesek [Sun, 1 Jan 2017 06:37:40 +0000 (01:37 -0500)]
Add small program to help debug TLS issues using a non-Go stack.

4 years agoAllow additional parameters after the address in smtp.connection.parasePath. v1.0.0
Robert Sesek [Sun, 18 Dec 2016 20:26:51 +0000 (15:26 -0500)]
Allow additional parameters after the address in smtp.connection.parasePath.

4 years agoDo not break out of a switch, use return.
Robert Sesek [Sun, 18 Dec 2016 15:19:31 +0000 (10:19 -0500)]
Do not break out of a switch, use return.

4 years agoFix not handling invalid RCPT TO addresses.
Robert Sesek [Sun, 18 Dec 2016 07:45:12 +0000 (02:45 -0500)]
Fix not handling invalid RCPT TO addresses.

4 years agoAdd more logging to debug production issues.
Robert Sesek [Sun, 18 Dec 2016 07:37:58 +0000 (02:37 -0500)]
Add more logging to debug production issues.

4 years agoBreak out of the connection loops if EOF is reached.
Robert Sesek [Sun, 18 Dec 2016 06:26:35 +0000 (01:26 -0500)]
Break out of the connection loops if EOF is reached.

4 years agoAdd zap logging through the servers.
Robert Sesek [Sun, 18 Dec 2016 06:21:28 +0000 (01:21 -0500)]
Add zap logging through the servers.

4 years agoAdd a systemd unit file for the server.
Robert Sesek [Sun, 18 Dec 2016 05:07:50 +0000 (00:07 -0500)]
Add a systemd unit file for the server.

4 years agoFormat the TLS string in the receive-trace.
Robert Sesek [Sun, 18 Dec 2016 03:40:48 +0000 (22:40 -0500)]
Format the TLS string in the receive-trace.

4 years agoImplement STARTTLS in the SMTP server.
Robert Sesek [Sun, 18 Dec 2016 01:32:12 +0000 (20:32 -0500)]
Implement STARTTLS in the SMTP server.

4 years agoSupport TLS in POP3.
Robert Sesek [Sun, 18 Dec 2016 00:47:32 +0000 (19:47 -0500)]
Support TLS in POP3.

4 years agoStart saving SMTP messages in the maildrop.
Robert Sesek [Sat, 17 Dec 2016 23:22:14 +0000 (18:22 -0500)]
Start saving SMTP messages in the maildrop.

4 years agoWhen receiving a message, the SMTP server must add its trace information.
Robert Sesek [Sat, 17 Dec 2016 22:27:32 +0000 (17:27 -0500)]
When receiving a message, the SMTP server must add its trace information.

This also computes a Message-ID for the Envelope.

4 years agoAdd a test for POP3 RETR.
Robert Sesek [Sat, 17 Dec 2016 21:23:18 +0000 (16:23 -0500)]
Add a test for POP3 RETR.

Fixes a bug where the code line was not sent.

4 years agoFix case sensitivity in the POP3 sever.
Robert Sesek [Sat, 17 Dec 2016 21:16:41 +0000 (16:16 -0500)]
Fix case sensitivity in the POP3 sever.

4 years agoHandle case-insensitivity properly for SMTP commands.
Robert Sesek [Wed, 14 Dec 2016 05:52:14 +0000 (00:52 -0500)]
Handle case-insensitivity properly for SMTP commands.

4 years agoDo not implement SMTP VRFY.
Robert Sesek [Wed, 14 Dec 2016 05:23:01 +0000 (00:23 -0500)]
Do not implement SMTP VRFY.

4 years agoAdd a test for the POP3 server.
Robert Sesek [Wed, 14 Dec 2016 02:56:31 +0000 (21:56 -0500)]
Add a test for the POP3 server.

Fixes issues with trying to operate on deleted messages.

4 years agoGo back to using pop3.Message rather than IDs for most pop3.Mailbox methods.
Robert Sesek [Tue, 13 Dec 2016 19:26:02 +0000 (14:26 -0500)]
Go back to using pop3.Message rather than IDs for most pop3.Mailbox methods.

But also add a Mailbox.GetMessage method to make it easier to convert.

4 years agoImplement POP3 LIST, RETR, and DELE.
Robert Sesek [Tue, 13 Dec 2016 05:59:58 +0000 (00:59 -0500)]
Implement POP3 LIST, RETR, and DELE.

4 years agoInitial POP3 server.
Robert Sesek [Tue, 13 Dec 2016 05:27:13 +0000 (00:27 -0500)]
Initial POP3 server.

4 years agoComplete the unittest by adding smtp.Server.VerifyAddress.
Robert Sesek [Tue, 13 Dec 2016 03:48:20 +0000 (22:48 -0500)]
Complete the unittest by adding smtp.Server.VerifyAddress.

4 years agoAdd the first test for SMTP connections, based on the exchange in RFC 5321.
Robert Sesek [Tue, 13 Dec 2016 02:31:41 +0000 (21:31 -0500)]
Add the first test for SMTP connections, based on the exchange in RFC 5321.

This fixes a few bugs caught by the test.

4 years agoSupport SMTP along with ESMTP.
Robert Sesek [Mon, 12 Dec 2016 07:01:03 +0000 (02:01 -0500)]
Support SMTP along with ESMTP.

4 years agoDefine an smtp.Envelope that can be delivered to an smtp.Server.
Robert Sesek [Mon, 12 Dec 2016 06:30:16 +0000 (01:30 -0500)]
Define an smtp.Envelope that can be delivered to an smtp.Server.

Also introduce a smtp.ReplyLine rather than smpt.commnection.write*() methods.

4 years agoA basic SMTP server.
Robert Sesek [Mon, 12 Dec 2016 05:57:40 +0000 (00:57 -0500)]
A basic SMTP server.

4 years agoSimple accept/listen loop for the SMTP server.
Robert Sesek [Mon, 12 Dec 2016 04:35:56 +0000 (23:35 -0500)]
Simple accept/listen loop for the SMTP server.

4 years agoLay out basic config file structure.
Robert Sesek [Mon, 12 Dec 2016 04:05:57 +0000 (23:05 -0500)]
Lay out basic config file structure.

4 years agoThe mission statement.
Robert Sesek [Mon, 12 Dec 2016 03:42:38 +0000 (22:42 -0500)]
The mission statement.