My Postcards Platinum c Web Application (version 6)

Owner's Manual: Administration

  1. Cardshop Stats, Reports and Extracted e-mail Addresses
  2. Element stats configuration
  3. Finding Cards with Number
  4. Finding Cards without Number
  5. Custom configurations
  6. ASAP/QUEUE mail delivery
  7. Storing large amounts of card datafiles
  8. Cron job parameters
  1. Cardshop Stats

    Cardshop stats are accessible from the admin interface http://yourdomain/$ADM_DIR/ . It is highly advisable to password-protect the whole admin directory.

    Counter stats are updated in real time. Element usage reports are updated daily according to cron settings (usually at night time when the load on server is low).

    Counter datafiles can be downloaded and converted into many formats using the admin interface. Downloaded files can be easily imported into many spreadsheet programs.

    If configured all email addresses extracted from sent cards are accumulated in $STATS_PATH/logs/email.dat and/or $STATS_PATH/logs/SENDEREMAIL.dat - plain text files, one address per line.

  2. Element Stats Configuration

    Starting with Version 6 you can choose to collect stats for most cardshop composition elements, or choose not to collect any element stats at all (setup by default).

    You can select which elements to monitor stats for use web-based admin. Most likely you would like to monitor "filename" (pictures). If you want to collect email addresses enable "email" and "SENDEREMAIL" elements.

    Please be advised that enabling element stats for "header" and "signature" can eat a lot of disk space and server resources. Don't enable it unless absolutely necessary.

    When you change the stats elements config, the "today's elements" stats will be zeroed and restarted anew immediately. However, the stats history won't be affected in any way.

  3. Finding Cards with Number

    At the bottom of the admin page (accessible from http://yourdomain/$ADM_DIR/) there is a form for easy card checkup. When you pick up the card this way no pickup notice is sent, no counter is updated.

    When viewing a card "as datafile" you can see some tracking info about card sender and card recipient (date, IP and user agent).

    Viewing card "as is" shows card exactly as seen by the recipient. This feature is very handy when verifying visitors' complaints about something not seen or heard.

  4. Finding Cards without Number

    Sometimes you have to find a card without knowing the exact ticket number. It is possible. You have to use telnet or ssh login for that purpose.

    Important! If you are about to ask what telnet or ssh is - skip reading any of the remaining part of administration section completely. It is of no use for you yet. Teaching the basics of webserver administration is not something that is included in this software license and you have to learn them elsewhere yourself.

    The cards are stored in $CARDS_PATH in subdirectories which correspond to months and days. For example a card which has to be sent on Jan 10th will be stored in $CARDS_PATH/01/10 subdirectory.

    The name of the cards datafile can be defined by taking the first 4 digits from the card number. For detailed info how a card number is formed please refer to system generated variables.

    If you need to find a card by for example email address and you know it has been sent on Jan 10th you type from the shell prompt:

    fgrep 'targetemail' $CARDS_PATH/01/10/*

    Of course you should replace $CARDS_PATH with the actual path (refer to global configuration in admin) and targetemail with a real query string.

    The first column in results output will give you a card datafile number (datafile). You can reconstruct the actual card number as: MMDDdatafile.

  5. Custom configurations

    Custom configuration files are used to specify the different sets of HTML and e-mail templates. Such files are to be placed in $INC_PATH/conf, should have *.txt extension and permissions chmod 666.

    Starting with Version 6 you can edit and create new custom configurations using the web-based admin program. However, if for some reason you are editing these files off-line and uploading with FTP be sure to use ASCII transfer mode.

    By default "magic" configuration (magic.txt configuration file) is used. Below are the contents of magic.txt from a sample cardshop with minimal number of settings.


    Another sample configuration "v6" (v6.txt configuration file) contains maximum number of settings.

    PRE_PAGE|preview6.html     - posty preview template
    REC_PAGE|receive6.html     - received posty template
    SEN_PAGE|sent6.html        - sent confirmation template
    MULTI|multi6.html          - template for multiple recipients input
    EMAIL|email6.html          - template for single recipient input
    SAVE|save6.html            - template for saved posty
    PRINT|print6.html          - template for print version of posty
    FWD|forward6.html          - template for multiple recipients input for forwarded posty
    CARD_MAIL|mail1.txt        - "you have a posty" e-mail template
    PICK_MAIL|mail2.txt        - "your psoty was received" e-mail template
    SELF_MAIL|mail-self.txt    - archive copy e-mail template
    FWD_MAIL|fwdmail1.txt      - forwarded posty e-mail template
    LANG|EN                    - language for this config

    More details about these templates and how to use them is explained in "customization" section.

  6. ASAP/QUEUE e-mail delivery

    You don't really need this feature unless you are running a very high traffic cardshop. When your traffic goes over 10 000 cards daily you can return to this paragraph.

    The global config defines the parameter MODE. By default it is set to ASAP. In this mode email notifications about sent or received card are sent immediately after the request is submitted.

    However in event of high traffic when the number of requests submitted within some short time interval is over the max number of processes that your server can handle gracefully, the load can be normalized by changing this parameter to QUEUE.

    In QUEUE mode the email notifications are send at scheduled intervals (by default - hourly). The intervals are set by cronjobs.

    The changes between ASAP and QUEUE mode are instant. You can balance load using this switch quite effectively.

  7. Storing large amounts of card datafiles

    This section can be useful if you maintain a high traffic site (10 000 cards a day and up) and want to store cards for long time intervals (months).

    Most UNIX systems are compiled by default with a fairly low number of file descriptors (inodes) available. High traffic cardshops with cards stored for 60-90 days can get over the inodes limit in few months. It will result in server's inability to create new files and therefore to complete crash.

    The solution is to create several new filesystems to use for example for storing monthly card datafiles (e.g. $CARDS_PATH/01/ - for January). This is something you should consider beforehand when setting up a dedicated server or adding a new harddrive. Consult with your sysadmin about this issue.

  8. Cron job parameters

    The source file for cron job is usually stored in $STATS_DIR. The typical syntax is below:

    15 0,6,12,15,18,21,22,23 * * * $QUEUE_DIR/ 2>&1
    45 * * * * $QUEUE_DIR/ 2>&1
    1 0 * * * $STATS_DIR/
    25 0 * * * cd $STATS_DIR; ./ > make_report.log 2>&1
    25 3 * * * cd $STATS_DIR; ./ >> cardadmin.log

    Admin shell scripts invoked by cron perform the following tasks:

    Processes the queue of e-mail notifications scheduled to be sent later. Writes logfile into $QUEUE_DIR.
    Processes the queue of e-mails produced by multi-send feature or all current e-mails when the cardshop is running in QUEUE mode. Writes logfile into $QUEUE_DIR.
    Updates later.txt
    Prepares datafiles for element stats.
    Runs old cards cleanup.

    You can change the cron schedule for all scripts except, - IF you know what you are doing. We strongly advise against running at any time other than night time, when traffic is usually low. It's the most resource intense script especially on high traffic sites.

My Postcards Platinum c Web Application, version 6.
Copyright c 1996-2002 Webby, Inc. All rights reserved.