Browse Source

update readme
fix go vet problems
remove goroutine count from greeting banner

flashmob 8 years ago
parent
commit
71883636ca
3 changed files with 15 additions and 12 deletions
  1. 12 9
      README.md
  2. 1 1
      backends/gateway_test.go
  3. 2 2
      server.go

+ 12 - 9
README.md

@@ -286,16 +286,17 @@ http://jsonlint.com/#
 Email Processing Backend
 =====================
 
-The main job of a go-guerrilla backend is to save email. 
+The main job of a go-guerrilla backend is to validate recipients and deliver emails. The term
+"delivery" is often synonymous with saving email to secondary storage.
 
-It can also validate recipients.
+The default backend implementation manages multiple workers. These workers are composed of 
+smaller components called "Processors" which are chained using the config to perform a series of steps.
+Each processor specifies a distinct feature of behaviour. For example, a processor may save
+the emails to a particular storage system such as MySQL, or it may add additional headers before 
+passing the email to the next _processor_.
 
-Using a producer/consumer model, our backend manages multiple workers. These workers are composed of 
-smaller components called "Processors" which can be chained via the config to perform a series of steps.
-Each processor specifies a unique feature of behaviour for processing the envelope.
-
-To extend or add a feature, one would write a new Processor, then add it to the config.
-There are a few default processors to get you started.
+To extend or add a new feature, one would write a new Processor, then add it to the config.
+There are a few default _processors_ to get you started.
 
 ### Documentation
 
@@ -320,12 +321,14 @@ See the full documentation here:
 | Processor | Description |
 |-----------|-------------|
 |[MailDir](https://github.com/flashmob/maildir-processor)|Save emails to a maildir. [MailDiranasaurus](https://github.com/flashmob/maildiranasaurus) is an example project|
+|[FastCgi](https://github.com/flashmob/fastcgi-processor)|Deliver email directly to PHP-FPM or a similar FastCGI backend.
 
+Have a processor that you would like to share? Submit a PR to add it to the list!
 
 Releases
 ========
 
-(Master branch - Release Candidate 1 for v1.6)
+(Master branch - Release Candidate 1 for v2.0)
 Large refactoring of the code. 
 - Introduced "backends": modular architecture for saving email
 - Issue: Use as a package in your own projects! https://github.com/flashmob/go-guerrilla/issues/20

+ 1 - 1
backends/gateway_test.go

@@ -79,7 +79,7 @@ func TestStartProcessStop(t *testing.T) {
 		RemoteIP: "127.0.0.1",
 		QueuedId: "abc12345",
 		Helo:     "helo.example.com",
-		MailFrom: mail.Address{"test", "example.com"},
+		MailFrom: mail.Address{User: "test", Host: "example.com"},
 		TLS:      true,
 	}
 	e.PushRcpt(mail.Address{"test", "example.com"})

+ 2 - 2
server.go

@@ -287,9 +287,9 @@ func (server *server) handleClient(client *client) {
 	server.log.Infof("Handle client [%s], id: %d", client.RemoteIP, client.ID)
 
 	// Initial greeting
-	greeting := fmt.Sprintf("220 %s SMTP Guerrilla(%s) #%d (%d) %s gr:%d",
+	greeting := fmt.Sprintf("220 %s SMTP Guerrilla(%s) #%d (%d) %s",
 		sc.Hostname, Version, client.ID,
-		server.clientPool.GetActiveClientsCount(), time.Now().Format(time.RFC3339), runtime.NumGoroutine())
+		server.clientPool.GetActiveClientsCount(), time.Now().Format(time.RFC3339))
 
 	helo := fmt.Sprintf("250 %s Hello", sc.Hostname)
 	// ehlo is a multi-line reply and need additional \r\n at the end