All:
A specific type of mail message is causing an MTA downstream from me to "blow up". There is nothing wrong with the messages themselves, but the MTA requires an upgrade to handle these messages that requires testing before they can implement. Unfortunately, due to the Holiday season, this isn't happening in a timely manner. Here is the information:

  • All of the message file names begin with di
  • If the string 30 nulls followed by a tab followed by two nulls followed by followed by left paranthesis "(" followed by 1 null appears 10 or more times, the message is "bad" The messages need to be "moved" to another directory, so they won't be processed until after the upgrade
  • There is a file called "exclude", which is a list of di files that should not be processed regardless of the above requirement
  • The queue directory with the di files is very transient, so speed is of the essence
  • The exception list changes much less frequently
  • Sleeping between passes through the directory is critical as to not waste system resources

    Any and all help would be appreciated as the folks downstream have begun 24X7 coverage.

    Here is what I started using - thanks to everyone in the CB

    #!/usr/bin/ksh while : do cd <dir> perl -0777 -ne '$foo=s/\0{30}\t\0\0\(\0//g;rename $ARGV,"../capture/ +n ested/$ARGV" if ($foo >= 10)' di* sleep 3 done

    The problem with this is that it doesn't provide for an exception list.
    Thanks in advance,
    Limbic~Region


    In reply to Hitting a moving target (transient files) by Limbic~Region

    Title:
    Use:  <p> text here (a paragraph) </p>
    and:  <code> code here </code>
    to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.