Git Product home page Git Product logo

postmaster's Introduction

postmaster

Build Status

๐Ÿ“จ Notification Hub for openware stack.

Event API client for

Overview

Consume mail events from RabbitMQ and send emails over SMTP.

Overview

Usage

Start worker by running command below

$ go run ./cmd/postmaster/main.go

Environment variables

Variable Description Required Default
POSTMASTER_ENV Environment, reacts on "production" no
POSTMASTER_LOG_LEVEL Level of logging no debug
RABBITMQ_HOST Host of RabbitMQ daemon no localhost
RABBITMQ_PORT Port of RabbitMQ daemon no 5672
RABBITMQ_USERNAME RabbitMQ username no guest
RABBITMQ_PASSWORD RabbitMQ password no guest
SMTP_PASSWORD Password used for auth to SMTP yes
SMTP_PORT Post of SMTP server no 25
SMTP_HOST Host of SMTP server no smtp.sendgrid.net
SMTP_USER User used for auth to SMTP no apikey
SENDER_EMAIL Email address of mail sender yes
SENDER_NAME Name of mail sender no Postmaster

License

Project released under the terms of the MIT license.

postmaster's People

Contributors

alinetskyi avatar chumaknadya avatar dnfd avatar kite-bot avatar mod avatar shal avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

postmaster's Issues

Bug at NewEmailSender function

Hi @mod @shal ,
I found a bug. Here is what i did. we pulled the latest postmaster, namely v0.0.13. Then we tried and check sendgrid dashboard, nothing was forwarded to sendgrid. Then we use debugger to check and found that postmaster stucks at this line and cannot pass the function call NewEmailSender.

if err := NewEmailSender(conf, email).Send(); err != nil { log.Println(err) } and then it reported 2019/04/17 01:20:03 dial tcp 167.89.115.53:25: connect: connection timed out

we thought we may do wrong but then we use the postmaster docker image v.0.0.4. It works, sendgrid was able to receive and to forward to user email.

Problems with long term AMQP connection

019-04-23 05:18:03.310 [info] <0.2012.0> accepting AMQP connection <0.2012.0> (172.21.0.13:57448 -> 172.21.0.19:5672)
2019-04-23 05:18:03.324 [info] <0.2012.0> connection <0.2012.0> (172.21.0.13:57448 -> 172.21.0.19:5672): user 'xxxxx' authenticated and granted access to vhost '/'
2019-04-23 05:34:32.503 [warning] <0.2012.0> closing AMQP connection <0.2012.0> (172.21.0.13:57448 -> 172.21.0.19:5672, vhost: '/', user: 'xxxxx'):
2019-04-23 05:36:02.548 [error] <0.2027.0> Supervisor {<0.2027.0>,rabbit_channel_sup} had child channel started with rabbit_channel:start_link(2, <0.2012.0>, <0.2028.0>, <0.2012.0>, <<"172.21.0.13:57448 -> 172.21.0.19:5672">>, rabbit_framing_amqp_0_9_1, {user,<<"xxxxx">>,[administrator],[{rabbit_auth_backend_internal,none}]}, <<"/">>, [{<<"connection.blocked">>,bool,true},{<<"consumer_cancel_notify">>,bool,true}], <0.2013.0>, <0.2029.0>) at <0.2030.0> exit with reason killed in context shutdown_error

Invalid Key: Key must be PEM encoded PKCS1 or PKCS8 private key

Hi @shal ,

The problem with empty lang field is gone but now I encounter another error again.
2019/04/16 14:34:22 Successfully connected to amqp://guest:guest@rabbitmq:5672/ 2019/04/16 14:34:22 Listening for user.email.confirmation.token... 2019/04/16 14:34:22 Listening for user.password.reset.token... 2019/04/16 14:34:37 Token: eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJiYXJvbmciLCJqdGkiOiI2YzhmYzhlZi02OWRkLTQ0MjgtYTU5YS01ODExYjJjNzUzYTkiLCJpYXQiOjE1NTU0MjUyNzcsImV4cCI6MTU1NTQyNTMzNywiZXZlbnQiOnsidXNlciI6eyJ1aWQiOiJJRDI5MjUyODg3Q0UiLCJlbWFpbCI6Imlhbi5laW5zZXJAb3V0bG9vay5jb20iLCJyb2xlIjoibWVtYmVyIiwibGV2ZWwiOjAsIm90cCI6ZmFsc2UsInN0YXRlIjoicGVuZGluZyIsImNyZWF0ZWRfYXQiOiIyMDE5LTA0LTE2VDE0OjM0OjM3WiIsInVwZGF0ZWRfYXQiOiIyMDE5LTA0LTE2VDE0OjM0OjM3WiJ9LCJsYW5ndWFnZSI6IkVOIiwiZG9tYWluIjoiY2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F_1itq2RdZHFJi3QxyKuZQrXPX7NVdeZFuKzmhlCFCc_zc7Ot1SZpEBELV66lgwr_-m2YVajfmxl7jtITsY5MtQgF4fyb48pna_ElKenMc2q9N2YCaNypjXkbPjJWkcelR7P5ii5J-D_8yF43NPASzij6FuHMS8MBwCO2hhSswKFYrGs4wSfzMx8kHPQ 2019/04/16 14:34:37 Invalid Key: Key must be PEM encoded PKCS1 or PKCS8 private key
i tried to sign up some emails but it stays at the state and cannot move on and back to listening state..

Bug at Multi-Language Support

Hi @shal ,
may i know how to set usr.Language? because i got error reported that Language is not supported. Where should i set it? it is an optional fied when user signs up. Thus may i suggest if you use EN as default if language field is empty

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.