esend - process sendmail.tab from noah-efetch and send emails
esend [OPTIONS]
esend is an administration program that is called after the efetch program and generates and sends emails.
There may be a wrapper script in /usr/bin with noah- prefix that calls this program in the correct run directory.
esend reads the sendmail.tab file in the DATA_DIR email subdirectory and processes this file to send emails via SMTP.
For Windows environments, the SMTP server name comes from the noah.config file.
For Linux environments, the email command used to send the email is email.linux.command.
esend looks at the users.tab file and regenerates a fresh collection of GROUP and WORLD email lists in the NOAH database subdirectory email. It then reads the sendmail.tab file and when it sees a GROUP email target, it loops through the corresponding GROUP email list generating and sending email messages for each entry.
If esend is unable to send at least one email, it moves/renames the sendmail.tab to the local admin directory with a date-time stamp in the filename and generates a warning. This permits further analysis of the issues and provides the administrator the option of trying to re-run esend on this file with the "esend -f" filename option.
esend creates the email to be sent based on one of three template files which the user can customize; one for ELINKS, another for NEW VERSION UPLOADS and the third template file is for SUBSCRIBER email notification.
The esend program substitutes the following variables in the template files with data it gathers from the NOAH database and sendmail.tab file. Note the use of : to ensure the variables are substituted uniquely.
:FIRSTNAME: first name of the person sending the email :LASTNAME: last name of the person sending the email. :USERNAME: username of the person sending the email. :EMAIL: email address of the person sending the email. :TO_EMAIL: target email that the email is being sent to :NAME: name of the file or directory tagged for email :TITLE: title of the file or directory. :AUTHOR: document author. :OWNER: document owner. :DOCNO: document number (NOAH internal number). :VERNO: document version number. :COMMENT: comment send with the email notification. :DATE_LASTUP: date the file was last uploaded to the NOAH database. :SERVER: NOAH server URL (used to compose elink) :CGIBIN_HOME: NOAH cgi-bin home (used to compose elink)
esend [-f sendfile] [-v] [-vv] [-h] [-help] [-database DATABASE]
-f
filename
Process filename instead of default
DATA_DIR/email/sendmail.tab.
-database
DATABASE
Defaults to default but if you want to change it to a
different database name you can do so with this command.
-v
Print more verbose messages to screen to tell you what it is
thinking ...
-vv
Print even more verbose messages to screen to tell you what
it really is thinking ...
-h
short usage help
-help
This help document.
Trouble Shooting Email Notification:
• |
Make sure that the sending user has an email address in the NOAH database. | ||
• |
Verify that the SMTP address in the noah.config file is correct. (Windows Environment only, not required for Linux) | ||
• |
Test BLAT independently by looking at the BLAT documentation at http://www.blat.net | ||
• |
Adjust the email.linux.command as required. You can run this command in a command window to verify sending email is working in your environment. | ||
• |
Make sure that the sendmail.tab file is being generated in the NOAH database directory by ELINK or NEW FILE VERSION UPLOADS. | ||
• |
Test that "efetch -v" creates the sendmail.tab file in the NOAH database subdirectory email and that this program zeros the content of sendmail.tab at the NOAH database root. | ||
• |
Test that esend -v sends email and removes the sendmail.tab file in the email NOAH database subdirectory. | ||
• |
Try using esend -vv for more verbose information to assist in trouble shooting. |
This program is found in the admin directory and expects to be run from there so it can find the template files in the etc/database subdirectory.
In a Debian distribution, this program has a link to the wrapper program in the admin directory typically /usr/lib/noah/admin and the link name has a noah- prefix and is found in /usr/bin.
NOTE: In a typical installation, the email.bash or email.bat script is what calls this program along with the companion esend both of which are found in the admin directory.
/usr/bin/esend
This is a link to wrapper
/usr/lib/noah/admin/wrapper
This is a generic bash shell wrapper to start the program in the admin directory.
/usr/lib/noah/admin/esend
This is the actual executable called by the wrapper.
/usr/lib/noah/database.config
This is typically a link to /etc/noah/database.config in a Debian release.
DATA_DIR/email/sendmail.tab
Expanded (more fields) database file created by esend and deleted by esend when finished.
Template
files:
The following template files are found in the
etc/database directory which is a subdirectory of the
admin directory that this program runs in. In the case of a
Debian distribution, the etc directory is linked to the
/etc/noah directory.
email.linux.command
This is the command that esend uses to send an email. Edit this as required.
email.linux.elinks.template
This is the template for creating emails and sending them if they are Elink emails. Edit as required.
email.linux.upload.template
This is the template for creating emails and sending them if they are new version upload emails. Edit as required.
email.linux.subscribe.template
This is the template for creating emails and sending them if they are subscriber notification emails. Edit as required.
email.txt
This is the TEMPORARY file created by esend with all variable substitutions for a particular target user. Note that this file gets generated for each target identified by esend. The email.linux.command references this file.
Harold Blount - Nordicwind Inc. www.nordicwind.ca
http://noah.@nordicwind.ca
NOAH - Copyright (c) 2004-2012 Nordicwind Inc. All rights reserved. <http://www.nordicwind.ca>
This is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 or later <http://gnu.org/licenses/gpl.html>.
This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
noah-efetch noah-purge noah-gentext noah-help
Noah Document Management Server : http://noah.nordicwind.ca