Oh wise gurus. I humbly solicit your assistance in solving this problem.

I'm parsing some mail logs to check on some mail rejections. The issue that I'm not exactly sure how to proceed with is the data that I get from the logs.

Of course each sender could be sending to multiple recipients, so a simple hash won't do the trick I don't think. I'm not sure what the best approach is. A HoH, or a HoA. What I'm hoping to end up with a report something along the lines of the following.

recipient1 sender1 sender2 sender3 ... ... recipient2 sender1 sender2 sender3 ... ...
My thoughts are a HoA is the proper way to proceed. But I want to confirm my approach is correct before proceeding. Perhaps there is a better way?

Thanks,
Mike

Update: Thanks davido. I think my needs are simple. This is a small system. Very few users, lots of senders.

Update II: Thanks wfsp. I could complicate this greatly by doing something like the following, but that is really beyond the scope of what I'm trying to do at the moment. What I'm really trying to prove is the rejects are all valid. So I will be showing this data to the powers that be and let them see if any 'valid' mail is being rejected.

recipient1 sender1 -- reject reason sender2 -- reject reason sender3 -- reject reason ... ... recipient2 sender1 -- reject reason sender2 -- reject reason sender3 -- reject reason ... ...

In reply to HoH, HoA, or something else? by cajun

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.