Giter Site home page Giter Site logo

msp301 / pinbox-server Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 3.0 71 KB

Self-hosted webmail client greatly inspired by Google Inbox (Backend)

License: GNU General Public License v3.0

Go 96.05% Makefile 3.95%
email webmail golang go inbox inbox-by-gmail notmuch google-inbox hacktoberfest

pinbox-server's Introduction

ARCHIVING THIS REPOISTORY. THIS PROJECT HAS BEEN MERGED WITH THE FRONTEND. SEE: https://github.com/msp301/pinbox

Pinbox webmail backend

Pinbox is a self-hosted webmail client greatly inspired by Google Inbox.

Warning: Currently under development

Prerequsites

Configuration

Pinbox server requires a TOML configuration file to define the Maildir location, port etc. See example/config.toml.

Starting the server

make && ./pinbox-server config.toml`

Architecture

Client App -> Backend API -> Notmuch -> OfflineIMAP

License

Licensed under GPL-3.0-or-later

pinbox-server's People

Contributors

msp301 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pinbox-server's Issues

Return meaningful HTTP status codes

As a client using the pinbox-server API
I want to be given an error status if there was a problem fulfilling my request
So that I can detect the error and handle it appropriately

Describe the solution you'd like
Return HTTP status codes that are meaningful to the response. At the moment everything is coming back as 200 OK.

In error scenarios it might be nice to return a HTTP Problem (https://tools.ietf.org/html/rfc7807)

Add support for sending emails

Before I can consider using Pinbox, I need to be able to send emails.

  • API endpoint is available for front-end to use to pass email details
  • API is documented in swagger.yaml

Content type is not being set

When responding to any API request we are returning JSON content but not setting the Content-Type header.

Expect "Content-Type: application/json"

Code is getting difficult to maintain

All the server code is in a single Go script making it difficult to follow.

The code should be separated out into individual files. This should make things easier to read and allow for tests to be added.

API must require authentication

Nobody wants to let the whole world see their mailbox.
If Pinbox is to provide access to my mailbox its API must require some form of authentication so that only I have access to my private mail.

Cannot access email threads

Describe the bug
The API returns lists of threads that contain messages. If we take the returned thread ID and give it to /api/messages/XXXXX it fails to do anything.

To Reproduce

  1. GET /api/messages or GET /api/inbox
  2. Take first any returned thread ID e.g. "0001"
  3. GET /api/messages/0001

Expected behaviour
Get a successful response with maybe including the full thead info and some metadata for its messages

Actual behaviour
Error 500 - Failed to read message

OpenAPI/Swagger spec file is out of date

The repo includes swagger.yaml but it does not reflect the current API implementation.
The spec should be integrated into testing the API to avoid it being outdated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.