Giter VIP home page Giter VIP logo

maillog2db's People

Contributors

cornerot avatar smizdev 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

maillog2db's Issues

Problem in compilation

Hello, when I type go build, it says to me :

./maillog2db.go:158: cannot assign *gorm.DB to DBCONN (type gorm.DB) in multiple assignment

My system :


Distributor ID: Ubuntu
Description:    Ubuntu 16.04.5 LTS
Release:        16.04
Codename:       xenial
root@smtp-out:/opt/maillog2db# go version
go version go1.6.2 linux/amd64

Can you help me ? Thank you !

Error when compiling - library tail not available

Hi,
we have an issue when compiling: docker build -t maillog2db .
Sending build context to Docker daemon 5.118MB
Step 1/7 : FROM golang:1.14.4 AS builder
1.14.4: Pulling from library/golang
e9afc4f90ab0: Pull complete
989e6b19a265: Pull complete
af14b6c2f878: Pull complete
5573c4b30949: Pull complete
d4020e2aa747: Pull complete
85383fed8a84: Pull complete
0bdb3996894f: Pull complete
Digest: sha256:d31a307a7e42116adb00d8d70971dbf228460904dd9b6217e911d088aa4b650c
Status: Downloaded newer image for golang:1.14.4
---> 00d970a31ef2
Step 2/7 : WORKDIR /app
---> Running in e97ed3d74803
Removing intermediate container e97ed3d74803
---> 5d7ce43baf0e
Step 3/7 : COPY go.mod go.sum maillog2db.go ./
---> 83f6f84c1d84
Step 4/7 : RUN go mod download && CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o app
---> Running in fe25cf86d7eb
go: github.com/ActiveState/[email protected]: Get "https://proxy.golang.org/github.com/%21active%21state/tail/@v/v1.0.0.mod": dial tcp: i/o timeout
The command '/bin/sh -c go mod download && CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-extldflags "-static"' -o app' returned a non-zero code: 1

Don't parse on date 1 apr)))

Hello!
I found interesting bug:

file for test:
Apr 1 16:55:07 bs2 postfix/qmgr[17609]: D94E03B62: removed
Apr 04 16:55:07 bs2 postfix/qmgr[17609]: D94E03B62: removed
Apr 30 00:00:05 bs1 postfix/postfix-script[5689]: refreshing the Postfix mail system

run maillog2db

receive only:
timestamp: Apr 04 16:55:07
mailhost: bs2
process: postfix/qmgr
processid: 17609
message: D94E03B62: removed
entry matches no available regex D94E03B62: removed

timestamp: Apr 30 00:00:05
mailhost: bs1
process: postfix/postfix-script
processid: 5689
message: refreshing the Postfix mail system
entry matches no available regex refreshing the Postfix mail system

Attention: maillog2db don't parse "Apr 1 16:55:07 bs2 postfix/qmgr[17609]: D94E03B62: removed" !

BUT if I add "0" and string will be
Apr 01 16:55:07 bs2 postfix/qmgr[17609]: D94E03B62: removed

all will be good:

timestamp: Apr 01 16:55:07
mailhost: bs2
process: postfix/qmgr
processid: 17609
message: D94E03B62: removed
entry matches no available regex D94E03B62: removed

timestamp: Apr 04 16:55:07
mailhost: bs2
process: postfix/qmgr
processid: 17609
message: D94E03B62: removed
entry matches no available regex D94E03B62: removed

timestamp: Apr 30 00:00:05
mailhost: bs1
process: postfix/postfix-script
processid: 5689
message: refreshing the Postfix mail system
entry matches no available regex refreshing the Postfix mail system

BUT postfix by default write date in format Apr 1 ....
How I can fix it?
PS Debian 10

some tables are empty ...

Hi,

I executed script with suitable parameters . all of postfix logs placed into "pfmaillog2db_logs" and other tables were empty .
would you please tell me why ?
thanks.
farfar56

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.