Jelajahi Sumber

limit helo to 16 characters logged, update README

Jordan Schalm 8 tahun lalu
induk
melakukan
407dcd324c
6 mengubah file dengan 10 tambahan dan 4 penghapusan
  1. 1 0
      Makefile
  2. 5 0
      README.md
  3. 1 1
      dashboard/js/src/action-types.js
  4. 1 1
      dashboard/js/src/components/App.js
  5. 1 1
      dashboard/js/src/theme.js
  6. 1 1
      server.go

+ 1 - 0
Makefile

@@ -22,6 +22,7 @@ dependencies:
 	$(GO_VARS) $(GO) list -f='{{ join .Deps "\n" }}' $(ROOT)/cmd/guerrillad | grep -v $(ROOT) | tr '\n' ' ' | $(GO_VARS) xargs $(GO) install -v
 
 guerrillad: *.go */*.go */*/*.go
+	statik -src=dashboard/js/build -dest=dashboard
 	$(GO_VARS) $(GO) build -o="guerrillad" -ldflags="$(LD_FLAGS)" $(ROOT)/cmd/guerrillad
 
 test: *.go */*.go */*/*.go

+ 5 - 0
README.md

@@ -283,6 +283,11 @@ Currently, the server comes with two example backends:
 - dummy : used for testing purposes
 - guerrilla_db_redis: example uses MySQL and Redis to store email, used on Guerrilla Mail
 
+Web Dashboard
+=============
+
+An optional web-based dashboard is built into GoGuerrilla. To use it, set the dashboard options in the config file, as shown in the Configuration section.
+
 Releases
 ========
 

+ 1 - 1
dashboard/js/src/action-types.js

@@ -1,4 +1,4 @@
-import {createActionTypes} from './util';
+import { createActionTypes } from './util';
 
 export default createActionTypes([
 	'INIT',

+ 1 - 1
dashboard/js/src/components/App.js

@@ -1,5 +1,5 @@
 import React, { Component } from 'react';
-import {connect} from 'react-redux';
+import { connect } from 'react-redux';
 import LineChart from './LineChart';
 import RankingTable from './RankingTable';
 

+ 1 - 1
dashboard/js/src/theme.js

@@ -1,4 +1,4 @@
-const {assign} = Object;
+const { assign } = Object;
 
 // Colors
 const colors = [

+ 1 - 1
server.go

@@ -405,7 +405,7 @@ func (server *server) handleClient(client *client) {
 				} else {
 					server.log.WithFields(map[string]interface{}{
 						"event":   "mailfrom",
-						"helo":    client.Helo,
+						"helo":    client.Helo[:16],
 						"domain":  from.Host,
 						"address": client.RemoteAddress,
 						"id":      client.ID,