majestrate / bdsmail Goto Github PK
View Code? Open in Web Editor NEWbrain dead simple mail
License: MIT License
brain dead simple mail
License: MIT License
All *.go files are missing the vendor path when I try to run make on this.
For example:
log "github.com/Sirupsen/logrus"
should be
log "vendor/github.com/Sirupsen/logrus"
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?
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
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:
At present after retrying if delivery fails there isn't anything to warn the sender about that.
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?
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
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?
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 ?
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?
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..
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?
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
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.