RedHatLinux AS3中APACHE+SendMail+OpenWebMail整合




RedHatLinux AS3中APACHE+SendMail+OpenWebMail整合

2022-07-20 20:34:00 网络知识 官方管理员

注:

1.Openwebmail是一个webmail程序,不同与微软的owa及imail的web方式,它不包含服务器端服务(本例中邮件服务器为sendmail);因此在运行Openwebmail的机器上需要安装Apache和Sendmail.

2.Openwebmail多数程序是由Perl语句编写的,所以必须安装Perl及Perl相关包

3.下载所需软件包:在RedHatLinuxAS3中安装openwebmail需要以下软件包

>>1.perl-CGI-2.81-88.4.i386.rpm

http://www.openwebmail.com/openwebmail/download/redhat/rpm/packages/rhel3/perl-CGI-2.81-88.4.i386.rpm

>>2.

perl-Compress-Zlib-1.21-RH9.i386.rpm

http://www.openwebmail.com/openwebmail/download/redhat/rpm/packages/rhel3/perl-Compress-Zlib-1.21-RH9.i386.rpm

>>3.

perl-Text-Iconv-1.2-RH80.i386.rpm

http://www.openwebmail.com/openwebmail/download/redhat/rpm/packages/rhel3/perl-Text-Iconv-1.2-RH80.i386.rpm

>>4.

perl-suidperl-5.8.0-88.i386.rpm

http://www.openwebmail.com/openwebmail/download/redhat/rpm/packages/rhel3/perl-suidperl-5.8.0-88.i386.rpm

>>5.

openwebmail-2.41-20041126.i386.rpm

http://www.openwebmail.com/openwebmail/download/redhat/rpm/daily-build/openwebmail-2.41-20041126.i386.rpm

下面就开始安装配置:

Step1:安装下载包

[root@AS3software]#rpm–ivh

perl-CGI-2.81-88.4.i386.rpm

[root@AS3software]#rpm–ivh

perl-Compress-Zlib-1.21-RH9.i386.rpm

[root@AS3software]#rpm–ivh

perl-Text-Iconv-1.2-RH80.i386.rpm

[root@AS3software]#rpm–ivh

perl-suidperl-5.8.0-88.i386.rpm

Step2:初始化openwebmail

[root@AS3software]#cd/var/www/cgi-bin/openwebmail

[root@AS3openwebmail]#ls-l

total1192

drwxr-xr-x2rootmail4096Nov2714:44auth

drwxr-xr-x12rootmail4096Nov2721:17etc

drwxr-xr-x6rootmail4096Nov2714:44misc

drwxr-xr-x2rootmail4096Nov2714:44modules

-rwsr-xr-x1rootmail260341Nov2612:16openwebmail-abook.pl

-rwsr-xr-x1rootmail23817Nov2612:16openwebmail-advsearch.pl

-rwsr-xr-x1rootmail114322Nov2612:16openwebmail-cal.pl

-rwsr-xr-x1rootmail23855Nov2612:16openwebmail-folder.pl

-rwsr-xr-x1rootmail68418Nov2612:16openwebmail-main.pl

-rwsr-xr-x1rootmail34984Nov2612:16openwebmail.pl

-rwsr-xr-x1rootmail139830Nov2612:16openwebmail-prefs.pl

-rwsr-xr-x1rootmail66851Nov2612:16openwebmail-read.pl

-rwsr-xr-x1rootmail110724Nov2612:16openwebmail-send.pl

-rwsr-xr-x1rootmail24813Nov2612:16openwebmail-spell.pl

-rwsr-xr-x1rootmail52749Nov2612:16openwebmail-tool.pl

-rwsr-xr-x1rootmail48796Nov2612:16openwebmail-vdomain.pl

-rwsr-xr-x1rootmail18457Nov2612:16openwebmail-viewatt.pl

-rwsr-xr-x1rootmail112975Nov2612:16openwebmail-webdisk.pl

-rwxr-xr-x1rootmail4859Aug1213:06preload.pl

drwxr-xr-x2rootmail4096Nov2714:44quota

drwxr-xr-x2rootmail4096Nov2714:44shares

-rwxr-xr-x1rootmail4117Sep415:04userstat.pl

-rwxr-xr-x1rootmail19305Nov1622:42vacation.pl

[root@AS3openwebmail]#./openwebmail-tool.pl--init//这步骤很关键会出现如下的提示:changethefollowing3optionsinopenwebmail.conffromdbm_ext.dbdbmopen_extnonedbmopen_haslocknotodbm_ext.dbdbmopen_ext%dbm_ext%dbmopen_haslockno安回车键忽略提示,继续配置//进入openwebmail下面的etc目录进行相关配置,需要修改以下

1./var/www/cgi-bin/openwebmail/etc/openwebmail.conf

2./var/www/cgi-bin/openwebmail/etc/defaults/openwebmail.conf

3./var/www/cgi-bin/openwebmail/etc/defaults/dbm.conf

修改后的文件为

>>1./var/www/cgi-bin/openwebmail/etc/openwebmail.conf[只需修改1处domainnamessupermaster.com//默认是auto],完整内容如下:

#

#OpenWebMailconfigurationfile

#

#Thisfilecontainsjusttheoverridesfromdefaults/openwebmail.conf

#pleasemakeallchangestothisfile.

#

#Thisfilesetsoptionsforalldomainsandallusers.

#Tosetoptionsonperdomainbasis,pleaseputtheminsites.conf/domainname

#Tosetoptionsonperuserbasis,pleaseputtheminusers.conf/username

#

releasedate20041126

domainnamessupermaster.com//默认是auto

auth_moduleauth_unix.pl

mailspooldir/var/spool/mail

ow_cgidir/var/www/cgi-bin/openwebmail

ow_cgiurl/cgi-bin/openwebmail

ow_htmldir/var/www/data/openwebmail

ow_htmlurl/data/openwebmail

logfile/var/log/openwebmail.log

#ToSysAdmin,

#PleaseinstallClamAVRPMpackagefromhttp://clamav.net/inorderto

#enableviruscheckwithOpenWebMail.Otherwisesetittono.

#Seehttp://openwebmail.org/openwebma...howto/virus/ClamAV/

#forastep-by-stepinstruction.

enable_viruscheckyes

viruscheck_pipe/usr/bin/clamdscan--mbox--disable-summary--stdout-

viruscheck_source_allowedall

enable_spamcheckno

enable_learnspamno

%name%

version%version%

%help_text%?

logo_url%ow_htmlurl%/images/openwebmail.gif

logo_linkhttp://openwebmail.org

help_url@@@HELP_URL@@@

help_text@@@HELP_TEXT@@@

spellcheck/usr/bin/aspell-a-S-w"-"-d@@@DICTIONARY@@@-p@@@PDICNAME@@@

spellcheck_pdicname.aspell.@@@DICTIONARY@@@.pws

spellcheck_dictionariesenglish,american

auto_creatercyes

############################################

#Buttons:

#EditFroms|EditStationary|POP3Setup|ChangePassword|History|Info

enable_editfrombookyes

enable_stationeryyes

enable_pop3yes

enable_changepwdyes

enable_historyyes

enable_aboutyes

##############################################

#PersonalInformation

default_languageen

default_timeoffsetauto

default_daylightsavingauto

default_realnameauto

default_fromemailsauto

default_autoreplysubjectThisisanautoreply...[Re:$SUBJECT]

Hello,

Iwillnotbereadingmymailforawhile.

Yourmailregarding'$SUBJECT'willbereadwhenIreturn.

--

OpenWebMailProject(http://openwebmail.org)

##############################################

#DisplayPreference

default_styleDefault

default_iconsetCool3D.English

default_bgurl%ow_htmlurl%/images/backgrounds/Globe.gif

default_bgrepeatyes

default_fontsize10pt

default_dateformatmm/dd/yyyy

default_hourformat12

############################################

#FolderBrowsing

default_ctrlposition_folderviewbottom

default_msgsperpage20

default_fieldorderdatefromsubjectsize

default_sortdate

default_useminisearchiconyes

############################################

#MessageOperation

default_confirmmsgmovecopyno

default_defaultdestinationsaved-messages

default_smartdestinationyes

default_viewnextaftermsgmovecopyyes

default_autopop3yes

default_autopop3wait0

default_bgfilterwait10

default_moveoldmsgfrominboxno

############################################

#MessageReadingOptions

default_ctrlposition_msgreadbottom

default_headerssimple

default_usefixedfontno

default_usesmileiconno

default_showhtmlastextyes

default_showimgaslinkyes

default_disablejsyes

default_disableembcodeyes

default_disableemblinkcgionly

default_sendreceiptask

############################################

#MessageReplyingOptions

default_msgformattext

default_editcolumns88

default_editrows28

default_sendbuttonpositionbefore

default_reparagraphorigmsgyes

default_replywithorigmsgat_beginning

default_backupsentmsgyes

default_sendcharsetsameascomposing

############################################

#VirusCheck

default_viruscheck_sourceall

default_viruscheck_maxsize10000

default_viruscheck_minbodysize1

############################################

#MessageFilteringOptions

default_filter_repeatlimit10

default_filter_badaddrformatno

default_filter_fakedsmtpno

default_filter_fakedfromno

default_filter_fakedexecontenttypeno

############################################

#AddressBookOptions

default_abook_ width600

default_abook_heightmax

default_abook_buttonpositionafter

default_abook_defaultfilterno

default_abook_defaultsearchtypename

default_abook_addrperpage24

default_abook_collapse1

default_abook_sortfullname

default_abook_listviewfieldorderfullname,email,note

############################################

#CalendarOptions

default_calendar_defaultviewcalmonth

default_calendar_holidaydefauto

default_calendar_monthviewnumitems5

default_calendar_weekstart0

default_calendar_starthour0600

default_calendar_endhour2300

default_calendar_interval30

default_calendar_showemptyhoursyes

default_calendar_reminderdays7

default_calendar_reminderforglobalyes

############################################

#WebDiskOptions

default_webdisk_dirnumitems10

default_webdisk_confirmmovecopyyes

default_webdisk_confirmdelyes

default_webdisk_confirmcompressyes

default_webdisk_fileeditcolumns96

default_webdisk_fileeditrows24

############################################

#MiscOptions

default_uselightbaryes

default_regexmatchyes

default_hideinternalyes

default_newmailsoundNONE

default_newmailwindowtime3

default_mailsentwindowtime0

default_dictionaryenglish

default_trashreserveddays0

default_spamvirusreserveddays3

default_refreshinterval5

default_sessiontimeout24

############################################

#SecuritySettings

webdisk_rootpath/webdisk

webdisk_lsmailfolderno

webdisk_lshiddenno

webdisk_lsunixspecno

webdisk_lssymlinkyes

webdisk_allow_symlinkoutyes

webdisk_symlinkout_display@

enable_sshtermno

#ps:TocompletelydisabletheSSHterminalsupport,youhavetoremove

#thefiledata/openwebmail/applet/mindterm/mindtermfull.jar

############################################

#QuotaSystem(limitinKBandthresholdin%)

#1MB=1,024KB

#10MB=10,240KB

#100MB=102,400KB

#1GB=1,024MB=1,048,576KB

#uncommentfollowinglinesifyouwishtoenableQuotaSystemfor10Mb

#quota_modulequota_du.pl

#spool_limit10240

#quota_limit10240

#quota_threshold0

#delmail_ifquotahitno

#delfile_ifquotahitno

>>2./var/www/cgi-bin/openwebmail/etc/defaults/openwebmail.conf[只需修改2处,把smtpserver和authpop3_server改为相应的IP],完整的内容如下:

#

#OpenWebMailconfigurationfileDEFAULT

#

#Thisisopenwebmail.conf.default-afilefullofusefulvariablesthat

#youcansetfortheopenwebmailsystem.Youshouldnoteditthisfile!

#Putanyoverridesintoopenwebmail.confinstead.Theopenwebmail.conf

#shouldonlycontainvalueswhichoverridevaluessetinthisfile.

#Thiseasestheupgradewhendefaultsarechangedornewfeaturesareadded.

#

#Pleaserefertoopenwebmail.conf.helpfordescriptionofeachoption

#

#ps:ThisfilewillbeloadedonlyonceifOpenWebMailisrunningin

#persistentmode.ToforceOpenWebMailrereadthisfile,pleasedo

#

#touchopenwebmail*pl

#

nameOpenWebMail

version2.41

releasedate20041126

##############################################################################

#hostdependentconfiguration

##############################################################################

domainnamesauto

smtpserver192.168.0.111

smtpport25

smtpauthno

virtusertable/etc/mail/virtusertable

auth_moduleauth_unix.pl

auth_withdomainno

auth_domainauto

quota_modulenone

mailspooldir/var/mail

use_hashedmailspoolsno

use_syshomediryes

create_syshomedirno

use_homedirspoolsno

homedirspoolnameMailbox

homedirfolderdirnamemail

homedirdotdirname.openwebmail

use_syshomedir_for_dotdiryes

deliver_use_GMTno

##############################################################################

#openwebmailsystemconfiguration

##############################################################################

ow_cgidir/usr/local/www/cgi-bin/openwebmail

ow_cgiurl/cgi-bin/openwebmail

ow_htmldir/usr/local/www/data/openwebmail

ow_htmlurl/openwebmail

ow_etcdir%ow_cgidir%/etc

ow_stylesdir%ow_etcdir%/styles

ow_langdir%ow_etcdir%/lang

ow_templatesdir%ow_etcdir%/templates

ow_holidaysdir%ow_etcdir%/holidays

ow_mapsdir%ow_etcdir%/maps

ow_sitesconfdir%ow_etcdir%/sites.conf

ow_usersconfdir%ow_etcdir%/users.conf

ow_usersdir%ow_etcdir%/users

ow_sessionsdir%ow_etcdir%/sessions

start_url%ow_cgiurl%/openwebmail.pl

ico_url%ow_htmlurl%/images/openwebmail.ico

logo_url%ow_htmlurl%/images/openwebmail.gif

logo_linkhttp://openwebmail.org/

help_url@@@HELP_URL@@@

help_text@@@HELP_TEXT@@@

logfile/var/log/openwebmail.log

global_addressbook%ow_etcdir%/address.book

global_filterbook%ow_etcdir%/filter.book

global_calendarbook%ow_etcdir%/calendar.book

g2b_map%ow_mapsdir%/g2b.map

b2g_map%ow_mapsdir%/b2g.map

lunar_map%ow_mapsdir%/lunar.map

header_pluginfilenone

header_pluginfile_charsetnone

footer_pluginfilenone

footer_pluginfile_charsetnone

webmail_middle_pluginfilenone

webmail_middle_pluginfile_charsetnone

spellcheck/usr/local/bin/ispell-a-S-w"-"-d@@@DICTIONARY@@@-p@@@PDICNAME@@@

spellcheck_pdicname.ispell_words

spellcheck_dictionariesenglish,american

vacationinit%ow_cgidir%/vacation.pl-i

vacationpipe%ow_cgidir%/vacation.pl-t60s

error_with_debuginfono

allowed_serverdomainall

allowed_clientdomainall

allowed_clientipall

allowed_receiverdomainall

allowed_autologinipall

allowed_rootloginipnone

case_insensitive_loginno

forced_ssl_loginno

stay_ssl_afterloginyes

enable_domainselectmenuno

domainselmenu_listauto

enable_strictvirtuserno

enable_changepwdyes

enable_strictpwdyes

passwd_minlen6

session_multiloginyes

session_checkcookieyes

session_checksameipno

session_count_displayyes

cache_userinfoyes

auto_creatercno

domainnames_overrideno

symboliclink_mboxyes

enable_webmailyes

enable_userfoldersyes

enable_spellcheckyes

enable_advsearchyes

enable_addressbookyes

enable_calendaryes

enable_webdiskyes

enable_sshtermyes

enable_vdomainno

enable_preferenceyes

enable_historyyes

enable_aboutyes

about_info_softwareyes

about_info_scriptfilenameno

about_info_protocolyes

about_info_serveryes

about_info_clientyes

X-Mailer:%name%%version%%releasedate%

X-OriginatingIP:@@@CLIENTIP@@@(@@@USERID@@@)

enable_loadfrombookyes

enable_editfrombookyes

frombook_for_realname_onlyno

enable_autoreplyyes

enable_setforwardyes

enable_strictforwardno

enable_stationeryyes

enable_savedraftyes

enable_backupsentyes

enable_globalfilteryes

enable_userfilteryes

enable_smartfilteryes

smartfilter_bypass_goodmessageyes

log_filter_detailno

enable_viruscheckno

viruscheck_pipe/usr/local/bin/clamdscan--disable-summary--stdout-

viruscheck_source_allowedpop3

viruscheck_maxsize_allowed50000

virus_destinationvirus-mail

has_virusfolder_by_defaultyes

enable_spamcheckno

spamcheck_pipe/usr/local/bin/spamc-c-x-t60-u@@@USERNAME@@@

spamcheck_source_allowedpop3

spamcheck_maxsize_allowed1000

spam_destinationspam-mail

has_spamfolder_by_defaultyes

enable_learnspamno

learnspam_pipe/usr/local/bin/sa-learn--spam

learnham_pipe/usr/local/bin/sa-learn--ham

learnspam_destinationspam-mail

learnham_destinationINBOX

enable_pop3yes

pop3_disallowed_serversyour_server,your_server.domain

pop3_delmail_by_defaultyes

pop3_delmail_hiddenno

pop3_usessl_by_defaultno

authpop3_server192.168.0.111

authpop3_port110

authpop3_getmailno

authpop3_delmailyes

authpop3_usesslno

loginerrordelay10

fetchpop3interval15

calendar_email_notifyinterval120

enable_strictfoldernameno

foldername_maxlen32

maxbooksize32

attlimit50000

abook_maxsizeallbooks100

abook_globaleditableyes

abook_importlimit250

abook_attlimit25

webdisk_rootpath/

webdisk_readonlyno

webdisk_uploadlimit50000

webdisk_lsmailfolderyes

webdisk_lshiddenyes

webdisk_lsunixspecyes

webdisk_lssymlinkyes

webdisk_allow_symlinkcreateyes

webdisk_allow_symlinkoutyes

webdisk_symlinkout_displaypath

webdisk_allow_thumbnailyes

webdisk_allow_untaryes

webdisk_allow_unzipyes

webdisk_allow_unraryes

webdisk_allow_unarjyes

webdisk_allow_unlzhyes

spool_limit0

quota_limit0

quota_threshold75

delmail_ifquotahitno

delfile_ifquotahitno

vdomain_admlistsysadm

vdomain_maxuser100

vdomain_maxalias100

vdomain_vmpop3_pwdpath/etc/virtual

vdomain_vmpop3_pwdnamepasswd

vdomain_vmpop3_mailpath/var/spool/virtual

vdomain_postfix_aliases/etc/postfix/aliases

vdomain_postfix_virtual/etc/postfix/virtual

vdomain_postfix_postalias/usr/sbin/postalias

vdomain_postfix_postmap/usr/sbin/postmap

vdomain_mailbox_commandnone

localusersnone

%name%

version%version%

%help_text%?

##############################################################################

#defaultsettingfornewuser'spreference

##############################################################################

default_languageauto

default_charsetauto

default_timeoffsetauto

default_daylightsavingauto

default_realnameauto

default_fromemailsauto

default_autoreplysubjectThisisanautoreply...[Re:$SUBJECT]

Hello,

Iwillnotbereadingmymailforawhile.

Yourmailregarding'$SUBJECT'willbereadwhenIreturn.

--

OpenWebMailProject(http://openwebmail.org)

default_styleDefault

default_iconsetDefault

default_bgurl%ow_htmlurl%/images/backgrounds/Globe.gif

default_bgrepeatyes

default_fontsize10pt

default_dateformatmm/dd/yyyy

default_hourformat12

default_ctrlposition_folderviewtop

default_msgsperpage10

default_fieldorderdatefromsubjectsize

default_sortdate

default_useminisearchiconyes

default_confirmmsgmovecopyyes

default_defaultdestinationsaved-messages

default_smartdestinationyes

default_viewnextaftermsgmovecopyyes

default_autopop3yes

default_autopop3wait0

default_bgfilterwait10

default_moveoldmsgfrominboxno

forced_moveoldmsgfrominboxno

default_ctrlposition_msgreadtop

default_headerssimple

default_showhtmlastextno

default_showimgaslinkno

default_usefixedfontno

default_usesmileiconyes

default_disablejsyes

default_disableembcodeyes

default_disableemblinkcgionly

default_sendreceiptask

default_msgformatauto

default_editcolumns78

default_editrows24

default_sendbuttonpositionbefore

default_reparagraphorigmsgyes

default_replywithorigmsgat_beginning

default_backupsentmsgyes

default_sendcharsetsameascomposing

default_fscharsetnone

default_uselightbaryes

default_regexmatchyes

default_hideinternalyes

default_refreshinterval20

min_refreshinterval3

default_newmailsoundYouGotMail.English.wav

default_newmailwindowtime7

default_mailsentwindowtime5

default_dictionaryenglish

default_trashreserveddays7

default_spamvirusreserveddays3

default_sessiontimeout60

default_viruscheck_sourcepop3

default_viruscheck_maxsize10000

default_viruscheck_minbodysize1

default_spamcheck_sourcepop3

default_spamcheck_maxsize250

default_spamcheck_threshold10

default_filter_repeatlimit10

default_filter_badaddrformatno

default_filter_fakedsmtpno

default_filter_fakedfromno

default_filter_fakedexecontenttypeno

default_abook_ width600

default_abook_height400

default_abook_buttonpositionafter

default_abook_defaultfilterno

default_abook_defaultsearchtypenone

default_abook_defaultkeywordnone

default_abook_addrperpage10

default_abook_collapse1

default_abook_sortfullname

default_abook_listviewfieldorderfullname,email,phone,note

default_calendar_defaultviewcalmonth

default_calendar_holidaydefauto

default_calendar_monthviewnumitems5

default_calendar_weekstart0

default_calendar_starthour0800

default_calendar_endhour1700

default_calendar_interval30

default_calendar_showemptyhoursyes

default_calendar_reminderdays7

default_calendar_reminderforglobalyes

default_webdisk_dirnumitems10

default_webdisk_confirmmovecopyyes

default_webdisk_confirmdelyes

default_webdisk_confirmcompressyes

default_webdisk_fileeditcolumns96

default_webdisk_fileeditrows24

>>3./var/www/cgi-bin/openwebmail/etc/defaults/dbm.conf[只需修改3处],完整的内容如下:

#

#configfilefordbm.pl

#

#dbm_ext

#-----------------------------------------------------------------------

#Thisistheextensionnameforthedbmfileonyoursystem

#

#ps:Youcanrun'perlopenwebmail/misc/test/dbmtest.pl'togetvalueforthis

#dbmopen_ext

#-----------------------------------------------------------------------

#Thisisthedbextensionpassedtothedbmopen()call.

#Itshouldbesetto'none'inmostcase.Youneedtosetitto%dbm_ext%

#onlyifyouuseanyDBFilemoduleinscriptexplicitly

#

#ps:Itissaidthisoptionneedstobesetto'%dbm_ext%'ontheSun

#CobalserverorSlackware8.x.

#Youcanrun'perlopenwebmail/misc/test/dbmtest.pl'togetvalueforthis

#dbmopen_haslock

#-----------------------------------------------------------------------

#Ifyourperldbmsystemwilldofilelockindbmopen()byitself,

#setthisoptionto'yes'soopenwebmailwon'tdounnecessaryfilelock

#beforedbmopen.Onmostsystems,thisoptionshouldbesetto'no'.

#

#ps:Ifyouropenwebmailhangsafterloginorsavingpreference,

#youprobablelyneedtosetthisoptionto'y,es'

dbm_ext.db

dbmopen_ext.db

dbmopen_haslockyes

smtpserver192.168.0.111//添加SMTP服务器的IP地址

ok,上面的文件修改完后,再运行./openwebmail-tool.pl–init执行初始化脚本

[root@AS3openwebmail]#./openwebmail-tool.pl--init

有关openwebmail的配置就完成了

Step3.修改APACHE的配置文件(httpd.conf)

[root@AS3openwebmail]#vi/etc/httpd/conf/httpd.conf

//添加如下语句

#===thestart===

ScriptAlias/openwebmail"/var/www/cgi-bin/openwebmail/openwebmail.pl"

AllowOverrideNone

OptionsExecCGI-Indexes

Orderallow,deny

Allowfromall

Alias/data"/var/www/data"

#===theend====

[root@AS3openwebmail]#servicehttpdrestart//重启apache

现在所以的工作都完成了,新建用户去测试吧

Step4.进行OWM测试


发表评论:

最近发表
网站分类
标签列表