Xmail AutoReply v1.1.2/perl
©2002-2003 TPS Developement,all rights reserved.
Index
What is autoreply
License info
What do we need
Upgrade information
Installation procedures
Windows
Linux
Release History
Known Problems
Autoreply is a simple script for 'xmailserver by Davide Libenzi' .
Autoreply works on systems wich supports Perl.
It's tested with Linux and Windows2000 right now but should also work on other OS'es when perl is installed.
The working is very simple , when someone sends a message he gets an automatic answer back to his mailbox.
[license]
Autoreply 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.
Autoreply 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
[What you need]
1, XMail server
2. Perl
For windows Activeperl (from http://www.activestate.com)
3. Mail-Sendmail perl unit, used to send the email Mail-Sendmail-0.78.tar.gz
4: File-Stat perl unit, wich can be found at CPAN(This module should already being installed by default)
5: You can download the -Linux- tar.gz package from here (Autoreply-perl-1.1.2_lnx.tar.gz)
You can download the -Windows-ZIP package from here (Autoreply-perl-1.1.2_Win.zip)
[Upgrading info]
If you use Autoreply/perl v1.1.0 or v1.1.1
- Just replace autoreply.pl with the new file.
- Add the following config options to each of the config files you use:
# OS Type Autoreply is running on.
#
# 0 = Linux
# 1 = Windows
$ostype=0;
#$ostype=1;
(In this example Linux is the main OS)
Set the correct ostype and you're ready.
If you use an older version (v1.0) (Bash) you must completely re-install autoreply.
[Pre-Installation]
-Windows 2000/NT/XP-
Make sure XMail Server is installed and configured
Install Perl ( I use Active Perl www.activestate.com)
The following instructions are based on installation using Active Perl (the only version I have currently tested.
-Linux-
Make sure XMail Server is installed and configured
Install Perl (If it's not installed yet)
[Installing]
-NT/2000/XP-
!!
In some examples we use user 'autoreply` in domain 'example.com` as example ,
you must change it for your needs.
!!
Make sure Perl is installed
Associate .pl files with perl
-To try running directly a .pl file verify that :
- the PATHEXT global variable contains .PL in it
- AND
- the .PL files are well associated with {path to perl.exe}\perl.exe
-(a standard activeperl should do these two, but not sure for the first)
Open a command prompt and type ppm
At the Perl Package prompt type in install mail-sendmail and press enter
Answer yes to the prompt
Copy the file named autoreply.pl somewhere on your hard disk
(for example D:\MailRoot\scripts)and make sure that XMail has access to the specified directories
Copy and rename autoreply.cfg to the users directory
(example: C:\MailRoot\domains\example.com\autoreply\autoreply.cfg)
Edit this .cfg file, and follow the hints in the config file.
Create a plain ASCII text file (Template) in the user-directory (or somewhere else) which must send an auto reply
.
(example: C:\MailRoot\domains\example.com\autoreply\autoreply.txt)
Edit/Create a files called mailproc.tab which is located in the users mail-directory
and add the following line into this file:
"external"[tab]"0"[tab]"0"[tab]"path_to_perl\perl.exe"[tab]"/var/MailRoot/scripts/autoreply.pl"[tab]"@@TMPFILE"[tab]"/var/MailRoot/domains/example.com/autoreply/autorerply.cfg"
"mailbox"
(Don't use @@FILE because autoreply will delete the original message after processing)
Also take a look at the mailproc.tab example in the zip-archive.
This should work . if you have questions mail me at info@thbird.org .
-Linux-
!!
In some examples we use user 'autoreply` in domain 'example.com` as example ,
you must change it for your needs.
!!
Make sure that Xmail is installed correctly and working.
Copy the file named autoreply.pl somewhere on your harddisk ,
for example /var/MailRoot/scripts
(Be sure that Xmail has access to the specified directories)
Else 'chmod 755 path to autoreply.pl'
For example: chmod 755 /var/MailRoot/scripts/autoreply.pl.
Do the same with the configfiles autoreply uses.
Edit the first line of autoreply.pl to the place where Perl can be found.
Save and close autoreply.pl.
Copy and rename autoreply.cfg to the users directory
(example /var/MailRoot/domains/example.com/autoreply/autoreply.cfg)
Edit this .cfg file , and follow the hints in the config file.
Create a plain ascii textfile (Template) in the user-directory (or somewhere else)
wich must send an autoreply.(ex./var/MailRoot/domains/example.com/autoreply/autoreply.txt)
Edit/Create a files called mailproc.tab wich is located in the users mail-directory.
(./MailRoot/domains//) add the following line into this file:
"external"[tab]"0"[tab]"0"[tab]"/var/MailRoot/scripts/autoreply.pl"[tab]"@@TMPFILE"[tab]"/var/MailRoot/domains/example.com/autoreply/autorerply.cfg"
"mailbox"
(Don't use @@FILE because autoreply will delete the original message after processing)
!!Use REAL TAB's between commands .
For example:
"external" "0" "0" "/var/MailRoot/scripts/autoreply.pl" "@@TMPFILE" "/var/MailRoot/domains/example.com/autoreply/autoreply.cfg"
"mailbox"
For Windows AND Linux users
Be sure that the script is authorised to send messages .
Edit the smtprelay.tab file in the servers rootdir (/MailRoot), this must contain at least this line:
"127.0.0.1" "255.255.255.255"
Take a look at the Xmail documentation how to do this .
This should work . if you have questions mail me at info@thbird.org .
Also watch at some sample files included in this package.
[Release history]
v1.1.2 : Bug fixed version
- Fixed the Reply-To header bug,when there's an In-Reply-To header available in the original message's header
This headerwas used in previous version,Fixed
v1.1.1 : Bug fixed version
- Fixed some bugs, autoreply will now also run with XMail/Windows with Active Perl installed.
- Added os (operating system) selection in config for easy switching between Linux + Windows
v1.1.0 : First Perl Release
- Autoreply v1.1.0 is completely rewritten in Perl,older versions are 'bash' scripts.
- Better Mail-Loop checking
- Autoreply will now detect if original message has attachements
- Autoreply will check the size of the original message.
- Autoreply is now configurable via an external config file the commandline is shorter than earlier releases.
- Autoreply doesn't create any temp files anymore
- Autoreply will read '@@FROM` email adres from original message
- Autoreply can use the 'Reply-To' (if available) emailadres to reply to.
(Versions 1.0.x and below are Bash Scripts)
v1.0.1 : Fixed some bugs,(bash script)
- when more than one message was handled autoreply generated a messed up reply
- Now the temp files has random extensions, it should be better now.
- Now the message written by the user can be added to the (auto)Replyed text by adding @@TMPFILE in mailproc.tab as last parameter.
- When From Email adress is the same as TO emailadres then autoreply loops -Fixed .
v1.0: First release
[Known problems/Restrictions]
This Perl version is not very usefull with automatic procedures like vacancy admin via webinterface.
Soon there will be a commandline version available . till then use the 'Bash' version.(Only for Linux)
Thanks to Troy Rodriguez for testing autoreply with XMail/Windows and for making the Windows part of the Documentation.
Thanks to Peter Lindeman for testing autoreply with XMail/Linux.
Thanks to everyone I forgot
.
Back to top
©2002-2003 TPS Developement, all rights reserved.
