|
Cron-based e-mail sending speeds up the posting process considerably. This document tells you how to set it up.
System Requirements
- Discus 4.0 or higher
- All Discus system requirements
- All Discus system requirements for e-mail notification (with unix command line mailer)
- All Discus system requirements for reply by e-mail (if used)
- "cron" (or equivalent package) for scheduling of events
- Ability to schedule jobs with "cron" (edit your own crontab)
These system requirements are absolute, meaning that if you do not meet one of these system requirements, this method of e-mail sending will not work on your server. If this feature is important to you, we insist that you try it out in the freeware version prior to purchasing Discus Professional.
Of these system requirements, the one you may have the most problems with is the last one. Generally, the "crontab" (list of tasks for the "cron" scheduling daemon) can be edited only if you have telnet access to your system. Some servers may be set up not to allow you to have your own crontab, so you may need to e-mail your system administrator to have them set this up for you.
Synopsis
Traditional e-mail sending with Discus functions by opening the mail program (such as sendmail) during the operation (such as posting). This slows down the operation because Discus must wait until the mail program sends all messages before it ends its own processing. The cron-based e-mail sending has Discus write all of the data to be sent into a file (a much faster operation) and then having "cron" come along at a later time (regardless of activity or inactivity on the board) and send out the messages.
Advantages
The cron-based e-mail sending can significantly speed up sending of e-mail messages and eliminate any internal server errors received from sendmail "complaining" during sending of messages.
Disadvantages
The messages being sent out will be delayed slightly. For example, if your cron job runs every ten minutes, a message posted at 5:01 will not have its e-mail notification sent until 5:10 when your cron job next runs. Generally this delay is acceptable, but there may be some instances where it is not. The other disadvantage is that you need to know something about "cron" to set this up, or have a helpful system administrator.
General Setup Instructions
Before you write to DiscusWare asking us for help in setting up "cron" on your system or editing your crontab, don't. We do not provide support for this procedure and requests for help will be silently ignored. Consult the documentation for "cron" or your system adminstrator for help.
-
With telnet (or FTP), go to your Discus administration directory (the one with your discus.conf file). Create a directory called "mailqueue" (it must be called this). Set permissions on that directory to 0777 (rwxrwxrwx).
-
Edit your crontab (or have your system administrator edit your crontab) so that the script called "cron-email.cgi" in your Discus CGI directory is executed regularly (e.g., every 5 minutes). It is up to you to figure out how to do this! We cannot help you!
-
Go to Options Manager and click the e-mail tab. Scroll down and click the "Configure E-mail Notification" button. This will cause a pop-up window to appear.
-
If the radio button next to "Command Line Mailer (configure below)" is not chosen, select this and save your settings. Cron-based sending works only with command line mailers, not with Perl modules.
-
Ensure that the proper path to your mail program (preferably sendmail) appears in the box next to "Mail Program:" and that the remaining settings are all correct for your mail program. For now, choose "Send a separate message to each recipient" as the Sending Method. (You will see the option to send the message using a cron job, but do not choose this yet.) Test this setup by typing your address into the box at the bottom of the page and hitting the "Test" button. Make sure that this works. Do not go on if this does not work.
-
When it works, from the success screen, click the "Save Settings Now" button. Then click the "Close" button to close the screen.
-
Back in Options Manager, click the "Configure E-mail Notification" button again to bring up the same pop-up window.
-
Now, for the Sending Method, choose "Use a 'cron job' to send messages". Scroll down and test this setup by typing your address into the box at the bottom of the page and hitting the "Test" button.
-
With telnet or FTP, 'cd' into the "mailqueue" directory you created in step 1. You should see a file there that is named with a long string of numbers and has extension ".txt". This is the mail file for the message you just sent.
-
When you have done the previous step and confirmed that the file appeared, click the "Save Settings" button.
-
When e-mail messages are sent (invoked by "cron") you will receive your test message. If you are impatient or want to test, you can telnet to your Discus CGI directory and run the "cron-email.cgi" script by hand. If you do this, we suggest that you send yourself another test message with your Options Manager and let the cron job actually send it to you.
|