经典邮件脚本的服务器错误

问题描述 投票:0回答:1

我正在使用一个标准的经典 Perl 邮件处理脚本,该脚本曾经在以前的服务器上工作,但现在返回“500 服务器错误”。我看不出有什么原因……哪里可能有问题? 以下是脚本设置:

    #!/usr/bin/perl -wT
##############################################################################
# nms Formmail                         Version 3.14c1                        #
# Copyright 2001 London Perl Mongers   All rights reserved                   #
# Created 11/11/01                     Last Modified 08/11/04                #
# Matt's Script Archive:               http://www.scriptarchive.com/         #
##############################################################################
#
# NMS FormMail Version 3.14c1
#

use strict;
use vars qw(
  $DEBUGGING $emulate_matts_code $secure %more_config
  $allow_empty_ref $max_recipients $mailprog @referers
  @allow_mail_to @recipients %recipient_alias
  @valid_ENV $date_fmt $style $send_confirmation_mail
  $confirmation_text $locale $charset $no_content
  $double_spacing $wrap_text $wrap_style $postmaster 
  $address_style
);

# PROGRAM INFORMATION
# -------------------
# FormMail.pl Version 3.14c1

# USER CONFIGURATION SECTION
# --------------------------
# Modify these to your own settings.

BEGIN
{
  $DEBUGGING         = 0;
  $emulate_matts_code= 0;
  $secure            = 1;
  $allow_empty_ref   = 0;
  $max_recipients    = 1;
  $mailprog          = '/usr/sbin/sendmail -oi -t';
  $postmaster        = '';
  @referers          = qw(reverd.com localhost);
  @allow_mail_to     = qw([email protected]);
  @recipients        = ();
  %recipient_alias   = ('9' => '[email protected]');
  @valid_ENV         = qw(REMOTE_HOST REMOTE_ADDR REMOTE_USER HTTP_USER_AGENT);
  $locale            = '';
  $charset           = 'iso-8859-1';
  $date_fmt          = '%A, %B %d, %Y at %H:%M:%S';
  $style             = 'https://reverd.com/css/reverd.css';
  $no_content        = 0;
  $double_spacing    = 0;
  $wrap_text         = 0;
  $wrap_style        = 1;
  $address_style     = 0;
  $send_confirmation_mail = 1;
  $confirmation_text = <<'END_OF_CONFIRMATION';
From: [email protected]
Subject: Your reverd.com contact submission

Hi,
Thank you for contacting Reverd!
We will try to respond within 24 hours.

Thank you!
https://reverd.com - get rid of scam calls automatically


END_OF_CONFIRMATION

# You may need to uncomment the line below and adjust the path.
# use lib './lib';

# USER CUSTOMISATION SECTION
# --------------------------
# Place any custom code here


# USER CUSTOMISATION << END >>
# ----------------------------
# (no user serviceable parts beyond here)
}

以及联系我们表格 - [联系我们][1] [1]:https://reverd.com/about/contact

就像我说的,它过去在以前的服务器上运行顺利,但在移动到新服务器后突然返回“500 服务器错误”。我希望所有的设置都是正确的。我在许多网站上使用 Matt 的表单邮件,没有任何问题...想知道是什么导致了这个 500 服务器错误...

perl email
1个回答
0
投票

我是编写 nms Formmail 的团队的成员。说实话,看到有人还在使用它,我有点惊讶。正如其他人所说,我们需要查看实际的错误消息是什么(来自网络服务器的错误日志)。

但是,如果我不得不猜测,我会说这是因为您的新服务器正在运行较新版本的 Perl - 标准安装中不包含 CGI.pm。

但这只是一个猜测。在看到真正的错误消息之前我无法确定。

© www.soinside.com 2019 - 2024. All rights reserved.