Sympa Manual
一、安装sympa
1. linux环境
#cat /etc/issue
Red Hat Enterprise Linux AS release 4 (Nahant Update 4) |
2. 管理员登录
以管理员root账号登录
3. 公网配置DNS
A记录
scm5.***.cn -> ***.51.173.24 mail.scm5.***.cn -> ***.51.173.24 |
#nslookup scm5.***.cn
#nslookup mail.scm5.***.cn
MX记录
scm5.***.cn -> mail.scm5.***.cn |
#nslookup -q=mx scm5.***.cn
反解析
***.51.173.24 -> mail.scm5.***.cn |
#nslookup -q=ptr ***.51.173.24
配置SPF
#dig -t scm5.***.cn
4. 配置time
#crontab -e
0 21 * * * /usr/sbin/ntpdate 10.1.56.203 |
5. 配置iptables
#vi /etc/sysconfig/iptables
# Firewall configuration written by system-config-securitylevel # Manual customization of this file is not recommended. *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] :RH-Firewall-1-INPUT - [0:0] -A INPUT -j RH-Firewall-1-INPUT -A FORWARD -j RH-Firewall-1-INPUT -A RH-Firewall-1-INPUT -i lo -j ACCEPT -A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT -A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT #mail.***.cn,mail.***.com,mail.***.com,mail.***.cn,mail.***.cn, #mail.***.cn,mail.***.com,mail.***.com.cn,mail.***.com,mail.***.cn,mail.***.com -A RH-Firewall-1-INPUT -s ***.10.79.61 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.10.79.62 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.10.78.174 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.10.78.175 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.10.78.176 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.100.7.27 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.100.7.29 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.100.7.32 -j ACCEPT #mail.***.com -A RH-Firewall-1-INPUT -s ***.100.7.17 -j ACCEPT #mail.***.com -A RH-Firewall-1-INPUT -s ***.188.19.142 -j ACCEPT #smtp.***.com -A RH-Firewall-1-INPUT -s 63.***.16.42 -j ACCEPT -A RH-Firewall-1-INPUT -s 63.***.16.43 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.14.3.143 -j ACCEPT #ruanjianyuan bangongqu -A RH-Firewall-1-INPUT -s ***.51.173.153 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.51.173.154 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.51.173.155 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.51.173.156 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.51.173.157 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.51.173.158 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.51.173.160 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.51.173.165 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.51.173.166 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.51.173.167 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.51.173.168 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.51.173.169 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.51.173.170 -j ACCEPT #ruanjianyuan bangongqu xianzhi daikuan -A RH-Firewall-1-INPUT -s ***.51.173.159 -j ACCEPT #project.***.cn -A RH-Firewall-1-INPUT -s ***.157.98.58 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.157.98.68 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.157.98.62 -j ACCEPT #huilongsen bangongqu -A RH-Firewall-1-INPUT -s ***.249.75.106 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.249.75.107 -j ACCEPT #scm1.***.cn -A RH-Firewall-1-INPUT -s ***.51.173.20 -j ACCEPT #scm2.***.cn -A RH-Firewall-1-INPUT -s ***.51.173.21 -j ACCEPT #scm4.***.cn -A RH-Firewall-1-INPUT -s ***.51.173.23 -j ACCEPT #scm3.***.cn -A RH-Firewall-1-INPUT -s ***.51.173.22 -j ACCEPT #scm5.***.cn -A RH-Firewall-1-INPUT -s ***.51.173.24 -j ACCEPT #yizhuang wangtong idc -A RH-Firewall-1-INPUT -s 10.1.0.0/255.255.0.0 -j ACCEPT #yizhuang wangtong idc bangongqu -A RH-Firewall-1-INPUT -s ***.51.173.56 -j ACCEPT #openvpn -A RH-Firewall-1-INPUT -s 192.168.0.0/255.255.0.0 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.10.72.132 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.10.72.133 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.51.173.81 -j ACCEPT #shanghai bangongqu -A RH-Firewall-1-INPUT -s ***.160.165.70 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.160.165.71 -j ACCEPT -A RH-Firewall-1-INPUT -s ***.160.165.66 -j ACCEPT #guangzhou bangongqu -A RH-Firewall-1-INPUT -s ***.62.144.226 -j ACCEPT #shenzhen bangongqu -A RH-Firewall-1-INPUT -s ***.15.143.145 -j ACCEPT #guangzhou idc bangongqu -A RH-Firewall-1-INPUT -s ***.14.9.141 -j ACCEPT -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited COMMIT |
#service iptables restart
6. 本机配置hosts
#vi /etc/hosts
增加如下行
***.51.173.24 mail.scm5.***.cn suc1mr |
7. 关闭selinux
#vi /etc/selinux/config
修改如下行
SELINUX=disabled |
#reboot
8. 配置sendmail
#vi /etc/mail/sendmail.mc
修改如下行
define(`ALIAS_FILE', `/etc/aliases,/etc/sympa.aliases,/etc/sympa/sympa_aliases')dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl |
增加如下行
define(QUEUE_DIR, `/var/spool/mqueue/q*') |
#mkdir /etc/sympa/
#touch /etc/sympa/sympa_aliases
#vi /etc/mail/local-host-names
增加如下行
scm5.***.cn mail.scm5.***.cn |
#vi /etc/mail/access
增加如下行
mail.scm5.***.cn RELAY scm5.***.cn RELAY |
#cd /etc/mail/
#makemap hash access.db < access
#vi /etc/mail/trusted-users
增加如下行
sympa |
#cd /var/spool/mqueue
#mkdir q1 q2 q3 q4 q5 q6
#m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
9. 启动sendmail服务
#service sendmail restart
#chkconfig --add sendmail
#chkconfig --level 35 sendmail on
#tail -f /var/log/maillog
10. 配置cyrus-sasl
#vi /etc/sysconfig/saslauthd
修改如下行
MECH=shadow |
11. 启动cyrus-sasl服务
#service saslauthd restart
#chkconfig --add saslauthd
#chkconfig --level 35 saslauthd on
12. 安装mysql
#rpm -ivh mysqlclient10-devel-3.23.58-4.RHEL4.1
#rpm -ivh mysql-bench-4.1.20-1.RHEL4.1
#rpm -ivh mysqlclient10-3.23.58-4.RHEL4.1
#rpm -ivh mysql-server-4.1.20-1.RHEL4.1
#rpm -ivh mysql-4.1.20-1.RHEL4.1
#rpm -ivh mysql-devel-4.1.20-1.RHEL4.1
13. 启动mysqld服务
#service mysqld restart
#chkconfig --add mysqld
#chkconfig --level 35 mysqld on
#tail -f /var/log/mysqld.log
14. 安装dovecot
#rpm -e dovecot-*
#rpm -e sqlite-*
#rpm -ivh sqlite-3.3.6-0.3.el4.i386.rpm
#rpm -ivh dovecot-1.0.15-1_73.el4.i386.rpm
15. 配置dovecot
#vi /etc/dovecot.conf
修改如下行
protocols = pop3 listen = * |
16. 启动dovecot服务
#service dovecot restart
#chkconfig --add dovecot
#chkconfig --level 35 dovecot on
#tail -f /var/log/maillog
17. 安装MHonArc
#tar zxvf MHonArc-2.6.16.tar.gz
#cd MHonArc-2.6.16
#perl install.me
18. 安装mod_fcgid
#rpm -e mod_fcgid-*
#rpm -ivh mod_fcgid-2.2-4.el4.i386.rpm
19. 安装sympa
#useradd sympa
#tar zxvf sympa-5.4.7.tar.gz
#cd sympa-5.4.7
#./configure --with-bindir=/etc/smrsh/ --with-openssl=/usr/bin/openssl
#perl check_perl_modules.pl
#make
#make install
#chmod a+rx /home/sympa
20. 配置mysql
#vi /etc/my.cnf
[client] default-character-set=utf8 [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock # Default to using old password format for compatibility with mysql 3.x # clients (those using the mysqlclient10 compatibility package). old_passwords=1 default-character-set=utf8 init_connect='SET NAMES utf8' [mysql.server] user=mysql basedir=/var/lib [mysqld_safe] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid |
21. 重启mysqld服务
#service mysqld restart
#mysql -u root mysql
mysql>update user set password=password('***') where user='root';
mysql>flush privileges;
mysql>quit
22. 建立数据库
#mysql -u root -p*** < /home/sympa/bin/create_db.mysql
23. 配置sympa
#vi /etc/sympa.conf
### Directories and file location ////### ## Directory containing mailing lists subdirectories home /home/sympa/expl ## Directory for configuration files ; it also contains scenari/ and templates/ directories etc /home/sympa/etc ## File containing Sympa PID while running. ## Sympa also locks this file to ensure that it is not running more than once. Caution : user sympa need to write access without special privilegee. pidfile /home/sympa/sympa.pid ## Umask used for file creation by Sympa umask 027 ## Directory containing available NLS catalogues (Message internationalization) localedir /home/sympa/locale ## The main spool containing various specialized spools ## All spool are created at runtime by sympa.pl spool /home/sympa/spool ## Incoming spool queue /home/sympa/spool/msg ## Bounce incoming spool queuebounce /home/sympa/spool/bounce ## The directory where Sympa stores static contents (CSS, members pictures, documentation) directly delivered by Apache static_content_path /home/sympa/static_content ## The URL mapped with the static_content_path directory defined above static_content_url /static-sympa ### Syslog ////### ## The syslog facility for sympa ## Do not forget to edit syslog.conf syslog LOCAL1 ## Communication mode with syslogd is either unix (via Unix sockets) or inet (use of UDP) log_socket_type unix ## Log intensity ## 0 : normal, 2,3,4 for debug log_level 0 ### General definition ////### ## Main robot hostname domain scm5.***.cn ## Listmasters email list comma separated ## Sympa will associate listmaster privileges to these email addresses (mail and web interfaces). Some error reports may also be sent to these addresses. # was listmaster your_email_address@scm5.***.cn listmaster scm@***.cn ## Local part of sympa email adresse ## Effective address will be [EMAIL]@[HOST] email sympa ## Who is able to create lists ## This parameter is a scenario, check sympa documentation about scenarios if you want to define one create_list public_listmaster ### Tuning ////### ## Use of binary version of the list config structure on disk: none | binary_file ## Set this parameter to "binary_file" if you manage a big amount of lists (1000+) ; it should make the web interface startup faster cache_list_config none ## Sympa commands priority sympa_priority 1 ## Default priority for list messages default_list_priority 5 ## Secret used by Sympa to make MD5 fingerprint in web cookies secure ## Should not be changed ! May invalid all user password cookie 553956585 ## The default maximum size (in bytes) for messages (can be re-defined for each list) max_size 10242880 ## comma separated list of operation for which blacklist filter is applyed ## set this parameter to "none" hidde blacklist feature use_blacklist send,create_list ## Specify which rfc2369 mailing list headers to add # was rfc2369_header_fields ARRAY(0x9a863dc) rfc2369_header_fields help,subscribe,unsubscribe,post,owner,archive ## Specify header fields to be removed before message distribution # was remove_headers ARRAY(0x9a86478) remove_headers X-Sympa-To,X-Family-To,Return-Receipt-To,Precedence,X-Sequence,Disposition-Notification-To ### Internationalization ////### ## Default lang (ca | cs | de | el | es | et_EE | en_US | fr | fi | hu | it | ja_JP | ko | nl | oc | pl | pt_BR | ru | sv | tr | vi | zh_CN | zh_TW) ## This is the default language used by Sympa # was lang en_US lang zh_CN ## Supported languages ## This is the set of language that will be proposed to your users for the Sympa GUI. Don't select a language if you don't have the proper locale packages installed. # was supported_lang ca,cs,de,el,es,et_EE,en_US,fr,fi,hu,it,ja_JP,ko,nl,nb_NO,oc,pl,pt_BR,ru,sv,tr,vi,zh_CN,zh_TW supported_lang en_US,zh_CN ### Errors management ////### ## Bouncing email rate for warn list owner bounce_warn_rate 30 ## Bouncing email rate for halt the list (not implemented) ## Not yet used in current version, Default is 50 bounce_halt_rate 50 ## Task name for expiration of old bounces expire_bounce_task daily ## Welcome message return-path ## If set to unique, new subcriber is removed if welcome message bounce welcome_return_path owner ## Remind message return-path ## If set to unique, subcriber is removed if remind message bounce, use with care remind_return_path owner ### MTA related ////### ## Path to the MTA (sendmail, postfix, exim or qmail) ## should point to a sendmail-compatible binary (eg: a binary named 'sendmail' is distributed with Postfix) sendmail /usr/sbin/sendmail ## Maximum number of recipients per call to Sendmail. The nrcpt_by_domain.conf file allows a different tuning per destination domain. nrcpt 25 ## Max. number of different domains per call to Sendmail avg 10 sendmail_aliases /etc/sympa/sympa_aliases ## Max. number of Sendmail processes (launched by Sympa) running simultaneously ## Proposed value is quite low, you can rise it up to 100, 200 or even 300 with powerfull systems. maxsmtp 40 ### Pluggin ////### ## Path to the antivirus scanner engine ## supported antivirus : McAfee/uvscan, Fsecure/fsav, Sophos, AVP and Trend Micro/VirusWall # antivirus_path /usr/local/uvscan/uvscan ## Antivirus pluggin command argument # antivirus_args --secure --summary --dat /usr/local/uvscan ### S/MIME pluggin ////### ## Path to OpenSSL ## Sympa knowns S/MIME if openssl is installed # was openssl #openssl /usr/bin/openssl ## The directory path use by OpenSSL for trusted CA certificates # capath /home/sympa/etc/ssl.crt ## This parameter sets the all-in-one file where you can assemble the Certificates of Certification Authorities (CA) #cafile /home/sympa/bin/etc/ca-bundle.crt ## User CERTs directory #ssl_cert_dir /home/sympa/expl/X509-user-certs ## Password used to crypt lists private keys # key_passwd your_password ### Database ////### ## Database type (mysql | Pg | Oracle | Sybase | SQLite) ## be carefull to the case # was db_type mysql db_type mysql ## Name of the database ## with SQLite, the name of the DB corresponds to the DB file db_name sympa ## The host hosting your sympa database # was db_host db_host localhost ## Database user for connexion # was db_user db_user root ## Database password (associated to the db_user) ## What ever you use a password or not, you must protect the SQL server (is it a not a public internet service ?) # was db_passwd db_passwd *** ## Database private extention to user table ## You need to extend the database format with these fields # db_additional_user_fields age,address ## Database private extention to subscriber table ## You need to extend the database format with these fields # db_additional_subscriber_fields billing_delay,subscription_expiration ### Web interface ////### ## Sympa's main page URL wwsympa_url http://scm5.***.cn/sympa |
#vi /etc/wwsympa.conf
#vi /etc/sympa.aliases
sympa: "| /home/sympa/bin/queue sympa@scm5.***.cn" listmaster: "| /home/sympa/bin/queue listmaster@scm5.***.cn" bounce+*: "| /home/sympa/bin/bouncequeue sympa@scm5.***.cn" abuse-feedback-report: "| /home/sympa/bin/bouncequeue sympa@scm5.***.cn" sympa-request: scm@***.cn sympa-owner: scm@***.cn |
#newaliases
#vi /home/sympa/bin/etc/topics.conf
清空后增加如下行
*** title *** |
#vi /home/sympa/bin/etc/create_list.conf
增加如下行
hotline hidden private_working_group hidden news-letter hidden public_web_forum hidden html-news-letter hidden news-letter hidden |
#vi /home/sympa/bin/etc/create_list_templates/discussion_list/config.tt2
… web_archive access private max_month 1 … subscribe owner … unsubscribe owner … review public … shared_doc d_edit default d_read owner … send public ... |
#ln -s /home/sympa/bin/aliaswrapper /etc/smrsh/
#ln -s /usr/bin/mhonarc /etc/smrsh/
#ln -s /usr/bin/newaliases /etc/smrsh/
24. 配置httpd
#mkdir /var/www/_sympa_/
#cp -a /home/sympa/static_content /var/www/_sympa_/
#vi /var/www/_sympa_/wwsympa-wrapper.fcgi
内容如下行
#!/bin/bash # Path to your real wwsympa.fcgi exec /home/sympa/bin/wwsympa-wrapper.fcgi |
#chmod 755 /var/www/_sympa_/wwsympa-wrapper.fcgi
#chown -R sympa.sympa /var/www/_sympa_/
#vi /etc/httpd/conf/httpd.conf
增加如下行
<VirtualHost ***.51.173.24> SuexecUserGroup sympa sympa ServerName scm5.***.cn <Directory "/var/www/_sympa_/"> AllowOverride None Options ExecCGI Order allow,deny Allow from all AddHandler fcgid-script .fcgi </Directory> Alias /static-sympa /var/www/_sympa_/static_content ScriptAlias /sympa /var/www/_sympa_/wwsympa-wrapper.fcgi </VirtualHost> |
25. 配置syslog
#vi /etc/syslog.conf
增加如下行
local1.* /var/log/sympa |
26. 重启syslog服务
#service syslog restart
27. 启动httpd服务
#service httpd restart
#chkconfig --add httpd
#chkconfig --level 35 httpd on
#tail -f /var/log/httpd/error_log
28. 启动sympa服务
#service sympa restart
#chkconfig --add sympa
#chkconfig --level 35 sympa on
#tail -f /var/log/sympa
29. 配置账号维护脚本
#mkdir /bin2
#vi doadd.sh
#!/bin/sh if [ "$1" = "" ]; then exit 1 ; fi if [ "$2" = "" ]; then exit 1 ; fi cou1=`mysql -u root -p*** -e "use sympa; select count(*) from admin_table where list_admin='$1'" | sed -n '2p';` if [ "$cou1" -ne "0" ] then cou2=`mysql -u root -p*** -e "use sympa; select count(*) from subscriber_table where list_subscriber='$1' and user_subscriber like '$2'" | sed -n '2p';` if [ "$cou2" -eq "0" ] then da=`date +%F' '%T` mysql -u root -p*** -e "use sympa; insert into subscriber_table values ('$1', '$2', '<?xml version="1.0" encoding="UTF-8" ?><custom_attributes></custom_attributes>', 'scm5.***.cn', '$da', '$da', 'noconceal', 'mail', NULL, NULL, NULL, NULL, NULL, 1, 0, NULL)"; fi fi |
#vi dodel.sh
#!/bin/sh if [ "$1" = "" ]; then exit 1 ; fi if [ "$2" = "" ]; then exit 1 ; fi mysql -u root -p*** -e "use sympa; delete from subscriber_table where list_subscriber='$1' and user_subscriber='$2'"; |
#vi dofind.sh
#!/bin/sh if [ "$1" = "" ]; then exit 1 ; fi if [ "$2" = "" ]; then exit 1 ; fi mysql -u root -p*** -e "use sympa; select list_subscriber,user_subscriber from subscriber_table where list_subscriber='$1' and user_subscriber like '%$2%'"; exit 0; |
#vi w.sh
内容如下
#!/bin/sh export LC_ALL=zh_CN.GB18030 n0=`expr index $1 "@"` if [ $n0 = 0 ] then echo "***账号格式不对,请输入完整的mail地址***" exit fi n1=$1 n2=`echo ${n1##*@}` if [ "$n2" = "***.cn" ] then n3=`echo ${n1%%@*}` else n3=`echo ${n1/@/.}` fi echo ...sympa... mysql -u root -p*** -e "use sympa; delete from subscriber_table where user_subscriber='$n1'"; #ssh $LOGNAME@scm5.***.cn "mysql -u root -p*** -e "use sympa; delete from subscriber_table where user_subscriber='$1'";" /bin/echo "$n1" | /usr/bin/mutt -s "logoff-user" scm-dept@scm5.***.cn |
二、日常管理
1. 管理员登录
以管理员wang账号登录
$cd /bin2/
2. 增加用户
$sh doadd.sh test abc@scm5.***.cn
3. 删除用户
$sh dodel.sh test abc@scm5.***.cn
4. 查询用户
$sh dofind.sh test abc
三、维护
1. 备份
#mysqldump --opt -u root -p*** sympa > sympa.sql
2. 恢复
#mysql -uroot -p***
mysql>drop database sympa;
mysql>create database sympa;
mysql>quit
#mysql -uroot -p*** sympa < sympa.sql
#mysqlcheck -uroot -p*** --databases sympa
#mysql_fix_privilege_tables --password=***
四、outlook to sympa
1. outlook to mbox
使用messagesave将outlook中的mail导出为mbox格式文件aa.mbox
将aa.mbox传到sympa服务器上
2. mbox to sympa
#mail -f aa.mbox
#wget http://www.sympa.org/distribution/contrib/import_mbox.sh
#wget http://www.sympa.org/distribution/contrib/mbox2sympa.pl
#mkdir /home/sympa/contribs/
#mv import_mbox.sh /home/sympa/contribs/
#mv mbox2sympa.pl /home/sympa/contribs/
#vi /home/sympa/contribs/import_mbox.sh
修改如下部分
#!/bin/sh … SYMPA_DOMAIN=scm5.***.cn SYMPA_USER=sympa:sympa SYMPA_ROOT=/home/sympa SYMPA_CONTRIBS=/home/sympa/contribs … #COUNT=`ls $SYMPA_ROOT/expl/$LIST_NAME/archives | wc -l` #(( COUNT > 0 )) && echo "Sorry, Sympa text archives directory not empty - I stop!" && exit 2 find "$SYMPA_ROOT/expl/$LIST_NAME/archives/" -name $MBOX_BACKUP -exec rm -f {} ; find "$SYMPA_ROOT/expl/$LIST_NAME/archives/" -name 'log.*' -exec rm -f {} ; … # Generate the HTML archives echo "Step 4: triggering web archives regeneration" touch $SYMPA_ROOT/spool/outgoing/.rebuild.$LIST_NAME@$SYMPA_DOMAIN … |
#vi /home/sympa/bin/arc2webarc.pl
修改如下部分
… }elsif ($year !~ /^19[89]d|20[0-9][0-9]$/) { … |
#sh /home/sympa/contribs/import_mbox.sh aa.mbox tt
#ll /home/sympa/arc/tt@scm5.***.cn/
参考:
http://www.techhit.com/messagesave/
http://www.sympa.org/contribs/migration_and_archives/index
五、升级到centos5.2
1. linux环境
#cat /etc/issue
CentOS release 5.2 (Final) |
2. 升级
#rpm -ivh mod_fcgid-2.2-4.el5.kb.i386.rpm
六、升级到6.1.7
1. 备份
#service sympa stop
#service httpd stop
#service mysqld start
#mysqldump --opt -u root -p*** sympa > sympa.sql
2. 配置mysql
#vi /etc/my.cnf
[mysqld] ... max_allowed_packet=32M |
3. 升级
#rpm -Uvh perl-DBD-mysql-4.010-1.el5.rf.i386.rpm
#tar zxvf sympa-6.1.7.tar.gz
#cd sympa-6.1.7
#./configure
#make
#make install
#/home/sympa/bin/sympa_wizard.pl --check
#chown -R sympa.sympa /home/sympa/static_content/
#/home/sympa/bin/sympa.pl --upgrade
#/home/sympa/bin/sympa.pl --test_database_message_buffer
#/home/sympa/bin/sympa.pl --md5_encode_password
#sed -i "s//etc/smrsh//queue//home/sympa/bin/queue/" /etc/sympa/sympa_aliases
#rm -fr /var/www/_sympa_/static_content/
#cp -a /home/sympa/static_content /var/www/_sympa_/
#chown -R sympa.sympa /var/www/_sympa_/
#mv /home/sympa/bin/etc/topics.conf /home/sympa/default/
#mv /home/sympa/bin/etc/create_list.conf /home/sympa/default/
#mv /home/sympa/bin/etc/create_list_templates/discussion_list/config.tt2 /home/sympa/default/create_list_templates/discussion_list/
#sed -i "s/***/all/" /home/sympa/default/topics.conf
#find /home/sympa/expl/ -name config -exec sed -i "s/topics ***/topics all/" {} ;
#service httpd start
#service sympa start
七、change robot name
#vi /etc/hosts
#vi /etc/mail/local-host-names
#vi /etc/mail/access
#cd /etc/mail/
#makemap hash access.db < access
#vi /etc/sympa.aliases
#vi /etc/sympa/sympa_aliases
#newaliases
#service sendmail restart
#vi /etc/sympa.conf
#vi /etc/httpd/conf/httpd.conf
#vi z.sh
#!/bin/sh SAVEIFS=$IFS IFS=" " cd /home/sympa/arc/ file1=/root/Noname1.txt if [ -f $file1 ] then file2=`cat $file1` for f in $file2 do echo $f mv $f@scm5.***.cn $f@scm5.***.cn done fi IFS=$SAVEIFS |
#sh z.sh
#ll /home/sympa/expl/
#ll /home/sympa/arc/
#ll /home/sympa/etc/
#ll /home/sympa/spool/
#mysql -u root -p*** -e "use sympa; select * from subscriber_table where robot_subscriber like '%***%';"
#mysql -u root -p*** -e "use sympa; update subscriber_table set subscriber_table.robot_subscriber = 'scm5.***.cn'; "
#mysql -u root -p*** -e " use sympa; select * from subscriber_table where user_subscriber like '%***%'; "
#mysql -u root -p*** -e "use sympa; select * from admin_table where robot_admin like '%***%';"
#mysql -u root -p*** -e "use sympa; update admin_table set admin_table.robot_admin = 'scm5.***.cn'; "
http://www.sympa.org/manual_6.1/virtual-hosts
http://www.sympa.org/manual_6.1/index
http://www.sendmail.org/tips/virtualHosting
http://www.sympa.org/faq/merging_vhosts
http://www.sympa.org/manual_6.1/upgrading#moving_to_another_server
http://www.sympa.org/faq/change_robot_name