2006. 8. 1. 14:06

Openwebmail포트로업그레이드후

1. 아래의 그림처럼 500 Internal Server Error 와 같은 메세지가 출력된다면,
아래의 사항을 참고하라.
Q: I got "Internal server error" when running Open ?WebMail?
I got "can not do setuid" error?
I got "Software error: Can't locate etc/openwebmail.conf in @INC" error?
A: There are many possible answers...

  1. Please check if you have installed a complete set of perl 5.005 or above.
    and You have uncompressed the openwebmail-1.xx.tar.gz with proper parameter.
    It should be "tar -zxvBpf openwebmail-1.xx.tar.gz"

  2. Your openwebmail scripts may have wrong owner or mode.
    The permission of all openwebmail*.pl should be

    mode=4555
    owner=root
    group=mail

  3. The suidperl may not have enough permission for SUID scripts.
    It should owned by root with permission bits set to 4555

    ps: If you are using Suse Linux 9.0 Professional, please note that the
    permissions of suidperl is changed at each time ?SuSEconfig is run.
    To avoid having to change these permissions manually each time,
    please modify /etc/permissions.easy (or what permissions file used ever)
    to set the proper permissions.
    (thanks to dialsc.AT.t-online.de, Schaefer, Dirk Alexander)

  4. Execute openwebmail.pl from command line, if it still complains
    it could not do suid, then your perl executable was compiled without
    SUID support

    Here are the steps to recompile your perl with suid enabled:

  5. grab the perl source tar ball
    b. sh Configure -de (de means default perl config)
    c. edit config.sh and set this :
    d_dosuid='define'
    d_suidsafe='undef'

    ps: If you run './Configure' to configure the perl interactively,
    then don't forget to answer 'yes' for question
    "Do you want to do setuid/setgid emulation? "
    Or you won't be able to execute openwebmail

    d. then make, make install (make suidperl if needed)
    e. if you have compiled suidperl, then chmod 4555 suidperl
    if you don't have suidperl, change #!/usr/bin/suidperl to
    the path of your perl
    (thanks to Nemo Kaiser, nemoo.AT.users.sourceforge.net)

    ps: If you are using FreeBSD and your perl is compiled from port,
    then please note that the SUID support is disabled by default
    since the port for perl 5.8.1

    You need to do 'make -DENABLE_SUIDPERL' in making port

    ps: If you don't want to recompile perl, you choose to may use
    misc/tools/suidwrap.pl to generate C wrappers for all suid scripts.

    However, this is not recommended, as you will not be able to
    use ?SpeedyCGI with the openwebmail system.

    Here are the steps:
  6. cd cgi-bin/openwebmail
  7. perl misc/tool/wrapsuid/wrapsuid.pl /fullpath/cgi-bin/openwebmail
  8. change #!/usr/bin/suidperl to the path of your perl

    All suid scripts will be renamed to .scriptname.pl and
    the C wrapper will be generated and named as script.pl
    (thanks to Chris Heegard, heegard.AT.?NativeI.com)

    The spellcheck may not work on Solaris when using C wrappers.
    (thanks to Isam Ishaq, isam.AT.planet.edu)

  • If you are using ?SpeedyCGI, and openwebmail always shows Internal error,
    then your ?SpeedyCGI may be compiled without SUID support.
  • please be sure the speedycgi executable is owned by root with
    permission 4555
    b. please be sure you are using ?SpeedyCGI 2.22 or above
    c. please be sure your perl is compiled with SUID support enabled
    before compiling ?SpeedyCGI
    d. please refer to section "PERSISTENT RUNNING through ?SpeedyCGI"
    in readme.txt for how to compile ?SpeedyCGI.

  • If you are using ?SpeedyCGI, openwebmail seems be okay at the beginning,
    but it shows "Internal Server Error" sometimes ...

    Please check the apache log to see if there is error messages like

    "unable to open tmp file ..."

    If yes, you system may not have the savedsuid support,
    please set have_savedsuid_support to 'no' in etc/suid.conf

  • Some perl modules may be too old or not exist on your system
    1. install MIME-Base64-3.01.tar.gz or above
      b. install CGI.pm-3.05.tar.gz or above
      c. install the libnet-1.19.tar.gz or above

    ps: In most cases, you can run the './openwebmail.pl' in text terminal
    to get more information about the error.