remove obsolete scripts. NZBGet v12 due soon.

This commit is contained in:
clinton-hall 2013-09-14 21:55:00 +09:30
commit 10406cffbe
10 changed files with 0 additions and 3506 deletions

View file

@ -1,3 +0,0 @@
Current stable release is NZBGet V11.0
NZBGet V11+ calls multiple scripts directly. This current configuration is no-longer used and the entire nzbget-postprocessing-files folder will be deleted once all nzbget packages are updated.
Please see http://nzbget.sourceforge.net/forum/viewtopic.php?f=3&t=740 for details of the new scripts concept.

View file

@ -1 +0,0 @@
Current Stable Release: NZBGet V10.0

View file

@ -1,175 +0,0 @@
#
# This file if part of nzbget
#
# Template configuration file for post-processing script "nzbget-postprocess.sh".
# Please refer to "nzbget-postprocess.sh" for usage instructions.
#
# Copyright (C) 2008-2013 Andrey Prygunkov <hugbug@users.sourceforge.net>
#
# This program 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; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but 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.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
#
##############################################################################
### PATHS ###
# Set the full path to python if it is not in your PATH.
PythonCmd=/usr/local/python/bin/python
# Set the full path to nzbToSickBeard.py for SickBeard's postprocessing.
NzbToSickBeard=/usr/local/nzbget/var/nzbToSickBeard.py
# Set the full path to nzbToCouchpotato.py for Couchpotato's postprocessing
NzbToCouchPotato=/usr/local/nzbget/var/nzbToCouchPotato.py
# Set the full path to nzbToHeadPhones.py for HeadPhones's postprocessing.
NzbToHeadPhones=/usr/local/nzbget/var/nzbToHeadPhones.py
# Set the full path to nzbToMylar.py for Mylar's postprocessing.
NzbToMylar=/usr/local/nzbget/var/nzbToMylar.py
# Set the full path to nzbToGamez.py for Gamez's postprocessing.
NzbToGamez=/usr/local/nzbget/var/nzbToGamez.py
# Set the full path to any dependency required for your Custom
# Postprocess script if it is not in your PATH.
CustomCmd=/usr/local/python/bin/python
# Set the full path to the Custom Postprocess script.
CustomScript=
# Set the full path to location to move failed downloads to.
Failed_Directory=/usr/local/downloads/failed
##############################################################################
### OPTIONS ###
# Rename img-files to iso (yes, no).
RenameIMG=yes
# Joint TS-files (yes, no).
JoinTS=yes
# Perform SickBeard's postprocessing (yes, no).
SickBeard=yes
# Category for SickBeard's postprocessing.
SickBeardCategory=tv
# Perform Couchpotato's postprocessing (yes, no).
CouchPotato=yes
# Category for Couchpotato's postprocessing.
CouchPotatoCategory=movies
# Perform HeadPhones' postprocessing (yes, no).
HeadPhones=yes
# Category for HeadPhones' postprocessing.
HeadPhonesCategory=music
# Perform Mylar's postprocessing (yes, no).
Mylar=yes
# Category for Mylar's postprocessing.
MylarCategory=comics
# Perform Gamez's postprocessing (yes, no).
Gamez=yes
# Category for Gamez's postprocessing.
GamezCategory=games
# Perform Custom postprocessing (yes, no).
Custom=yes
# Category for Custom postprocessing (eg. pictures)
CustomCategory=pictures
# Clean up list. space seperated, in single quotes, default '*.nzb *.sfv *.1'
FileCleanUp='*.nzb *.sfv *.1'
# Remove all files when download fails (yes, no).
Delete_Failed=no
# Toggle detailed output (yes, no).
Debug=no
##############################################################################
### POSTPROCESSING-PARAMETERS ###
# This section defines parameters, which can be set for each nzb-file
# individually using either web-interface or command line.
# Example command line for setting parameter "PostProcess" to value "no" for
# nzb-file with id=2:
# nzbget -E G O PostProcess=no 2
# Perform postprocessing (yes, no).
#
# Set to "no" to skip postprocessing for this nzb-file.
PostProcess=yes
# Destination directory.
DestDir=
##############################################################################
### EMAIL-PARAMETERS ###
# This section defines parameters, which can be set to allow notifications to
# be sent via email.
# This uses sendEmail as authored by Brandon Zehm <caspian@dotconf.net>
# List Categories for successful download email, default 'tv movies'
Email_successful='tv movies music comics games pictures'
# List Categories for failed download email, default 'tv movies'
Email_failed='tv movies music comics games pictures'
# Set the full path and file name for sendEmail application.
sendEmail=/usr/local/nzbget/var/sendEmail/sendEmail
# Enter the email address you want this email to be sent from.
Email_From=
# Enter the email address you want this email to be sent to.
Email_To=
# Enter smtp server and port. eg smtp.live.com:25
Email_Server=
# Server uses tsl (auto, yes, no).
Tls=auto
# Enter your smtp server user name (if required)
Email_User=
# Enter your smtp server password (if required)
Email_Pass=
# Enter your email subject, in single quotes.
# Use the following tags between the less than and greater than symbols.
# Use status to add 'completed'/'failed'.
# Use name to add the nzb name.
# Use cat to add the download categoty.
# Use script to name the external script used.
Email_Subject='The download of <name> has <status>.'
# Enter your email message, in single quotes.
# Use the same substitutes as described above.
# Use <br> for new line.
Email_Message='The download of <name> has <status>. <br>This has been processed by the script <script> for category <cat>.'
# Append the potprocessing log to the email (yes, no).
Add_Log=no

View file

@ -1,441 +0,0 @@
#!/bin/sh
#
# This file if part of nzbget
#
# Example postprocessing script for NZBGet
#
# Copyright (C) 2008 Peter Roubos <peterroubos@hotmail.com>
# Copyright (C) 2008 Otmar Werner
# Copyright (C) 2008-2013 Andrey Prygunkov <hugbug@users.sourceforge.net>
#
# This program 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; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but 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.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
#
####################### Usage instructions #######################
# o Script will cleanup, join ts-files and rename img-files to iso.
#
# o To use this script with nzbget set the option "PostProcess" in
# nzbget configuration file to point to this script file. E.g.:
# PostProcess=/home/user/nzbget/nzbget-postprocess.sh
#
# o The script needs a configuration file. An example configuration file
# is provided in file "nzbget-postprocess.conf". Put the configuration file
# into the directory where nzbget's configuration file (nzbget.conf) is located.
# Then edit the configuration file in any text editor to adjust the settings.
#
# o You can also edit the script's configuration via web-interface.
#
# o There are few options, which can be ajdusted for each nzb-file individually.
#
####################### End of Usage instructions #######################
# NZBGet passes following arguments to postprocess-programm as environment
# variables:
# NZBPP_DIRECTORY - path to destination dir for downloaded files;
# NZBPP_NZBNAME - user-friendly name of processed nzb-file as it is displayed
# by the program. The file path and extension are removed.
# If download was renamed, this parameter reflects the new name;
# NZBPP_NZBFILENAME - name of processed nzb-file. It includes file extension and also
# may include full path;
# NZBPP_CATEGORY - category assigned to nzb-file (can be empty string);
# NZBPP_PARSTATUS - result of par-check:
# 0 = not checked: par-check is disabled or nzb-file does
# not contain any par-files;
# 1 = checked and failed to repair;
# 2 = checked and successfully repaired;
# 3 = checked and can be repaired but repair is disabled.
# NZBPP_UNPACKSTATUS - result of unpack:
# 0 = unpack is disabled or was skipped due to nzb-file
# properties or due to errors during par-check;
# 1 = unpack failed;
# 2 = unpack successful.
# Name of script's configuration file
SCRIPT_CONFIG_FILE="nzbget-postprocess.conf"
# Exit codes
POSTPROCESS_PARCHECK_CURRENT=91
POSTPROCESS_PARCHECK_ALL=92
POSTPROCESS_SUCCESS=93
POSTPROCESS_ERROR=94
POSTPROCESS_NONE=95
# Postprocessing function for nzbToCouchPotato and nzbToSickBeard
nzbToMedia() {
if [ "$Debug" = "yes" ]; then echo "[DETAIL] Post-Process: Executing external postprocessing with argument $1" | tee -a $tmplog; fi
PostProcessStatus=0
if [ -n "$1" ]; then PostProcessStatus=$1 ; fi
if [ "$Debug" = "yes" ]; then echo "[DETAIL] Post-Process: comparing '$NZBPP_CATEGORY' to '$CouchPotatoCategory' and '$SickBeardCategory'" | tee -a $tmplog; fi
find "$NZBPP_DIRECTORY" -type f -size -200000k -iname \*sample\* -exec rm {} \; >/dev/null 2>&1
download_id=""
if [ "$NZBPP_CATEGORY" = "$CouchPotatoCategory" ]; then
if [ "$CouchPotato" = "yes" -a -e "$NzbToCouchPotato" ]; then
script=$NzbToCouchPotato
if [ $NZBPR_couchpotato ]; then
download_id=$NZBPR_couchpotato
fi
# Call Couchpotato's postprocessing script
echo "[INFO] Post-Process: Running CouchPotato's postprocessing script" | tee -a $tmplog
if [ "$Debug" = "yes" ]; then
echo "[DETAIL] Post-Process: CouchPotato-Script-Path=$NzbToCouchPotato" | tee -a $tmplog
echo "[DETAIL] Post-Process: CouchPotato-Script-ARGV1=$NZBPP_DIRECTORY" | tee -a $tmplog
echo "[DETAIL] Post-Process: CouchPotato-Script-ARGV2=$NZBPP_NZBFILENAME" | tee -a $tmplog
echo "[DETAIL] Post-Process: CouchPotato-Script-ARGV3=$PostProcessStatus" | tee -a $tmplog
fi
$PythonCmd $NzbToCouchPotato "$NZBPP_DIRECTORY" "$NZBPP_NZBFILENAME" "$PostProcessStatus" "$NZBPP_CATEGORY" "$download_id" | while read line ; do if [ "$line" != "" ] ; then replaceLogLine "${line}" ; fi ; done
else
if [ "$CouchPotato" != "yes" ]; then echo "[DETAIL] Post-Process: Ignored to run CouchPotato's postprocessing script as it is disabled by user ('$CouchPotato')" | tee -a $tmplog; fi
if [ ! -e "$NzbToCouchPotato" ]; then echo "[DETAIL] Post-Process: Ignored to run CouchPotato's postprocessing script as the specified script ('$NzbToCouchPotato') does not exist" | tee -a $tmplog; fi
fi
fi
if [ "$NZBPP_CATEGORY" = "$SickBeardCategory" ]; then
if [ "$SickBeard" = "yes" -a -e "$NzbToSickBeard" ]; then
script=$NzbToSickBeard
# Call SickBeard's postprocessing script
echo "[INFO] Post-Process: Running SickBeard's postprocessing script" | tee -a $tmplog
if [ "$Debug" = "yes" ]; then
echo "[DETAIL] Post-Process: SickBeard-Script-Path=$NzbToSickBeard" | tee -a $tmplog
echo "[DETAIL] Post-Process: SickBeard-Script-ARGV1=$NZBPP_DIRECTORY" | tee -a $tmplog
echo "[DETAIL] Post-Process: SickBeard-Script-ARGV2=$NZBPP_NZBFILENAME" | tee -a $tmplog
echo "[DETAIL] Post-Process: SickBeard-Script-ARGV3=$PostProcessStatus" | tee -a $tmplog
fi
$PythonCmd $NzbToSickBeard "$NZBPP_DIRECTORY" "$NZBPP_NZBFILENAME" "$PostProcessStatus" "$NZBPP_CATEGORY" "$download_id" | while read line ; do if [ "$line" != "" ] ; then replaceLogLine "${line}" ; fi ; done
else
if [ "$SickBeard" != "yes" ]; then echo "[DETAIL] Post-Process: Ignored to run SickBeard's postprocessing script as it is disabled by user ('$SickBeard')" | tee -a $tmplog; fi
if [ ! -e "$NzbToSickBeard" ]; then echo "[DETAIL] Post-Process: Ignored to run SickBeard's postprocessing script as the specified script ('$NzbToSickBeard') does not exist" | tee -a $tmplog; fi
fi
fi
if [ "$NZBPP_CATEGORY" = "$HeadPhonesCategory" ]; then
if [ "$HeadPhones" = "yes" -a -e "$NzbToHeadPhones" ]; then
script=$NzbToHeadPhones
# Call HeadPhones' postprocessing script
echo "[INFO] Post-Process: Running HeadPhones' postprocessing script" | tee -a $tmplog
if [ "$Debug" = "yes" ]; then
echo "[DETAIL] Post-Process: HeadPhones-Script-Path=$NzbToHeadPhones" | tee -a $tmplog
echo "[DETAIL] Post-Process: HeadPhones-Script-ARGV1=$NZBPP_DIRECTORY" | tee -a $tmplog
echo "[DETAIL] Post-Process: HeadPhones-Script-ARGV2=$NZBPP_NZBFILENAME" | tee -a $tmplog
echo "[DETAIL] Post-Process: HeadPhones-Script-ARGV3=$PostProcessStatus" | tee -a $tmplog
fi
$PythonCmd $NzbToHeadPhones "$NZBPP_DIRECTORY" "$NZBPP_NZBFILENAME" "$PostProcessStatus" "$NZBPP_CATEGORY" "$download_id" | while read line ; do if [ "$line" != "" ] ; then replaceLogLine "${line}" ; fi ; done
else
if [ "$HeadPhones" != "yes" ]; then echo "[DETAIL] Post-Process: Ignored to run HeadPhones' postprocessing script as it is disabled by user ('$HeadPhones')" | tee -a $tmplog; fi
if [ ! -e "$NzbToHeadPhones" ]; then echo "[DETAIL] Post-Process: Ignored to run HeadPhones' postprocessing script as the specified script ('$NzbToHeadPhones') does not exist" | tee -a $tmplog; fi
fi
fi
if [ "$NZBPP_CATEGORY" = "$MylarCategory" ]; then
if [ "$Mylar" = "yes" -a -e "$NzbToMylar" ]; then
script=$NzbToMylar
# Call Mylar's postprocessing script
echo "[INFO] Post-Process: Running Mylar's postprocessing script" | tee -a $tmplog
if [ "$Debug" = "yes" ]; then
echo "[DETAIL] Post-Process: Mylar-Script-Path=$NzbToMylar" | tee -a $tmplog
echo "[DETAIL] Post-Process: Mylar-Script-ARGV1=$NZBPP_DIRECTORY" | tee -a $tmplog
echo "[DETAIL] Post-Process: Mylar-Script-ARGV2=$NZBPP_NZBFILENAME" | tee -a $tmplog
echo "[DETAIL] Post-Process: Mylar-Script-ARGV3=$PostProcessStatus" | tee -a $tmplog
fi
$PythonCmd $NzbToMylar "$NZBPP_DIRECTORY" "$NZBPP_NZBFILENAME" "$PostProcessStatus" "$NZBPP_CATEGORY" "$download_id" | while read line ; do if [ "$line" != "" ] ; then replaceLogLine "${line}" ; fi ; done
else
if [ "$Mylar" != "yes" ]; then echo "[DETAIL] Post-Process: Ignored to run Mylar's postprocessing script as it is disabled by user ('$Mylar')" | tee -a $tmplog; fi
if [ ! -e "$NzbToMylar" ]; then echo "[DETAIL] Post-Process: Ignored to run Mylar's postprocessing script as the specified script ('$NzbToMylar') does not exist" | tee -a $tmplog; fi
fi
fi
if [ "$NZBPP_CATEGORY" = "$GamezCategory" ]; then
if [ "$Gamez" = "yes" -a -e "$NzbToGamez" ]; then
script=$NzbToGamez
# Call Gamez's postprocessing script
echo "[INFO] Post-Process: Running Gamez's postprocessing script" | tee -a $tmplog
if [ "$Debug" = "yes" ]; then
echo "[DETAIL] Post-Process: Gamez-Script-Path=$NzbToGamez" | tee -a $tmplog
echo "[DETAIL] Post-Process: Gamez-Script-ARGV1=$NZBPP_DIRECTORY" | tee -a $tmplog
echo "[DETAIL] Post-Process: Gamez-Script-ARGV2=$NZBPP_NZBFILENAME" | tee -a $tmplog
echo "[DETAIL] Post-Process: Gamez-Script-ARGV3=$PostProcessStatus" | tee -a $tmplog
fi
$PythonCmd $NzbToGamez "$NZBPP_DIRECTORY" "$NZBPP_NZBFILENAME" "$PostProcessStatus" "$NZBPP_CATEGORY" "$download_id" | while read line ; do if [ "$line" != "" ] ; then replaceLogLine "${line}" ; fi ; done
else
if [ "$Gamez" != "yes" ]; then echo "[DETAIL] Post-Process: Ignored to run Gamez's postprocessing script as it is disabled by user ('$Gamez')" | tee -a $tmplog; fi
if [ ! -e "$NzbToGamez" ]; then echo "[DETAIL] Post-Process: Ignored to run Gamez's postprocessing script as the specified script ('$NzbToGamez') does not exist" | tee -a $tmplog; fi
fi
fi
if [ "$NZBPP_CATEGORY" = "$CustomCategory" ]; then
if [ "$Custom" = "yes" -a -e "$CustomScript" ]; then
script=$CustomScript
# Call Custom postprocessing script
echo "[INFO] Post-Process: Running the Custom postprocessing script" | tee -a $tmplog
if [ "$Debug" = "yes" ]; then
echo "[DETAIL] Post-Process: Custom-Script-Path=$CustomScript" | tee -a $tmplog
echo "[DETAIL] Post-Process: Custom-Script-ARGV1=$NZBPP_DIRECTORY" | tee -a $tmplog
echo "[DETAIL] Post-Process: Custom-Script-ARGV2=$NZBPP_NZBFILENAME" | tee -a $tmplog
echo "[DETAIL] Post-Process: Custom-Script-ARGV3=$PostProcessStatus" | tee -a $tmplog
fi
$CustomCmd $CustomScript "$NZBPP_DIRECTORY" "$NZBPP_NZBFILENAME" "$PostProcessStatus" "$NZBPP_CATEGORY" "$download_id" | while read line ; do if [ "$line" != "" ] ; then replaceLogLine "${line}" ; fi ; done
else
if [ "$Custom" != "yes" ]; then echo "[DETAIL] Post-Process: Ignored to run the Custom postprocessing script as it is disabled by user ('$Custom')" | tee -a $tmplog; fi
if [ ! -e "$CustomScript" ]; then echo "[DETAIL] Post-Process: Ignored to run the Custom postprocessing script as the specified script ('$CustomScript') does not exist" | tee -a $tmplog; fi
fi
fi
}
replaceVarBy() {
if [ "$Debug" = "yes" ]; then echo "[DETAIL] Post-Process: Executing function 'replaceVarBy'. Going to replace '${2}' in '${1}' by '${3}'" | tee -a $tmplog; fi
# If we're not using Bash use sed, as we need to support as much as systems possible, also those running sh/dash etc
if [ -n "${BASH_VERSION}" ]; then
REPLACEDRESULT="${1/${2}/${3}}"
else
REPLACEDRESULT=$(echo "${1}" | sed "s^${2}^${3}^g")
fi
if [ "$Debug" = "yes" ]; then echo "[DETAIL] Post-Process: replace result: ${REPLACEDRESULT}" | tee -a $tmplog; fi
}
replaceLogLine() {
# This converts the output logigng from nzbTo* script to a compatible format with NZBGet
# If we're not using Bash use sed, as we need to support as much as systems possible, also those running sh/dash etc
if [ -n "${BASH_VERSION}" ]; then
newline="${1/*DEBUG/[DETAIL]}"
newline="${newline/*INFO/[INFO]}"
newline="${newline/*WARNING/[WARNING]}"
newline="${newline/*ERROR/[ERROR]}"
else
newline=$(echo "${1}" | sed "s^.*DEBUG^[DETAIL]^")
newline=$(echo $newline | sed "s^.*INFO^[INFO]^")
newline=$(echo $newline | sed "s^.*WARNING^[WARNING]^")
newline=$(echo $newline | sed "s^.*ERROR^[ERROR]^")
fi
echo "$newline" | tee -a $tmplog
}
# Pass on postprocess exit codes to external scripts for handling failed downloads
do_exit() {
if [ "$Debug" = "yes" ]; then echo "[DETAIL] Post-Process: Executing function 'do_exit' with argument $1" | tee -a $tmplog; fi
nzbStatus=0
if [ "$1" -ne "$POSTPROCESS_SUCCESS" ]; then
if [ "$Delete_Failed" = "yes" -a "$NZBPP_DIRECTORY" != "$ConfigDir" -a -d "$NZBPP_DIRECTORY" -a ! -d "$NZBPP_DIRECTORY/.git" ]; then
cd ..
rm -rf $NZBPP_DIRECTORY >/dev/null 2>&1
elif [ "$NZBPP_DIRECTORY" != "$ConfigDir" -a "$Failed_Directory" != "" -a -d "$NZBPP_DIRECTORY" -a ! -d "$NZBPP_DIRECTORY/.git" ]; then
cd ..
mkdir $Failed_Directory
mkdir $Failed_Directory/$NZBPP_CATEGORY
mkdir $Failed_Directory/$NZBPP_CATEGORY/$NZBPP_NZBNAME
mv $NZBPP_DIRECTORY $Failed_Directory/$NZBPP_CATEGORY/$NZBPP_NZBNAME >/dev/null 2>&1
NZBPP_DIRECTORY=$Failed_Directory/$NZBPP_CATEGORY/$NZBPP_NZBNAME
cd $NZBPP_DIRECTORY
fi
nzbStatus=1
fi
script=none
nzbToMedia $nzbStatus
echo "[DETAIL] after calling nzbToMedia" | tee -a $tmplog
replaceVarBy "${Email_Subject}" "<name>" "${NZBPP_NZBFILENAME}"
replaceVarBy "${REPLACEDRESULT}" "<cat>" "${NZBPP_CATEGORY}"
replaceVarBy "${REPLACEDRESULT}" "<script>" "${script}"
Email_Subject="${REPLACEDRESULT}"
replaceVarBy "${Email_Message}" "<name>" "${NZBPP_NZBFILENAME}"
replaceVarBy "${REPLACEDRESULT}" "<cat>" "${NZBPP_CATEGORY}"
replaceVarBy "${REPLACEDRESULT}" "<script>" "${script}"
Email_Message="${REPLACEDRESULT}"
for item in $Email_successful; do
if [ "${NZBPP_CATEGORY}" = "$item" -o "$item" = "all" ] && [ "$nzbStatus" = 0 ]; then
User=""
if [ -n "$Email_User" -a -n "$Email_Pass" ]; then User="-xu $Email_User -xp $Email_Pass" ; fi
replaceVarBy "${Email_Subject}" "<status>" "completed"
Email_Subject="${REPLACEDRESULT}"
replaceVarBy "${Email_Message}" "<status>" "completed"
Email_Message="${REPLACEDRESULT}"
if [ "${Add_Log}" = "yes" ]; then
Email_Message="$Email_Message <br>Log Result"
while read line; do Email_Message="$Email_Message <br>$line"; done < $tmplog
fi
$sendEmail -f "$Email_From" -t "$Email_To" -s "$Email_Server" -o "tls=$Tls" -o "message-content-type=html" $User -u "$Email_Subject" -m "$Email_Message"
fi; done
for item in $Email_failed; do
if [ "${NZBPP_CATEGORY}" = "$item" -o "$item" = "all" ] && [ "$nzbStatus" != 0 ]; then
User=""
if [ -n "$Email_User" -a -n "$Email_Pass" ]; then User="-xu $Email_User -xp $Email_Pass" ; fi
replaceVarBy "${Email_Subject}" "<status>" "failed"
Email_Subject="${REPLACEDRESULT}"
replaceVarBy "${Email_Message}" "<status>" "failed"
Email_Message="${REPLACEDRESULT}"
if [ "${Add_Log}" = "yes" ]; then
Email_Message="$Email_Message <br>nLog Result"
while read line; do Email_Message="$Email_Message <br>$line"; done < $tmplog
fi
$sendEmail -f "$Email_From" -t "$Email_To" -s "$Email_Server" -o "tls=$Tls" -o "message-content-type=html" $User -u "$Email_Subject" -m "$Email_Message"
fi; done
exit $1
}
# Check if the script is called from nzbget 10.0 or later
if [ "$NZBPP_DIRECTORY" = "" -o "$NZBOP_CONFIGFILE" = "" ]; then
echo "*** NZBGet post-processing script ***"
echo "This script is supposed to be called from nzbget (10.0 or later)."
exit $POSTPROCESS_ERROR
fi
if [ "$NZBOP_UNPACK" = "" ]; then
echo "[ERROR] This script requires nzbget version at least 10.0-testing-r555 or 10.0-stable."
exit $POSTPROCESS_ERROR
fi
# Check if postprocessing was disabled in postprocessing parameters
# (for current nzb-file) via web-interface or via command line with
# "nzbget -E G O PostProcess=no <ID>"
if [ "$NZBPR_PostProcess" = "no" ]; then
echo "[WARNING] Post-Process: Post-processing disabled for this nzb-file, exiting"
exit $POSTPROCESS_NONE
fi
ConfigDir="${NZBOP_CONFIGFILE%/*}"
tmplog="$ConfigDir/tmp.log"
echo "[INFO] Post-Process: Post-processing script successfully started" | tee $tmplog
cd "$NZBPP_DIRECTORY" || (echo "[ERROR] Post-Process: Nothing to post-process: destination directory $NZBPP_DIRECTORY isn't accessible" | tee $tmplog && do_exit $POSTPROCESS_ERROR)
# Determine the location of configuration file (it must be stored in
# the directory with nzbget.conf).
ScriptConfigFile="$ConfigDir/$SCRIPT_CONFIG_FILE"
if [ ! -f "$ScriptConfigFile" ]; then
echo "[ERROR] Post-Process: Configuration file $ScriptConfigFile not found, exiting" | tee -a $tmplog
exit $POSTPROCESS_ERROR
fi
# Readg configuration file
while read line; do eval "$line"; done < $ScriptConfigFile
# Check nzbget.conf options
BadConfig=0
if [ "$NZBOP_ALLOWREPROCESS" = "yes" ]; then
echo "[ERROR] Post-Process: Please disable option \"AllowReProcess\" in nzbget configuration file" | tee -a $tmplog
BadConfig=1
fi
if [ "$NZBOP_UNPACK" != "yes" ]; then
echo "[ERROR] Post-Process: Please enable option \"Unpack\" in nzbget configuration file" | tee -a $tmplog
BadConfig=1
fi
if [ "$BadConfig" -eq 1 ]; then
echo "[ERROR] Post-Process: Exiting due to incompatible nzbget configuration" | tee -a $tmplog
exit $POSTPROCESS_ERROR
fi
# Check par status
if [ "$NZBPP_PARSTATUS" -eq 3 ]; then
echo "[WARNING] Post-Process: Par-check successful, but Par-repair disabled, exiting" | tee -a $tmplog
do_exit $POSTPROCESS_NONE
fi
if [ "$NZBPP_PARSTATUS" -eq 1 ]; then
echo "[WARNING] Post-Process: Par-check failed, exiting" | tee -a $tmplog
do_exit $POSTPROCESS_NONE
fi
# Check unpack status
if [ "$NZBPP_UNPACKSTATUS" -eq 1 ]; then
echo "[WARNING] Post-Process: Unpack failed, exiting" | tee -a $tmplog
do_exit $POSTPROCESS_NONE
fi
if [ "$NZBPP_UNPACKSTATUS" -eq 0 -a "$NZBPP_PARSTATUS" -ne 2 ]; then
# Unpack is disabled or was skipped due to nzb-file properties or due to errors during par-check
if (ls *.rar *.7z *.7z.??? >/dev/null 2>&1); then
echo "[WARNING] Post-Process: Archive files exist but unpack skipped, exiting" | tee -a $tmplog
exit $POSTPROCESS_NONE
fi
if (ls *.par2 >/dev/null 2>&1); then
echo "[WARNING] Post-Process: Unpack skipped and par-check skipped (although par2-files exist), exiting" | tee -a $tmplog
exit $POSTPROCESS_NONE
fi
if [ -f "_brokenlog.txt" ]; then
echo "[WARNING] Post-Process: _brokenlog.txt exists, download is probably damaged, exiting" | tee -a $tmplog
exit $POSTPROCESS_NONE
fi
echo "[INFO] Post-Process: Neither archive- nor par2-files found, _brokenlog.txt doesn't exist, considering download successful" | tee -a $tmplog
fi
# Check if destination directory exists (important for reprocessing of history items)
if [ ! -d "$NZBPP_DIRECTORY" ]; then
echo "[ERROR] Post-Process: Nothing to post-process: destination directory $NZBPP_DIRECTORY doesn't exist" | tee -a $tmplog
do_exit $POSTPROCESS_ERROR
fi
# All checks done, now processing the files
# If download contains only nzb-files move them into nzb-directory
# for further download
# Check if command "wc" exists
wc -l . >/dev/null 2>&1
if [ "$?" -ne 127 ]; then
AllFilesCount=`ls -1 2>/dev/null | wc -l`
NZBFilesCount=`ls -1 *.nzb 2>/dev/null | wc -l`
if [ "$AllFilesCount" -eq "$NZBFilesCount" ]; then
echo "[INFO] Moving downloaded nzb-files into incoming nzb-directory for further download" | tee -a $tmplog
mv *.nzb $NZBOP_NZBDIR
fi
fi
# Clean up
echo "[INFO] Post-Process: Cleaning up" | tee -a $tmplog
chmod -R a+rw .
# Clean up list, space seperated array from GUI
for word in $FileCleanUp ; do rm $word >/dev/null 2>&1 ; done
# Removed by default
rm _brokenlog.txt >/dev/null 2>&1
rm *.[pP][aA][rR]2 >/dev/null 2>&1
if [ "$JoinTS" = "yes" ]; then
# Join any split .ts files if they are named xxxx.0000.ts xxxx.0001.ts
# They will be joined together to a file called xxxx.0001.ts
if (ls *.ts >/dev/null 2>&1); then
echo "[INFO] Post-Process: Joining ts-files" | tee -a $tmplog
tsname=`find . -name "*0001.ts" |awk -F/ '{print $NF}'`
cat *0???.ts > ./$tsname
# Remove all the split .ts files
echo "[INFO] Post-Process: Deleting source ts-files" | tee -a $tmplog
rm *0???.ts >/dev/null 2>&1
fi
fi
if [ "$RenameIMG" = "yes" ]; then
# Rename img file to iso
# It will be renamed to .img.iso so you can see that it has been renamed
if (ls *.img >/dev/null 2>&1); then
echo "[INFO] Post-Process: Renaming img-files to iso" | tee -a $tmplog
imgname=`find . -name "*.img" |awk -F/ '{print $NF}'`
mv $imgname $imgname.iso
fi
fi
# Check if destination directory was set in postprocessing parameters
# (for current nzb-file) via web-interface or via command line with
# "nzbget -E G O DestDir=/new/path <ID>"
if [ "$NZBPR_DestDir" != "" ]; then
mkdir $NZBPR_DestDir
mv * $NZBPR_DestDir >/dev/null 2>&1
cd ..
rmdir $NZBPP_DIRECTORY
NZBPP_DIRECTORY=$NZBPR_DestDir
cd $NZBPP_DIRECTORY
fi
# All OK, requesting cleaning up of download queue
do_exit $POSTPROCESS_SUCCESS

View file

@ -1,260 +0,0 @@
1.56 (Sep 8, 2009)
- Fixed authentication errors caused by invalid base64 encoding.
Thanks for dozens of people who reported this and even submitted
patches! Sorry it took me so long to get this fixed :|
- Updated authentication code so it would try both AUTH PLAIN and
AUTH LOGIN methods before giving up. This should make it even
more robust.
- Detect <!DOCTYPE in first line of the message body as an html email too.
- Added command line option to force sending message as either
text or html (also allows a manual content-type header).
1.55 (Dec 13, 2006)
- New command line option to specify a local bind address. Useful on
machines with multiple IP addresses.
- EHLO should never send "localhost" now. I Added a new function
called get_hostname() that does several new checks to get the system's
hostname. If all else fails it will send it's own IP address.
- Added a new command line option, -o fqdn=FQDN, that allows one to override
the name sent after EHLO.
- Small change to how the timezone is sent, it was triggering spam filters.
- Windows executable now has TLS support enabled!
1.54 (Oct 28, 2006)
NEW FEATURES:
- TLS support is finally here! See the -o tls=[auto|yes|no] option.
To enable simply install the Net::SSleay and IO::Socket::SSL modules.
NOTE: If you experience errors related to TLS, PLEASE UPDATE your
Net::SSleay and IO::Socket::SSL modules before reporting an error.
I have already found inconsistancies with older versions.
- Updated the "-o message-header=HEADER" option so that you can use
it more than once. Additionally you can now use it to override message
headers that would have normally been generated by sendEmail. This is
particularly useful when a custom Message-ID or subject is needed.
- SMTP authentication now supports the SASL PLAIN mechanism along
with the LOGIN method.
- New optional way to specify username and password with the -o option.
- If a username is supplied with -xu, but a password is not specified,
sendEmail will now prompt for one rather than exiting with an error.
BUG FIXES:
- Fixed an annoying bug that made some MUA's believe there was always
an attachment when there wasn't.
- New base64_encode() function that fixes a bug that was causing certain
usernames/passwords used with -xu and -xp to not work properly.
1.53 (never publicly released, changes merged into 1.54)
1.52 (Feb 19, 2005)
- Fixed the bug that prevented sendEmail on Windows and Mac systems
from working properly. Thanks to the many people that reported that
bug! Sorry it took me so long to fix, I've been working on my new
anti-spam service for businesses at http://www.dotclean.com/
- Allow null command line arguments. For example -u "" should work.
Thanks to Mike Nadeau for pointing out that bug.
- Print shell escape codes for colored help on everything but Windows.
Thanks to Offer Kaye for that tip. If this causes problems anywhere
please let me know!
- Changed default mime-encoding header to "application/octet-stream"
rather than "base64" when sendEmail can't guess any other content-
type to use. Thanks to wwp for that patch.
- Added a -o message-charset option to specify the message body's
character set. Thanks to Jei for letting me know not everyone
sends messages in iso-8859-1 ;)
1.51 (Dec 02, 2004)
- A few alarm() calls were being called on Win32 systems which doesn't work.
- Added -o message-format=raw option to allow sending of raw pre-built email
messages. Thanks to Lutz for the patch!
- If the hostname isn't found in common environment variables it now loads
the Sys::Hostname module and uses it to get the hostname. This should
work properly on more platforms now. If calling this module causes
anyone grief please let me know!
1.50 (Sep 30, 2004)
- There has been a long standing bug where sendEmail could tell you the
remote server accepted the email when, in fact, it had been rejected.
This is now fixed.
- Changed the textual output of many debug messages.
- Added a Message-ID header to each message sent.
- You can now specify multiple to, cc, or bcc recipients by separating them
with either a space, comma, or semi-colon. Previously it had to be space
separated.
- Replaced the connect function with one from the IO::Socket library. The
IO::Socket module is included in default Perl installations, so this change
does not create any new Perl module dependencies.
- When sending to multiple recipients and one is rejected by the server
sendEmail does not abort as long as at least one recipient was
accepted.
- To, CC, and BCC fields can be specified in the
"Brandon Zehm <caspian@dotconf.net>"
format and it will populate the appropriate fields in the email message.
- All messages are now MIME encoded, even simple text ones. This makes the
program flow much cleaner.
- SMTP Auth is now supported with the -xu and -xp command line parameters.
- You can create multi-line messages on the command line now by putting
a '\n' into the message specified with the -m parameter.
- Always use +0000 for timezone, and get the current time from gmtime()
rather than localtime().
- Added some color to the help and documentation if the shell is Bash.
- It now aborts with an error message if all file attachments can not be
found before connecting to the remote smtp server. Previously if an
attachment specified couldn't be opened it would simply send the message
without the attachment.
- Allow a single custom email header line to be specified with
-o message-header=HEADER
- Add a -o timeout=SECONDS option so you can set the timeout used for all
network reads and writes.
- Added ability to specify a "Reply-to:" header with -o reply-to=ADDRESS
- Added ability to read message body from a file with -o message-file=FILE
- Added a lot of new documentation available via --help TOPIC.
1.42 (June 06, 2003)
- It was possible to send bare CR's, so I fixed that now. (Thanks to
Jared Cheney for the bug report)
- Patch from Jared Cheney to add the MIME-Version field to conform to RFC1521
(made attachments work with more mail clients)
1.41 (Apr 22, 2003)
- In some cases bare LF's were *still* getting sent, so I think I fixed it
right this time. (Thanks to Buddy Nahay for that bug report and helping
me test the fix!)
- Fixed bare period encoding (it wasn't working in all cases either)
- Changed HTML detection to require the <html> to be at the beginning of
a line. Otherwise any email with "<html>" in the message would get
tagged as being an html message. (Thanks to John Rouillard for that
bug report!)
1.40 (Dec 04, 2002)
- A patch from Paul Kreiner (J.P van Oyen also reported a similar fix):
"This patch forces the timestamp string to always follow
the HH:MM:SS convention required by the RFCs, even if the
fields could be represented with a single digit. I also
took the liberty of adding a global "timezone" variable at
the top, and fixing a couple of typos."
- A patch from Reidar Johansen that included several fixes, but notably
he included a function called tz_offset that determines what timezone
your in.
- Fixed the signal handlers so they display a nice message
- Added a quit() function
- Added a printmsg() function to handle all printed/logged messages
- Added a simple openLogFile() function
- If running in Win32 it says "CTRL-Z" rather than "CTRL-D"
- Applied fix from Yakov Lerner to fix bare period encoding
- Check that attachments exist and are readable before trying to open them
- Rewrote the connect() function
- Rewrote the close/disconnect function
- Made the -v option work with any number of -v's
- Rewrote the read_server_response() function and renamed it to readServerResponse()
- Did a bunch of little fixes so that perl -w won't complain
- Redid the whole file logging stuff - now the printmsg function takes care of it,
and it's no longer partially broken.
- Added a global alarm variable for setting the alarm timeout, and changed
it's default value to 60 rather than 15.
- Fixed all the exit()'s so that sendEmail should now only exit with an
error status of 0 if it successfully sent the email.
- Added support for HTML email (Thanks again to Reidar Johansen)
- Re-worked the mime-encoding function to work with -w and use strict.
- Removed several die() calls in the file attachment process.
- Put a fix in place that should cleanly replace any bare LF's with CRLF.
1.33 (Apr 16, 2001)
- Fixed some typo's and problems with the logging option regarding the
printing of attachment(s) names to the log file.
- Fixed several comparisons with null strings.
- Lots of little cleanup things.
1.32 (Aug 18, 2000)
- Fixed a fairly serious error which in some circumstances would
cause file attachments to be corrupted because the mime padding at
the end of the attachment was not getting set correctly.
1.31 (Aug 9, 2000)
- Totally rewrote all mime encoding code, it should now be 100%
MIME/Base64 compliant, and it now opens files in binary mode in win32.
This was a much bigger operation than it sounds like ;-)
- Now it should work with LARGE file attachments. In v1.30 it had to
load the whole file into memory before encoding it, now it encodes
line by line so it doesn't use nearly as much memory.
- Now checks the message for bare periods and encodes them.
- Fixed a bug that would allow text to be printed even if -q was
set (and -m was not).
- The MIME delimiter is now somewhat random.
1.30 (Aug 1, 2000)
- ATTACHMENT SUPPORT ADDED!
- Added CC and BCC support, they are now normal command line options.
- sendEmail should now work easier in Win32. Win32 did not support
the alarm() calls, so I put a check that disables the alarm calls if
$^O matches 'Win'.
- Added autodetection of mime type on attachments.
- Disabled the alarm timer if there are attachments, that way people
on modems can send big attachments without getting their upload killed.
- Added a -q option for quiet mode
- Added a 'Date:' field in the mail headers so messages will
show up in the right order in my mail program ;-)
- Changed the way you specify a port form the command line
now you specify it in the -s <server> option as an
optional :port addendum to the server name.
- Added -h and --help support.
- Updated the help to reflect all changes.
1.22 (Jul 8, 2000)
- Removed the 'content-type' and 'transfer encoding type' flags in the email
headers, in preparation for a version that will support real attachments.
- When piping data to sendEmail often email would have lines ending with
just \012 and many email servers do not like this. So I now have \012
replaced with \012\015 in data piped from STDIN.
- When piping data as the message it now displays a message for those manually
typing in an email. It also changes the 15 second alarm to a 60 second alarm
and resets it after every new line.
1.21 (May 15, 2000)
- Removed the SIG_ALARM call (gave errors on certain non-slackware distributions)
- Added a missing error check that could have allowed sendEmail to say a
message was sent successfully when the server had actually returned an
error message.
1.20 (May 10, 2000)
VERSION OVERVIEW:
-----------------
-v option added
-vv option added
Passing the body of the email via STDIN is now an option
Multiple <to> addresses now allowed
Logging feature added
Terminates itself after 15 seconds to avoid dns hangs etc
Lots of small potential bugs fixed and a lot of code cleanup
DETAILS:
--------
- DEBUG CODE/MODE:
- Lots of error messages everywhere
- 2 levels of verbosity accessible via command like parameters
- Lots more information messages triggered by $debug's value
- Fixed a problem which could have caused sendEmail to overlook certain
error messages from the email server.
- All invalid command line parameters are now reported correctly
- Some code comments were written incorrectly, and are now fixed.
- Added handler for HUP and ALARM (both kill sendEmail now)
- Possible problems with certain email addresses fixed.
- Modified date routine to not use a system call. (making it more portable)
- Improved command line parsing (preventing a few possible errors).
- Thanks to Nick Pasich for help with these patches:
- You can now send the body of the email via the -m option
as before or optionally leave the -m out and pass the body
of the email to STDIN.
- Alarm to abort sendEmail if it runs longer than 15 seconds
- Multiple 'To' addresses
- Option to log to a file
- Updated the 'help' page to reflect all changes
1.01
- Fixed a bug in the error/success checking routine which caused sendEmail
to report errors when there were none.
Thanks to Michael Santy for this bug report.
- Added some more documentation in the code.
- Added this CHANGELOG file.
- Release v1.01

View file

@ -1,244 +0,0 @@
sendEmail - Send email from a console near you!
Written by: Brandon Zehm <caspian@dotconf.net>
http://caspian.dotconf.net/
http://www.tsheets.com/
------------------
What is sendEmail?
------------------
SendEmail is a lightweight, completly command line based, SMTP email agent.
If you have the need to send email from the command line, this tool is perfect.
It was designed to be used in bash scripts, Perl programs, and web sites, but
it is also quite useful in many other contexts. SendEmail is written in Perl
and is unique in that it requires NO SPECIAL MODULES. It has an intuitive and
flexible set of command-line options, making it very easy to learn and use.
------------------
Installation
------------------
SendEmail is a perl script/program, and only needs to be copied to a directory
in your path to make it accessible. Most likely the following steps will
be sufficient:
1) Extract the package
tar -zxvf sendEmail-v1.XX.tar.gz
2) Copy the sendEmail script to /usr/local/bin
cp -a sendEmail-v1.XX/sendEmail /usr/local/bin
3) Make sure its executable
chmod +x /usr/local/bin/sendEmail
4) Run it
sendEmail
or
/usr/local/bin/sendEmail
NOTES:
* Running sendEmail without any arguments will produce a usage summary.
* SendEmail is written in Perl, so no compilation is needed.
* On a Unix/Linux OS if your perl binary is not installed at /usr/bin/perl
you may need to edit the first line of the script accordingly.
---------------
Usage Overview
---------------
sendEmail-1.56 by Brandon Zehm <caspian@dotconf.net>
Synopsis: sendEmail -f ADDRESS [options]
Required:
-f ADDRESS from (sender) email address
* At least one recipient required via -t, -cc, or -bcc
* Message body required via -m, STDIN, or -o message-file=FILE
Common:
-t ADDRESS [ADDR ...] to email address(es)
-u SUBJECT message subject
-m MESSAGE message body
-s SERVER[:PORT] smtp mail relay, default is localhost:25
Optional:
-a FILE [FILE ...] file attachment(s)
-cc ADDRESS [ADDR ...] cc email address(es)
-bcc ADDRESS [ADDR ...] bcc email address(es)
-xu USERNAME username for SMTP authentication
-xp PASSWORD password for SMTP authentication
Paranormal:
-b BINDADDR[:PORT] local host bind address
-l LOGFILE log to the specified file
-v verbosity, use multiple times for greater effect
-q be quiet (i.e. no STDOUT output)
-o NAME=VALUE advanced options, for details try: --help misc
-o message-content-type=<auto|text|html|other>
-o message-file=FILE -o message-format=raw
-o message-header=HEADER -o message-charset=CHARSET
-o reply-to=ADDRESS -o timeout=SECONDS
-o username=USERNAME -o password=PASSWORD
-o tls=<auto|yes|no> -o fqdn=FQDN
Help:
--help the helpful overview you're reading now
--help addressing explain addressing and related options
--help message explain message body input and related options
--help networking explain -s, -b, etc
--help output explain logging and other output options
--help misc explain -o options, TLS, SMTP auth, and more
---------------
Examples
---------------
Simple Email:
sendEmail -f me@gmail.com \
-t friend@yahoo.com \
-s smtp.gmail.com:587 \
-xu me@gmail.com \
-xp MY-PASSWORD \
-u "Test email" \
-m "Hi buddy, this is a test email."
Sending to mutiple people:
sendEmail -f myaddress@isp.net \
-t "Scott Thomas <scott@isp.net>" jason@isp.net renee@isp.net \
-s relay.isp.net \
-u "Test email" \
-m "Hi guys, this is a test email."
Sending to multiple people using cc and bcc recipients:
(notice the different way I specified multiple To recipients, you can do this for cc and bcc as well)
sendEmail -f myaddress@isp.net \
-t scott@isp.net;jason@isp.net;renee@isp.net \
-cc jennifer@isp.net paul@isp.net jeremiah@isp.net \
-bcc troy@isp.net miranda@isp.net jay@isp.net \
-s relay.isp.net \
-u "Test email with cc and bcc recipients" \
-m "Hi guys, this is a test email."
Sending to multiple people with multiple attachments:
sendEmail -f myaddress@isp.net \
-t jason@isp.net \
-cc jennifer@isp.net paul@isp.net jeremiah@isp.net \
-s relay.isp.net \
-u "Test email with cc and bcc recipients" \
-m "Hi guys, this is a test email." \
-a /mnt/storage/document.sxw "/root/My Documents/Work Schedule.kwd"
Sending an email with the contents of a file as the message body:
cat /tmp/file.txt | sendEmail -f myaddress@isp.net \
-t jason@isp.net \
-s relay.isp.net \
-u "Test email with contents of file"
Sending an email with the contents of a file as the message body (method 2):
sendEmail -f myaddress@isp.net \
-t jason@isp.net \
-s relay.isp.net \
-o message-file=/tmp/file.txt \
-u "Test email with contents of file"
Sending an html email: (make sure your html file has <html> at the beginning)
cat /tmp/file.html | sendEmail -f myaddress@isp.net \
-t jason@isp.net \
-s relay.isp.net \
-u "Test email with html content"
------------
Contributors
------------
Many thanks go to the people who have submitted ideas and patches.
I know I've forgotten to mention everyone who's helped with sendEmail,
but here is a small list. Please let me know if you feel your name
should be here!
v1.56
- Several people submitted fixes for the authentication bug.
Thanks to all of you for nagging me to get this release out!
Simon Matter (v1.55)
- Local bind address patch
CBL Team <http://cbl.abuseat.org/> and Chris Peay (v1.55)
- Bug reports about sendEmail causing people get blacklisted.
Jared Cheney (v1.42)
- More bare LF bug fixes and bare period encoding.
- Mime encoding patch
Buddy Nahay (v1.41)
- Bare LF bug report
John Rouillard (v1.41)
- html detection bug report
Reidar Johansen (v1.40)
- Added support for HTML email
- Created a function called tz_offset that determines the local timezone
- Many other fixes and suggestions
Paul Kreiner (v1.40)
- Submitted a patch that forces the timestamp string to always follow
the HH:MM:SS convention required by the RFCs.
Al Danial
- Found and reported a logging/typo/attachment issue in v1.32
Svante Gerhard
- Found and reported the file attachment/padding issue in v1.31
Charles Leeds
- Put together all the original file attachment code and got me
on the path to v1.3x
- Provided the compiled Windows executable version of sendEmail
for a LONG time. I really appreciate your help!
Nick Pasich
- Passing the email message via STDIN
- Multiple <to> recpients
- Log file option
- Quiet option
- Cc option
- Lots of other suggestions and code
Richard Duim
- For mime/content-type/attachment suggestions
Ulisses Montenegro
- First one to report problems with bare LF's on qmail servers
Michael Santy
- Reported problems with various SMTP servers and helped me fix a few
fairly serious problems.
Many other people have submitted bug reports and helped to make sendEmail
what it is today, and my best regards go out to all those .. complainers ;-)

View file

@ -1,120 +0,0 @@
sendEmail - Send email from a console near you!
Written by: Brandon Zehm <caspian@dotconf.net>
http://caspian.dotconf.net/
http://www.tsheets.com/
// Language: Portuguese (Brazil)
// Traduzido por: nogueira_jr@ig.com.br
-----------------
Instru‡äes de uso
-----------------
sendEmail-1.55 by Brandon Zehm <caspian@dotconf.net>
Comando: sendEmail -f ENDERE€O [op‡äes]
Necess rio:
-f ENDERE€O endere‡o de quem est  enviando o email
* Pelo menos um destinat rio, via -t, -cc, ou -bcc
* Corpo da mensagem, via -m, STDIN, ou -o message-file=FILE
Comum:
-t ENDERE€O [ENDERE€OS...] destinat rio(s)
-u "ASSUNTO" assunto da mensagem
-m "MENSAGEM" corpo da mensagem
-s SERVER[:PORT] servidor smtp, default e' a porta localhost:25
Opcional:
-a ARQ [ARQ...] Arquivo(s) anexado
-cc ENDERE€O [ENDERE€O...] cc endere‡os(s)
-bcc ENDERE€O [ENDERE€O...] bcc endere‡o(s)
-xu USUARIO nome do usuario para autentica‡Æo
-xp SENHA senha para autentica‡Æo
Extras:
-b BINDADDR[:PORT] endere‡o do host local bind
-l ARQLOG fazer LOG no arquivo indicado
-v verbal, use v rias vezes para grandes efeitos
-q silencioso (nÆo ecoa saidas)
-o NOME=VALOR op‡äes avan‡adas, para detalhes use: --help misc
-o message-content-type=<auto|text|html>
-o message-file=ARQUIVO -o message-format=RAW
-o message-header=HEADER -o message-charset=CHARSET
-o reply-to=ENDERE€O -o timeout=SEGUNDOS
-o username=USUARIO -o password=SENHA
-o tls=<auto|yes|no> -o fqdn=FQDN
Help:
--help informa‡äes gerais (que voce le agora)
--help addressing detalhes de endere‡os e suas op‡äes
--help message detalhes do corpo da mensagem e suas op‡äes
--help networking detalhes -s, -b, etc
--help output detalhes de saidas e suas op‡äes
--help misc detalhes op‡Æo -o, TLS, autent SMTP auth etc
---------------
Exemplos
---------------
Simples Email:
sendEmail -f myaddress@isp.net \
-t nogueira_jr@ig.com.br \
-s relay.isp.net \
-u "Teste email" \
-m "Ola, isso e' um teste de email."
Enviando para v rias pessoas:
sendEmail -f myaddress@isp.net \
-t "Scott Thomas <scott@isp.net>" nogueira_jr@ig.com.br renee@isp.net \
-s relay.isp.net \
-u "Teste email" \
-m "Ola, isso e' um teste de email."
Enviando para v rias pessoas e enviando copias cc e bcc:
(existe diferentes formas de enviar para varios destinatarios, usando TO
mas voce pode usar CC e BCC para destinatarios tambem)
sendEmail -f myaddress@isp.net \
-t scott@isp.net;jason@isp.net;nogueira_jr@ig.com.br \
-cc jennifer@isp.net paul@isp.net jeremiah@isp.net \
-bcc troy@isp.net miranda@isp.net jay@isp.net \
-s relay.isp.net \
-u "Teste email com copias cc e bcc" \
-m "Ola, isso e' um teste de email."
Enviando para v rias pessoas com v rios anexos:
sendEmail -f myaddress@isp.net \
-t nogueira_jr@ig.com.br \
-cc jennifer@isp.net paul@isp.net jeremiah@isp.net \
-s relay.isp.net \
-u "Teste email com c¢pias cc e bcc" \
-m "Ola, isso e' um teste de email."
-a /mnt/storage/document.sxw "/root/My Documents/Work Schedule.kwd"
Enviando um email com o conteudo de um arquivo no corpo da mensagem:
cat /tmp/file.txt | sendEmail -f myaddress@isp.net \
-t nogueira_jr@ig.com.br \
-s relay.isp.net \
-u "Ola, isso e' um teste de email com anexo."
Enviando um email com o conteudo de um arquivo no corpo da mensagem (mtodo 2):
sendEmail -f myaddress@isp.net \
-t nogueira_jr@ig.com.br \
-s relay.isp.net \
-o message-file=/tmp/file.txt \
-u "Ola, isso e' um teste de email com anexo."
Enviando um email HTML: (certifique-se que o arquivo tem <html> no in¡cio)
cat /tmp/file.html | sendEmail -f myaddress@isp.net \
-t nogueira_jr@ig.com.br \
-s relay.isp.net \
-u "Ola, isso e' um teste de email com HTML."

View file

@ -1,27 +0,0 @@
Reported Bugs:
[ ] But it seems that I can't send more than 16 or 17 KB from the STDIN on Windows (2003) with the EXE version.
Even with -o message-file=... and got the same 17 KB message limitation.
Feature Ideas
[ ] A preferences file with default settings?
[ ] Deliver directly to MX server for domain?
[ ] Command line option requesting read-receipt
X-Confirm-Reading-To:
Disposition-Notification-To: <user@domain.com>
Return-Receipt-To:
[ ] Add support for CRAM-MD5 authentication
[ ] Add a pair of options to add receipt on delivery and on read of sent emails
[ ] Support for unicode (european) characters in the subject
More Ideas:
[ ] What about an option to send the same message more than once?
[ ] How about a delay before sending the message?
[ ] What about an internal queue for messages that wern't sent?
Next time it's invoked it could deliver those messages as well.
[ ] Convert inline documentation to standard perldoc format?
[ ] Support for pop before smtp?
Crazy Ideas (not so sure about):
[ ] Preferences registry settings for the Windows .exe version?
(several people have said No! use a flat file)

File diff suppressed because it is too large Load diff