Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- params='-hostname=me.example.org -logger=postfix-in -pid=1234'
- while true; do
- for msg in \
- 'connect from somehost.example.org[10.1.2.3]' \
- '12345678: client=somehost.example.org[10.1.2.3]' \
- '12345678: message-id=<20150709142617.12345678@me.example.org>' \
- '12345678: from=<no-reply@app.example.org>, size=1289, nrcpt=1 (queue active)' \
- '12345678: to=<someuser@example.org>, relay=smarthost.example.org[10.2.3.4]:25, delay=0.29, delays=0.05/0/0.04/0.2, dsn=2.6.0, status=sent (250 2.6.0 <20150709142617.12345678@me.example.org> [InternalId=5678] Queued mail for delivery)' \
- '12345678: removed' \
- 'disconnect from somehost.example.org[10.1.2.3]'; do
- heka-inject $params -payload="$msg"
- sleep 2
- done
- done
- # Expected output:
- Fields:
- connect_from_host=somehost.example.org
- connect_from_ip=10.1.2.3
- client_host=somehost.example.org
- client_ip=10.1.2.3
- message_id=20150709142617.12345678@me.example.org
- from=no-reply@app.example.org
- size=1289
- nrcpt=1
- to=someuser@example.org
- relay_host=smarthost.example.org
- relay_ip=10.2.3.4
- relay_port=25
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement