CKent,
After clearly defining your requirements, you might want to investigate if there are any low cost products that already meet your needs. That said....

I would use Mail::Audit. Presumably, your MTA can deliver emails to a program and not to a mailbox. This would alleviate the need for a cron. You can use the body method to parse for your desired info. You can use your database of choice (MySQL, PostgreSQL, DBD::SQLite, etc) to store/retrieve your information. Next, you can use the reply method to send the desired response back. Finally, you can use the resend method to send the email to a real mailbox for long term storage.

As far as parts 2 and 3, these are separate scripts that interact with the database in part 1. The second one can be done with a cron job that determines the difference between the create timestamp stored in the database and the current timestamp. The 3rd one can be done by incrementing a column in the database each time someone logs in.

Of course there are lot's of issues such as session management, properly handling locking to avoid DoS attacks, etc. When you are beyond this general description and down in the weeds, come back and ask specific advice and we will be here waiting.

Cheers - L~R


In reply to Re: Newbie: Parsing Email by Limbic~Region
in thread Newbie: Parsing Email by CKent

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.