Yet Another Autoresponder (YAA) installation
Posted: February 14th, 2008 | Author: Administrator | Filed under: E-mail, Linux | 2 Comments »I just finished a very grueling installation of a nifty little autoresponder called “Yet Another Autoresponder” (YAA.) The software is Perl based and requires only a few modules which can easily be installed or upgraded via CPAN. However, my difficulties in getting this system working were due to YAA not being able to find the configuration file (yaa.conf). What clued me in to the idea that YAA was not able to find the configuration file was the somewhat ambiguous error message in the maillog:
(Command died with status 1: "/usr/local/yaa/bin/yaa.pl". Command output: Cannot continue, becouse [sic] no lookup maps were defined. )
Looking through the sparse “documentation,” there is no mention of where to put the configuration file. I moved the yaa.conf file to various locations around the file system without any success. Finally, I took matters into my own hands and edited yaa.pl by hand. If you find yourself in the predicament, give this a try:
1) Copy yaa.conf to wherever you want it to reside. I chose the standard configuration path of /etc
2) Edit yaa.pl using your favorite editor and change the following line of code from:
$YAA_DEFAULT_CONFIG_FILE = $module_dir . YAA_SLASH . ".." . YAA_SLASH . "conf" . YAA_SLASH . "yaa.conf";
To:
$YAA_DEFAULT_CONFIG_FILE = "/etc/yaa.conf";
Of course be sure to replace /etc with the path of where you copied your yaa.conf.
After a quick test, I received my autoreponse. Double-checking /var/log/maillog showed no errors or complaints from YAA.
in my case there were problems with yaa.conf (perl syntax error)
I added print command to yaa.pl find out error:
sub parse_config_file {
my ($file) = @_;
unless (my $result = do $file) {
if ($@) {
$error = “Syntax error in file ” . $file . “: ” . $@;
}
elsif (! defined $result) {
$error = “Couldn’t open file ” . $file . “: ” . $!;
}
elsif (! $result) {
$error = “Couldn’t run config file ” . $file;
}
# return error
# —— this — line — added ————————————-
print STDERR “parse_config_file return 0 error=$error\n”;
# —— this — line — added ————————————-
return 0;
}
return 1;
}
Hey,
These tips helped a lot for me. I had a wrong line in the yaa.conf as well and I could find it with Errvee’s comment.
(The problem was: I used an @(at) sign in my sql password so I had to use another kind of apostrophe.)
Thanks and cheers,
Peter