Guest User

Untitled

a guest
Oct 22nd, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.09 KB | None | 0 0
  1. ** Contents of the script **
  2. ** Input lines of the argument files embedded as annotation **
  3.  
  4.  
  5. #!/usr/local/bin/dgsh
  6.  
  7. MITTENTE=$1
  8. shift
  9.  
  10. # invoked as match-dgsh messages@mailagenziaentrate40.top filename
  11. # contents of "filename" below
  12.  
  13. #Oct 13 14:11:17 mx1 postfix/smtpd[27128]: 011F0120045: client=mailagenziaentrate40.top[82.202.248.170]
  14. #Oct 13 14:11:17 mx1 postfix/cleanup[17224]: 011F0120045: message-id=<B24801BDDD092784585D14AAAEF48E02@mailagenziaentrate40.top>
  15. #Oct 13 14:11:17 mx1 postfix/cleanup[17224]: 011F0120045: info: header Subject: Lettera di Sollecito from mailagenziaentrate40.top[82.202.248.170]; from=<messages@mailagenziaentrate40.top> to=<test@example.com> proto=ESMTP helo=<mailagenziaentrate40.top>
  16. #Oct 13 14:11:17 mx1 postfix/qmgr[15544]: 011F0120045: from=<messages@mailagenziaentrate40.top>, size=97531, nrcpt=1 (queue active)
  17. #Oct 13 14:11:23 mx1 postfix/smtp[15939]: 011F0120045: to=<test@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=8.2, delays=1.7/0/0/6.5, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as CA65A120044)
  18. #Oct 13 14:11:23 mx1 postfix/qmgr[15544]: 011F0120045: removed
  19. #Oct 13 14:12:17 mx1 postfix/smtpd[27128]: 123FF324567: client=mailagenziaentrate40.top[82.202.248.170]
  20. #Oct 13 14:12:17 mx1 postfix/cleanup[17224]: 123FF324567: message-id=<B24801BDDD092784585D14F12312@mailagenziaentrate40.top>
  21. #Oct 13 14:12:17 mx1 postfix/cleanup[17224]: 123FF324567: info: header Subject: Lettera di Sollecito from mailagenziaentrate40.top[82.202.248.170]; from=<messages@mailagenziaentrate40.top> to=<sample@prrrr.to> proto=ESMTP helo=<mailagenziaentrate40.top>
  22. #Oct 13 14:12:17 mx1 postfix/qmgr[15544]: 123FF324567: from=<messages@mailagenziaentrate40.top>, size=97531, nrcpt=1 (queue active)
  23. #Oct 13 14:12:23 mx1 postfix/smtp[15939]: 123FF324567: to=<sample@prrrr.to>, relay=127.0.0.1[127.0.0.1]:10024, delay=8.2, delays=1.7/0/0/6.5, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as CA65A120044)
  24. #Oct 13 14:12:23 mx1 postfix/qmgr[15544]: 123FF324567: removed
  25.  
  26. xzcat -f "$@" |
  27. {{
  28. grep -E 'Subject:.*from=<'"${MITTENTE}" |
  29. #Oct 13 14:11:17 mx1 postfix/cleanup[17224]: 011F0120045: info: header Subject: Lettera di Sollecito from mailagenziaentrate40.top[82.202.248.170]; from=<messages@mailagenziaentrate40.top> to=<test@example.com> proto=ESMTP helo=<mailagenziaentrate40.top>
  30. #Oct 13 14:12:17 mx1 postfix/cleanup[17224]: 123FF324567: info: header Subject: Lettera di Sollecito from mailagenziaentrate40.top[82.202.248.170]; from=<messages@mailagenziaentrate40.top> to=<sample@prrrr.to> proto=ESMTP helo=<mailagenziaentrate40.top>
  31. grep -oP '[[:xdigit:]]+(?=: info: header Subject:)' |
  32. #011F0120045
  33. #123FF324567
  34. sort -u &
  35. #011F0120045
  36. #123FF324567
  37.  
  38. cat &
  39. }} |
  40. grep -F --matching-lines --file=- |
  41. #Oct 13 14:11:17 mx1 postfix/smtpd[27128]: 011F0120045: client=mailagenziaentrate40.top[82.202.248.170]
  42. #Oct 13 14:11:17 mx1 postfix/cleanup[17224]: 011F0120045: message-id=<B24801BDDD092784585D14AAAEF48E02@mailagenziaentrate40.top>
  43. #Oct 13 14:11:17 mx1 postfix/cleanup[17224]: 011F0120045: info: header Subject: Lettera di Sollecito from mailagenziaentrate40.top[82.202.248.170]; from=<messages@mailagenziaentrate40.top> to=<test@example.com> proto=ESMTP helo=<mailagenziaentrate40.top>
  44. #Oct 13 14:11:17 mx1 postfix/qmgr[15544]: 011F0120045: from=<messages@mailagenziaentrate40.top>, size=97531, nrcpt=1 (queue active)
  45. #Oct 13 14:11:23 mx1 postfix/smtp[15939]: 011F0120045: to=<test@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=8.2, delays=1.7/0/0/6.5, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as CA65A120044)
  46. #Oct 13 14:11:23 mx1 postfix/qmgr[15544]: 011F0120045: removed
  47. #Oct 13 14:12:17 mx1 postfix/smtpd[27128]: 123FF324567: client=mailagenziaentrate40.top[82.202.248.170]
  48. #Oct 13 14:12:17 mx1 postfix/cleanup[17224]: 123FF324567: message-id=<B24801BDDD092784585D14F12312@mailagenziaentrate40.top>
  49. #Oct 13 14:12:17 mx1 postfix/cleanup[17224]: 123FF324567: info: header Subject: Lettera di Sollecito from mailagenziaentrate40.top[82.202.248.170]; from=<messages@mailagenziaentrate40.top> to=<sample@prrrr.to> proto=ESMTP helo=<mailagenziaentrate40.top>
  50. #Oct 13 14:12:17 mx1 postfix/qmgr[15544]: 123FF324567: from=<messages@mailagenziaentrate40.top>, size=97531, nrcpt=1 (queue active)
  51. #Oct 13 14:12:23 mx1 postfix/smtp[15939]: 123FF324567: to=<sample@prrrr.to>, relay=127.0.0.1[127.0.0.1]:10024, delay=8.2, delays=1.7/0/0/6.5, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as CA65A120044)
  52. #Oct 13 14:12:23 mx1 postfix/qmgr[15544]: 123FF324567: removed
  53. grep -oP '(?<=: to=<)[^>]+'
  54. #test@example.com
  55. #sample@prrrr.to
  56.  
  57.  
  58. *** Output ***
  59.  
  60. dgsh -x match.dgsh messages@mailagenziaentrate40.top logfile
  61. + MITTENTE=messages@mailagenziaentrate40.top
  62. + shift
  63. + dgsh-wrap xzcat -f logfile
  64. + grep -F --matching-lines --file=-
  65. + grep -oP '(?<=: to=<)[^>]+'
  66. + dgsh-conc -o 2
  67. + dgsh-conc -i 2
  68. + grep -E 'Subject:.*from=<messages@mailagenziaentrate40.top'
  69. + grep -oP '[[:xdigit:]]+(?=: info: header Subject:)'
  70. + wait
  71. + sort -u
  72. + cat
  73. ERROR: More than one edges are flexible. Cannot compute solution. Exiting.
  74. dgsh: No solution was found to satisfy the I/O requirements of the following 0 participating processes:
  75. *** Error in `dgsh-wrap': free(): invalid pointer: 0x00007ffc5e3e2ae4 ***
  76. ======= Backtrace: =========
  77. /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f42fce417e5]
  78. /lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f42fce4a37a]
  79. /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f42fce4e53c]
  80. dgsh-wrap[0x4058e2]
  81. dgsh-wrap[0x406208]
  82. dgsh-wrap[0x40ac5f]
  83. dgsh-wrap[0x402483]
  84. /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f42fcdea830]
  85. dgsh-wrap[0x401439]
  86. ======= Memory map: ========
  87. 00400000-0040f000 r-xp 00000000 08:11 8535587 /usr/local/libexec/dgsh/dgsh-wrap
  88. 0060f000-00610000 r-xp 0000f000 08:11 8535587 /usr/local/libexec/dgsh/dgsh-wrap
  89. 00610000-00611000 rwxp 00010000 08:11 8535587 /usr/local/libexec/dgsh/dgsh-wrap
  90. 013bb000-013dc000 rwxp 00000000 00:00 0 [heap]
  91. 7f42f8000000-7f42f8021000 rwxp 00000000 00:00 0
  92. 7f42f8021000-7f42fc000000 ---p 00000000 00:00 0
  93. 7f42fcbb4000-7f42fcbca000 r-xp 00000000 08:11 6817824 /lib/x86_64-linux-gnu/libgcc_s.so.1
  94. 7f42fcbca000-7f42fcdc9000 ---p 00016000 08:11 6817824 /lib/x86_64-linux-gnu/libgcc_s.so.1
  95. 7f42fcdc9000-7f42fcdca000 rwxp 00015000 08:11 6817824 /lib/x86_64-linux-gnu/libgcc_s.so.1
  96. 7f42fcdca000-7f42fcf8a000 r-xp 00000000 08:11 6828166 /lib/x86_64-linux-gnu/libc-2.23.so
  97. 7f42fcf8a000-7f42fd18a000 ---p 001c0000 08:11 6828166 /lib/x86_64-linux-gnu/libc-2.23.so
  98. 7f42fd18a000-7f42fd18e000 r-xp 001c0000 08:11 6828166 /lib/x86_64-linux-gnu/libc-2.23.so
  99. 7f42fd18e000-7f42fd190000 rwxp 001c4000 08:11 6828166 /lib/x86_64-linux-gnu/libc-2.23.so
  100. 7f42fd190000-7f42fd194000 rwxp 00000000 00:00 0
  101. 7f42fd194000-7f42fd1ba000 r-xp 00000000 08:11 6815831 /lib/x86_64-linux-gnu/ld-2.23.so
  102. 7f42fd384000-7f42fd387000 rwxp 00000000 00:00 0
  103. 7f42fd3b6000-7f42fd3b9000 rwxp 00000000 00:00 0
  104. 7f42fd3b9000-7f42fd3ba000 r-xp 00025000 08:11 6815831 /lib/x86_64-linux-gnu/ld-2.23.so
  105. 7f42fd3ba000-7f42fd3bb000 rwxp 00026000 08:11 6815831 /lib/x86_64-linux-gnu/ld-2.23.so
  106. 7f42fd3bb000-7f42fd3bc000 rwxp 00000000 00:00 0
  107. 7ffc5e3c3000-7ffc5e3e4000 rwxp 00000000 00:00 0 [stack]
  108. 7ffc5e3f7000-7ffc5e3f9000 r--p 00000000 00:00 0 [vvar]
  109. 7ffc5e3f9000-7ffc5e3fb000 r-xp 00000000 00:00 0 [vdso]
  110. ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
  111. 9320 dgsh: timeout for negotiation. Exit.
  112. 9321 dgsh: timeout for negotiation. Exit.
  113. 9319 dgsh: timeout for negotiation. Exit.
  114. 9318 dgsh: timeout for negotiation. Exit.
  115. 9323 dgsh: timeout for negotiation. Exit.
  116. 9324 dgsh: timeout for negotiation. Exit.
  117. 9322 dgsh: timeout for negotiation. Exit.
  118. 9325 dgsh: timeout for negotiation. Exit.
Add Comment
Please, Sign In to add comment