Coder Social home page Coder Social logo

webmail's Introduction

Go Report Card license Release

Webmail

This repository contains a simple webmail implementation for golang:

  • You can connect to a remote IMAP server and perform basic operations
    • Retrieve the list of remote folders.
    • Open a folder and see the appropriate messages.
      • Unread messages will be displayed in bold.
      • Messages which have been replied to will be shown with an icon.
      • Messages with attachments will display a "paperclip" next to them.
      • You can page back/forward by 50 messages.
    • For any message in the folder list you can retrieve it
      • Which will also mark the message as being read.
      • The message will be displayed as (filtered) HTML, Plain text, and RAW as applicable.
      • Attachments will be displayed and may be downloaded.

This application has been tested against three remote IMAP hosts:

  • GMail
  • GMX
  • My mailserver, running dovecot.

All perform well, though in all honesty my own server performs the worst because I have ~1000 mailboxes. So just getting the folder list takes some time I'd rather avoid.

Screenshots

There are a collection of screenshots here:

Installation

To install this run:

 ~ $ go get -u github.com/skx/webmail
 ~ $ go install github.com/skx/webmail

Usage

Build the application and start it:

 ~$ webmail

Now point your favourite browser at http://localhost:8080/ and fill in the appropriate details. For example if you wished to test against Google-mail you'd enter the following values:

Value Setting
Host imaps://imap.gmail.com/
Username [email protected]
Password s3cr1t

NOTE: If you want to us IMAP (143) use imap:// as a prefix, if you want IMAPS (993) use imaps://. To avoid issues I'm NOT validating the SSL certificate. This is intentional. Sorry.

Limitations

The main limitation is that this is a naive webmail client, which means that every time you carry out an option the flow goes:

  • Your browser sends a request to this server.
  • The server opens a new connection to the remote IMAP server:
    • The appropriate command(s) are executed.
    • The IMAP server connection is closed.
  • The server sends the response to your client.

This means that things are slower than they would be if there were a dedicated proxy maintaining a persistent connection to the IMAP server.

Missing Features

You cannot:

  • Delete a message.
  • Reply to a message.
  • Forward a message.
  • Compose a fresh message.

Some of those would be simple to add, others more complex.

Hacking

The generated HTML views are stored inside the compiled binary to ease deployment. If you wish to tweak the look & feel by editing them then you're more then welcome.

The raw HTML-templates are located beneath data/, and you can edit them then rebuild the compiled versions via the implant tool.

If you don't already have implant installed fetch it like so:

 go get -u  github.com/skx/implant/
 go install github.com/skx/implant/

Now regenerate the compiled version(s) of the templates and rebuild the binary to make your changes:

go generate
go build

Thanks

This project wouldn't have been possible without the use of some excellent libraries:

Steve

webmail's People

Contributors

mfashby avatar skx avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

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.