Comments (8)
Go program just needs to get the result to see if the send was successful. Of course, you do not need to use Go for that - there are many ways to skin a cat. This is really a Producer–consumer problem, whatever way you use to solve it should be fine :-)
from go-guerrilla.
For sending email, it's much more tricky since there's a lot of moving parts such as DKIM, SPF, feedback loops, IP address reputation and more. Perhaps a cloud offering such as mailgun.com or mandrill.com could be used, or you could DIY and configure an instance of postfix if you are familar with setting all that up.
We are currently refactoring the server to be more modular so that it would be easier to add new features in the future.
from go-guerrilla.
Is Postfix better than Exim? (I've used Exim in the past and it's slightly complicated).
Thanks
from go-guerrilla.
I've done some research and Postfix seems better (more modular, better confi). For the Go solution, I've found these libraries (in rough order of priority):
https://godoc.org/github.com/eaigner/dkim
https://godoc.org/github.com/toorop/go-dkim
https://godoc.org/github.com/emailfabric/dkim
https://github.com/gopistolet/gospf
https://godoc.org/github.com/zaccone/goSPF/spf
https://godoc.org/github.com/cathalgarvey/gospf
https://github.com/daniellockard/gospfquery
from go-guerrilla.
This is how email is sent on Guerrilla Mail:
For DKIM key generation, the dkim tools package is very useful:
apt install opendkim-tools
and then the following command to generate the keys:
opendkim-genkey -r -b 2048 -d guerrillamail.com -s selector_name --hash-algorithms=sha256 --directory=/path/to/somewhere
(Where selector_name can be any name you choose)
Then the DNS is updated with the public key, the private key is used for signing. You only need to do this once every year or so. Also the SPF is also set in the DNS records, no need to use any other tools / programs.
Guerrilla Mail has all the DKIM and SPF admin procedure fully automated.
As for sending, a Go program is used to read messages from a queue and schedule them for sending. To do the actual sending, the Go program executes a legacy PHP script through a FastCGI backend ( https://github.com/flashmob/go-fastcgi-client ). The PHP does the signing, reads the MX records, chooses the best MX server and uses https://github.com/PHPMailer/PHPMailer to do the actual sending and returns the result to the Go program...
The packages you have linked to are mostly for validating DKIM / SPF, but validation is only used for spam filtering, we just have to sign the message with our key when sending and make sure that our SPF and DMARC records are configured + any other administrative tasks.
from go-guerrilla.
Thanks, this is very useful.
For a webmail solution, where I get messages I care about, I would need to filter spam (on the received messages) using DMARC (DKIM+SPF), that's why I thought I would need the validating libs.
from go-guerrilla.
Welcome, Thanks for asking.
A quick way to setup a spam filter would be to
apt-get install spamassassin spamc
/etc/init.d/spamassassin restart
and then do something like in this example: https://github.com/saintienn/go-spamc
from go-guerrilla.
I know this issue is closed, but I am just wondering why would you need "Go" to process the output of PHP script (that is used to send emails via PHPMailer like mentioned above)?
from go-guerrilla.
Related Issues (20)
- Conversion from int64 to string yields a string of one rune in mail/envelope.go and bad conf. for response and testcert tests (gollvm; Ubuntu 20.04.1) HOT 3
- Scary Enough for Halloween Contest HOT 1
- Some service say the generated e-mail is not valid HOT 1
- Feature request: Delay before sending a message HOT 2
- Runtime error: index out of range HOT 2
- CPU restriction to 1 HOT 1
- Little bug corrected for windows HOT 4
- AWS S3 Backend HOT 1
- Need larger emails to be supported
- Windows Compilation HOT 1
- I need a build a service for expiring e-mail HOT 1
- Email subject is empty when subject contains blue heart symbol HOT 2
- Allow to pre-fill the "To" (e-mail) and "Subject" fields using URL arguments HOT 1
- GuerrilaMail doesn't send email HOT 3
- Only part of domains was blocked that organisation?
- is this project abandoned? HOT 4
- Is the project and bounties still active? HOT 5
- start error error while initializing the backend: processor [mysql] not found
- How to get email content when email is sent to server? HOT 1
- AUTH LOGIN Support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-guerrilla.