Created
October 8, 2019 09:53
-
-
Save tomredsky/bac843682bd634b5dbb0e855242e6447 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# simple pipe_address script to dump mails for 'juno-crm' into 'sirius2::juno/' rsyncd share for processing | |
# | |
# ( see: ansible:roles/rsyncd ) | |
# Revision: removed '--perm' arg. 1) it's --perms and 2) let the receiver manager perms | |
tmp="/tmp/juno_$$" | |
cat - | tee ${tmp} | head -n 5 | grep ' id' | awk '{ print $2 }' > ${tmp}_id | |
rsync --remove-source-files $tmp 192.168.0.171::juno/$( date +%s )_$( cat ${tmp}_id ).eml | |
rm ${tmp}_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment