Coder Social home page Coder Social logo

bdsmail's People

Contributors

majestrate 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bdsmail's Issues

Destinations of incoming mail

It looks like I did get some test replies, but that they went into mail/postmaster instead of the directories specified with the newmail command. Is this a bug, or is there a way to change that?

Build errors

Cloning to /root/build/bdsmail I get the following when running make using go 1.9.4:

GOPATH=/root/build/bdsmail go install -v bds/cmd/maild
src/bds/lib/config/parser/configparser.go:42:2: cannot find package "bufio" in any of:
/root/build/bdsmail/src/vendor/bufio (vendor tree)
/home/go/src/bufio (from $GOROOT)
/root/build/bdsmail/src/bufio (from $GOPATH)
src/vendor/github.com/Sirupsen/logrus/entry.go:4:2: cannot find package "bytes" in any of:
/root/build/bdsmail/src/vendor/bytes (vendor tree)
/home/go/src/bytes (from $GOROOT)
/root/build/bdsmail/src/bytes (from $GOPATH)
src/bds/lib/config/parser/configparser.go:43:2: cannot find package "container/list" in any of:
/root/build/bdsmail/src/vendor/container/list (vendor tree)
/home/go/src/container/list (from $GOROOT)
/root/build/bdsmail/src/container/list (from $GOPATH)
src/bds/lib/maildir/maildir.go:4:2: cannot find package "crypto/rand" in any of:
/root/build/bdsmail/src/vendor/crypto/rand (vendor tree)
/home/go/src/crypto/rand (from $GOROOT)
/root/build/bdsmail/src/crypto/rand (from $GOPATH)
src/bds/lib/model/login.go:7:2: cannot find package "crypto/sha256" in any of:
/root/build/bdsmail/src/vendor/crypto/sha256 (vendor tree)
/home/go/src/crypto/sha256 (from $GOROOT)
/root/build/bdsmail/src/crypto/sha256 (from $GOPATH)
src/vendor/github.com/go-xorm/xorm/mysql_dialect.go:8:2: cannot find package "crypto/tls" in any of:
/root/build/bdsmail/src/vendor/crypto/tls (vendor tree)
/home/go/src/crypto/tls (from $GOROOT)
/root/build/bdsmail/src/crypto/tls (from $GOPATH)
src/vendor/github.com/go-xorm/xorm/engine.go:10:2: cannot find package "database/sql" in any of:
/root/build/bdsmail/src/vendor/database/sql (vendor tree)
/home/go/src/database/sql (from $GOROOT)
/root/build/bdsmail/src/database/sql (from $GOPATH)
src/vendor/github.com/go-xorm/xorm/session.go:9:2: cannot find package "database/sql/driver" in any of:
/root/build/bdsmail/src/vendor/database/sql/driver (vendor tree)
/home/go/src/database/sql/driver (from $GOROOT)
/root/build/bdsmail/src/database/sql/driver (from $GOPATH)
src/bds/lib/i2p/addr.go:5:2: cannot find package "encoding/base32" in any of:
/root/build/bdsmail/src/vendor/encoding/base32 (vendor tree)
/home/go/src/encoding/base32 (from $GOROOT)
/root/build/bdsmail/src/encoding/base32 (from $GOPATH)
src/bds/lib/i2p/addr.go:6:2: cannot find package "encoding/base64" in any of:
/root/build/bdsmail/src/vendor/encoding/base64 (vendor tree)
/home/go/src/encoding/base64 (from $GOROOT)
/root/build/bdsmail/src/encoding/base64 (from $GOPATH)
src/vendor/github.com/go-xorm/xorm/engine.go:11:2: cannot find package "encoding/gob" in any of:
/root/build/bdsmail/src/vendor/encoding/gob (vendor tree)
/home/go/src/encoding/gob (from $GOROOT)
/root/build/bdsmail/src/encoding/gob (from $GOPATH)
src/vendor/github.com/Sirupsen/logrus/json_formatter.go:4:2: cannot find package "encoding/json" in any of:
/root/build/bdsmail/src/vendor/encoding/json (vendor tree)
/home/go/src/encoding/json (from $GOROOT)
/root/build/bdsmail/src/encoding/json (from $GOPATH)
src/bds/lib/config/parser/configparser.go:44:2: cannot find package "errors" in any of:
/root/build/bdsmail/src/vendor/errors (vendor tree)
/home/go/src/errors (from $GOROOT)
/root/build/bdsmail/src/errors (from $GOPATH)
src/bds/lib/config/parser/configparser.go:45:2: cannot find package "fmt" in any of:
/root/build/bdsmail/src/vendor/fmt (vendor tree)
/home/go/src/fmt (from $GOROOT)
/root/build/bdsmail/src/fmt (from $GOPATH)
src/vendor/github.com/go-xorm/xorm/session.go:13:2: cannot find package "hash/crc32" in any of:
/root/build/bdsmail/src/vendor/hash/crc32 (vendor tree)
/home/go/src/hash/crc32 (from $GOROOT)
/root/build/bdsmail/src/hash/crc32 (from $GOPATH)
src/vendor/github.com/Sirupsen/logrus/entry.go:6:2: cannot find package "io" in any of:
/root/build/bdsmail/src/vendor/io (vendor tree)
/home/go/src/io (from $GOROOT)
/root/build/bdsmail/src/io (from $GOPATH)
src/vendor/github.com/Sirupsen/logrus/logrus.go:5:2: cannot find package "log" in any of:
/root/build/bdsmail/src/vendor/log (vendor tree)
/home/go/src/log (from $GOROOT)
/root/build/bdsmail/src/log (from $GOPATH)
src/vendor/github.com/go-xorm/xorm/syslogger.go:11:2: cannot find package "log/syslog" in any of:
/root/build/bdsmail/src/vendor/log/syslog (vendor tree)
/home/go/src/log/syslog (from $GOROOT)
/root/build/bdsmail/src/log/syslog (from $GOPATH)
src/vendor/github.com/mattn/go-sqlite3/callback.go:25:2: cannot find package "math" in any of:
/root/build/bdsmail/src/vendor/math (vendor tree)
/home/go/src/math (from $GOROOT)
/root/build/bdsmail/src/math (from $GOPATH)
src/bds/lib/i2p/api.go:4:2: cannot find package "net" in any of:
/root/build/bdsmail/src/vendor/net (vendor tree)
/home/go/src/net (from $GOROOT)
/root/build/bdsmail/src/net (from $GOPATH)
src/bds/lib/web/admin/admin.go:5:2: cannot find package "net/http" in any of:
/root/build/bdsmail/src/vendor/net/http (vendor tree)
/home/go/src/net/http (from $GOROOT)
/root/build/bdsmail/src/net/http (from $GOPATH)
src/bds/lib/sendmail/remote.go:7:2: cannot find package "net/smtp" in any of:
/root/build/bdsmail/src/vendor/net/smtp (vendor tree)
/home/go/src/net/smtp (from $GOROOT)
/root/build/bdsmail/src/net/smtp (from $GOPATH)
src/bds/lib/pop3/server.go:11:2: cannot find package "net/textproto" in any of:
/root/build/bdsmail/src/vendor/net/textproto (vendor tree)
/home/go/src/net/textproto (from $GOROOT)
/root/build/bdsmail/src/net/textproto (from $GOPATH)
src/vendor/github.com/go-xorm/xorm/pq_driver.go:10:2: cannot find package "net/url" in any of:
/root/build/bdsmail/src/vendor/net/url (vendor tree)
/home/go/src/net/url (from $GOROOT)
/root/build/bdsmail/src/net/url (from $GOPATH)
src/bds/lib/config/parser/configparser.go:46:2: cannot find package "os" in any of:
/root/build/bdsmail/src/vendor/os (vendor tree)
/home/go/src/os (from $GOROOT)
/root/build/bdsmail/src/os (from $GOPATH)
src/bds/cmd/maild/main.go:7:2: cannot find package "os/signal" in any of:
/root/build/bdsmail/src/vendor/os/signal (vendor tree)
/home/go/src/os/signal (from $GOROOT)
/root/build/bdsmail/src/os/signal (from $GOPATH)
src/bds/lib/config/parser/configparser.go:47:2: cannot find package "path" in any of:
/root/build/bdsmail/src/vendor/path (vendor tree)
/home/go/src/path (from $GOROOT)
/root/build/bdsmail/src/path (from $GOPATH)
src/bds/lib/maildir/maildir.go:9:2: cannot find package "path/filepath" in any of:
/root/build/bdsmail/src/vendor/path/filepath (vendor tree)
/home/go/src/path/filepath (from $GOROOT)
/root/build/bdsmail/src/path/filepath (from $GOPATH)
src/vendor/github.com/go-xorm/core/column.go:5:2: cannot find package "reflect" in any of:
/root/build/bdsmail/src/vendor/reflect (vendor tree)
/home/go/src/reflect (from $GOROOT)
/root/build/bdsmail/src/reflect (from $GOPATH)
src/bds/lib/config/parser/configparser.go:48:2: cannot find package "regexp" in any of:
/root/build/bdsmail/src/vendor/regexp (vendor tree)
/home/go/src/regexp (from $GOROOT)
/root/build/bdsmail/src/regexp (from $GOPATH)
package bds/cmd/maild
imports runtime: cannot find package "runtime" in any of:
/root/build/bdsmail/src/vendor/runtime (vendor tree)
/home/go/src/runtime (from $GOROOT)
/root/build/bdsmail/src/runtime (from $GOPATH)
package bds/cmd/maild
imports bds/lib/server
imports bds/lib/db
imports github.com/mattn/go-sqlite3
imports runtime/cgo: cannot find package "runtime/cgo" in any of:
/root/build/bdsmail/src/vendor/runtime/cgo (vendor tree)
/home/go/src/runtime/cgo (from $GOROOT)
/root/build/bdsmail/src/runtime/cgo (from $GOPATH)
src/vendor/github.com/Sirupsen/logrus/text_formatter.go:7:2: cannot find package "sort" in any of:
/root/build/bdsmail/src/vendor/sort (vendor tree)
/home/go/src/sort (from $GOROOT)
/root/build/bdsmail/src/sort (from $GOPATH)
src/vendor/github.com/go-xorm/xorm/engine.go:17:2: cannot find package "strconv" in any of:
/root/build/bdsmail/src/vendor/strconv (vendor tree)
/home/go/src/strconv (from $GOROOT)
/root/build/bdsmail/src/strconv (from $GOPATH)
src/bds/lib/config/parser/configparser.go:49:2: cannot find package "strings" in any of:
/root/build/bdsmail/src/vendor/strings (vendor tree)
/home/go/src/strings (from $GOROOT)
/root/build/bdsmail/src/strings (from $GOPATH)
src/bds/lib/config/parser/configparser.go:50:2: cannot find package "sync" in any of:
/root/build/bdsmail/src/vendor/sync (vendor tree)
/home/go/src/sync (from $GOROOT)
/root/build/bdsmail/src/sync (from $GOPATH)
src/vendor/github.com/Sirupsen/logrus/terminal_linux.go:8:8: cannot find package "syscall" in any of:
/root/build/bdsmail/src/vendor/syscall (vendor tree)
/home/go/src/syscall (from $GOROOT)
/root/build/bdsmail/src/syscall (from $GOPATH)
src/vendor/github.com/Sirupsen/logrus/entry.go:8:2: cannot find package "time" in any of:
/root/build/bdsmail/src/vendor/time (vendor tree)
/home/go/src/time (from $GOROOT)
/root/build/bdsmail/src/time (from $GOPATH)
src/vendor/github.com/Sirupsen/logrus/terminal_notwindows.go:12:2: cannot find package "unsafe" in any of:
/root/build/bdsmail/src/vendor/unsafe (vendor tree)
/home/go/src/unsafe (from $GOROOT)
/root/build/bdsmail/src/unsafe (from $GOPATH)
Makefile:6: recipe for target 'build' failed
make: *** [build] Error 1

Mail from/to identical username e.g. myuser@host1 to myuser@host2 gets delivered locally

BDSMail has wonderful potential, it's amazing!

However, I've been dabbling a bit with BDSMail lately, and I discovered that if I have an identical username on two systems and try to send mail between them, the mail will not be delivered to the "remote" user, it seems to be delivered to the same user that sent the mail, or just stay in Sent. At least I get that result when using mutt or Thunderbird.

Steps to recreate:

  1. Setup BDSMail on both systems
  2. Create identically named user e.g. "admin" on both systems
  3. Try sending a mail from e.g. admin@cflsykml[..]3jamrmwa.b32.i2p to admin@lf2h3ax[..]odyvqz5fa.b32.i2p

Compiling on Raspberry Pi 2

Got it finally built on a Intel-box and therefore moved on to the next challenge. Tried compiling bdsmail on a Raspberry Pi 2, and it didn't work well.

First I had to comment out -maes in src/bds/lib/cryptonight/cn.go since ARM does not have intel aes. Then I got the following error:

pi@raspberrypi:~/source/bdsmail $ make
go install -v bds/cmd/maild
bds/lib/cryptonight
# bds/lib/cryptonight
In file included from src/bds/lib/cryptonight/skein.h:30:0,
                 from src/bds/lib/cryptonight/skein.c:15:
src/bds/lib/cryptonight/skein_port.h:127:0: warning: "PLATFORM_BYTE_ORDER" redefined
 #  define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN
 ^
src/bds/lib/cryptonight/skein_port.h:123:0: note: this is the location of the previous definition
 #  define PLATFORM_BYTE_ORDER IS_LITTLE_ENDIAN
 ^
# bds/lib/cryptonight
/tmp/go-build318340222/bds/lib/cryptonight/_obj/slow-hash.o:(.rodata+0x0): multiple definition of      `t_fn'
/tmp/go-build318340222/bds/lib/cryptonight/_obj/aesb.o:(.rodata+0x0): first defined here
collect2: error: ld returned 1 exit status
Makefile:12: recipe for target 'build' failed
make: *** [build] Error 2

I'm just a mere luser. Is there any use trying, or is this just an Intel software right now?

Add things to prerequisites list?

To be able to run make, I needed to set $GOPATH to current directory:

export GOPATH=.

And in order to run maild I needed to install these packages on my Ubuntu 14.04

libluajit-5.1-2 libluajit-5.1-common

Obtaining the i2p domain

I know it's shown when running maild, but is there a way to obtain the i2p domain (ending in b32.i2p) from the commandline so that I can set things up without manual intervention?

Handling multiple users

I assume that this is supposed to be a single user system installed in the home directory. Is there a way to handle multiple users with separate mail directories under /home/user ?

Can't be built on go 1.16

Greetings.

Not sure if this is an actively maintained project anymore, but here goes:

I've modified the Makefile to try to compile this with Go 1.16.

build:
        GOPATH=$(REPO) $(GO) install -v bds/cmd/maild@latest
        GOPATH=$(REPO) $(GO) install -v bds/cmd/mailtool@latest
        GOPATH=$(REPO) $(GO) install -v bds/cmd/bdsconfig@latest

But it seems that there are more things that need to be updated to accommodate for the changes in the module structure since 1.13:

pi@host:~/source/golang/bdsmail $ make
GOPATH=/home/pi/source/golang/bdsmail /usr/local/go/bin/go install -v bds/cmd/maild@latest
go install bds/cmd/maild@latest: malformed module path "bds/cmd/maild": missing dot in first path element
make: *** [Makefile:13: build] Error 1

Not sure how to do the changes myself, am not a Go programmer. Looks like one needs a go.mod file with a full URL to the project.

Is that something that can be easily done?

failed to resolve .b32.i2p NAMING REPLY RESULT=INVALID_KEY

I've setup mutt as the config example, but it does not work. The console log shows:

INFO[0330] outbound message queued: /root/source/bdsmail/outbound/new/050e66b599bf70d7147410904315515.host01 
INFO[0340] Sending outbound mail /root/source/bdsmail/outbound/new/050e66b599bf70d7147410904315515.host01 
INFO[0340] Delivering  mail to admin@onfntovle5ptvcjptcdt2oumwsnbc6jbebqakswfx5j5hglj2f5q.b32.i2p from root <admin@ejvxvge5mqs2pn2qnrummcadftjsyneesm6if7svykdrgpj6nkgq.b32.i2p> 
WARN[0340] failed to resolve onfntovle5ptvcjptcdt2oumwsnbc6jbebqakswfx5j5hglj2f5q.b32.i2p: NAMING REPLY RESULT=INVALID_KEY NAME=onfntovle5ptvcjptcdt2oumwsnbc6jbebqakswfx5j5hglj2f5q.b32.i2p

WARN[0340] failed to deliver message to admin@onfntovle5ptvcjptcdt2oumwsnbc6jbebqakswfx5j5hglj2f5q.b32.i2p from root <admin@ejvxvge5mqs2pn2qnrummcadftjsyneesm6if7svykdrgpj6nkgq.b32.i2p>: NAMING REPLY RESULT=INVALID_KEY NAME=onfntovle5ptvcjptcdt2oumwsnbc6jbebqakswfx5j5hglj2f5q.b32.i2p

I've also used telnet on the SMTP port to try to deliver via that, as I'm no mutt wiz, but it doesn't recognize my FROM address.

# telnet localhost 2525
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 bdsmail BDSMail-Brain Dead Simple Mail Server 0.1.0 SMTP is ready
EHLO ejvxvge5mqs2pn2qnrummcadftjsyneesm6if7svykdrgpj6nkgq.b32.i2p
250 bdsmail greets ejvxvge5mqs2pn2qnrummcadftjsyneesm6if7svykdrgpj6nkgq.b32.i2p
MAIL FROM:admin@ejvxvge5mqs2pn2qnrummcadftjsyneesm6if7svykdrgpj6nkgq.b32.i2p
501 syntax error in parameters (invalid FROM)

The syntax error does not show up in the console log of the maild.
Not sure of what the SMTP server expects, but apparently it's not what I offer.. The admin@ejvxvge5mqs2pn2qnrummcadftjsyneesm6if7svykdrgpj6nkgq.b32.i2p address is the one on the machine which I telnet to.

I'm happy to write some docs if you could just push me in the right direction here..

Firewall

Trying to send to the test address I notice I'm getting a lot of "failed to resolve" and "failed to deliver message" NAMING REPLY RESULT=KEY_NOT_FOUND

What, if any, ports need to be open?

Setting the admin password

When trying to send mail I get a SASL authentication error. It looks like this is because the admin password is wrong. Trying to reset the admin password with:

$BDSMAIL_DIR/bin/mailtool $BDSMAIL_DIR/config.ini admin $BDSMAIL_DIR/mail/admin "adminpassword"

I get:

INFO[0000] opened localhost.sqlite                      
INFO[0000] already have user admin                      
ERRO[0000] error creating user: no such table: user     
ERRO[0000] Failed to set maildir: no such table: user   
ERRO[0000] error: no such table: user  

malformed #cgo argument: ${SRCDIR}/lua/src

I've now installed golang-1.7.1 from a tar.gz in /usr/local/go because I was getting the error below, but the problem remains.

go install -v bds/cmd/maild
src/bds/lib/server/server.go:6:2: /home/user/source/bdsmail/src/bds/lib/lua/lua.go: malformed #cgo  argument: ${SRCDIR}/lua/src
make: *** [build] Error 1

Is there any workaround for this?

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.