Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
postfix-stats
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
misc
postfix-stats
Commits
2079c6b6
Commit
2079c6b6
authored
6 years ago
by
Jan Philipp Timme
Browse files
Options
Downloads
Patches
Plain Diff
Indentation fixed
parent
bf20800f
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
collector.sh
+4
-5
4 additions, 5 deletions
collector.sh
with
4 additions
and
5 deletions
collector.sh
+
4
−
5
View file @
2079c6b6
...
...
@@ -5,8 +5,6 @@
# The events are then reported to something.
#
# TODO: Also treat inbound email - maybe even accept things like proxy-accept and proxy-reject?
# Debugging option
#set -x
...
...
@@ -111,7 +109,8 @@ mo_deferred=$( sed -n "$old_log_position","$new_log_position"p $LOGFILE
mo_deliverable
=
$(
sed
-n
"
$old_log_position
"
,
"
$new_log_position
"
p
$LOGFILE
|
grep
'\/smtp\['
|
grep
'status=deliverable'
|
grep
-v
'relay=127\.0\.0\.1\|relay=localhost\|relay=::1'
|
wc
-l
)
mo_undeliverable
=
$(
sed
-n
"
$old_log_position
"
,
"
$new_log_position
"
p
$LOGFILE
|
grep
'\/smtp\['
|
grep
'status=undeliverable'
|
grep
-v
'relay=127\.0\.0\.1\|relay=localhost\|relay=::1'
|
wc
-l
)
mo_bncd_total
=
$(
sed
-n
"
$old_log_position
"
,
"
$new_log_position
"
p
$LOGFILE
|
grep
'\/smtp\['
|
grep
'status=bounced'
|
grep
-v
'relay=127\.0\.0\.1\|relay=localhost\|relay=::1'
|
wc
-l
)
mo_bncd_spam
=
$(
sed
-n
"
$old_log_position
"
,
"
$new_log_position
"
p
$LOGFILE
|
grep
'\/smtp\['
|
grep
'status=bounced'
|
grep
-i
'spam'
|
grep
-v
'relay=127\.0\.0\.1\|relay=localhost\|relay=::1'
|
wc
-l
)
mo_bncd_spam
=
$(
sed
-n
"
$old_log_position
"
,
"
$new_log_position
"
p
$LOGFILE
|
grep
'\/smtp\['
|
grep
'status=bounced'
|
grep
-i
'spam'
|
grep
-v
'relay=127\.0\.0\.1\|relay=localhost\|relay=::1'
|
wc
-l
)
mo_bncd_reputation
=
$(
sed
-n
"
$old_log_position
"
,
"
$new_log_position
"
p
$LOGFILE
|
grep
'\/smtp\['
|
grep
-i
'reputation'
|
grep
-v
'relay=127\.0\.0\.1\|relay=localhost\|relay=::1'
|
wc
-l
)
# Collect inbound email statistics
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment