
| Virtual Hosting Howto With Virtualmin On CentOS 5.1 |
| 摘自: www.howtoforge.com 被阅读次数: 546 |
由 yangyi 于 2008-04-30 19:33:04 提供 |
Version 1.0 IntroductionThis tutorial shows how to set up a CentOS 5.x server to offer all services needed by virtual web hosters. These include web hosting, smtp server with (SMTP-AUTH and TLS, SPF, DKIM, Domainkeys), DNS, FTP, MySQL, POP3/IMAP, Firewall, Webalizer for stats. I will use the following software:
OS InstallationRequirementsTo install the system you will need
Install The Base System
Set IP address and netmask: Set gateway and dns servers: Set the hostname:
Start the installation: File system is formatted: The installation will run: Reboot the system: Services To Disable To enhance security and free system resources on the system we need to disable any services that are not required. You can run this script to do this for you.
BasicsWe need to fix a few issues to prepare the system for configuration.
yum upgrade
alternatives --config mta There are 2 programs which provide 'mta'.
yum install caching-nameserver
yum install gcc cpp gcc-c++ automake automake14 automake15 automake16 automake17 openssl-devel subversion ncurses-devel -y
Configure Network Aliascp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:1 Modify the file /etc/sysconfig/network-scripts/ifcfg-eth0:1 to look like this:DEVICE=eth0:1 BOOTPROTO=static BROADCAST=192.168.1.255 IPADDR=192.168.1.6 NETMASK=255.255.255.0 NETWORK=192.168.1.0 ONBOOT=yes
Install Webmin / Virtualmin
wget http://www.webmin.com/jcameron-key.asc
wget http://prdownloads.sourceforge.net/webadmin/webmin-1.390-1.noarch.rpm
rpm --checksig webmin-1.390-1.noarch.rpm
rpm -Uvh webmin-1.390-1.noarch.rpm
Initial Webmin ConfigWe need to secure webmin by editing /etc/webmin/miniserv.conf and make the following changes:
ssl=1
port=443 bind=192.168.1.6
#listen=10000
blockhost_failures=3
blockhost_time=120
blockuser_failures=3
blockuser_time=120
realm=cpanel
utmp=1 Install the webmin Tiger theme:
Install php-pear module:
Install virtualmin:
Remove unwanted modules Go to webmin ? webmin configuration ? delete and select the following:
Restart webmin: service webmin restart
Configure Rpmforge Reporpm -Uhv http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
enabled = 0
Install Extra Required Packages
yum --enablerepo=rpmforge install clamav clamav-db clamav-milter clamd -y
wget http://www.sanesecurity.co.uk/clamav/update_sanesecurity.txt -O /usr/local/bin/update_sanesecurity.sh
yum --enablerepo=rpmforge install php-eaccelerator
yum --enablerepo=rpmforge upgrade spamassassin
yum --enablerepo=rpmforge install spamass-milter
perl -MCPAN -e 'install Mail::SPF'
yum --enablerepo=rpmforge install netpbm-progs ocrad gocr gifsicle giflib-utils giflib -y
yum --enablerepo=rpmforge install razor-agents -y
yum install php-imap
wget http://imapproxy.org/downloads/up-imapproxy-1.2.6.tar.gz
chkconfig --level 345 httpd on ConfigurationPostfix SetupIntroductionWe will be setting up postfix with the following features:
The adding of accounts and domains with be configured through virtualmin although it can be done manually as well. The setup is designed to be resource friendly so should be able to run on machines that are not over spec'ed so enabling the resources to be put to better use. To make it resource friendly we are not using external databases to store virtual user information like most other how-to's do as well as using milters for spam and virus checking as opposed to running amavisd-new.
The BasicsTo begin with we will configure the basics such as the hostname, mail origin, networks, hash maps spool directory. All these configuration options should be added to /etc/postfix/main.cf unless stated. Sample configuration files are available for download at the end of this page. command_directory = /usr/sbin daemon_directory = /usr/libexec/postfix mydomain = example.com myorigin = $mydomain mynetworks = 127.0.0.0/8 alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases canonical_maps = hash:/etc/postfix/canonical sender_canonical_maps = hash:/etc/postfix/canonical recipient_canonical_maps = hash:/etc/postfix/canonical virtual_alias_maps = hash:/etc/postfix/virtual mail_spool_directory = /var/spool/mail
MaildirWe will use the much improved maildir format as opposed to the default mbox format: home_mailbox = Maildir/
SASLTo perform SMTP authentication we will be using SASL, however we will not use the Cyrus SASL as that requires us to run the saslauthd daemon, we will instead use dovecot sasl since we will be running dovecot for IMAP and POP3 thus killing 2 birds with one stone. smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_auth_enable = yes
TLSWe need TLS to ensure that the plain text passwords are not transmitted over the wire during SMTP authentication, servers that support TLS are also able to communicate with this server over a secured connection. Instructions on creating your server certificate signed by cacert.org are can be found here.
tls_random_source = dev:/dev/urandom
smtpd_use_tls = yes smtpd_tls_key_file = /etc/pki/postfix/key.pem smtpd_tls_cert_file = /etc/pki/postfix/server.pem smtpd_tls_CAfile = /etc/pki/postfix/root.crt smtpd_tls_loglevel = 1 smtpd_tls_received_header = yes smtpd_tls_session_cache_timeout = 3600s smtpd_tls_session_cache_database = btree:/var/spool/postfix/smtpd_tls_cache
smtp_use_tls = yes smtp_tls_key_file = /etc/pki/postfix/key.pem smtp_tls_cert_file = /etc/pki/postfix/server.pem smtp_tls_CAfile = /etc/pki/postfix/root.crt smtp_tls_session_cache_database = btree:/var/spool/postfix/smtp_tls_cache smtp_tls_note_starttls_offer = yes
Spam Prevention
smtpd_helo_required = yes
disable_vrfy_command = yes
unverified_recipient_reject_code = 550 unverified_sender_reject_code = 550 unknown_local_recipient_reject_code = 550
address_verify_map = btree:/var/spool/postfix/verify smtpd_sender_restrictions = hash:/etc/postfix/sender_access
#sample /etc/postfix/sender_access contains frequently spoofed domains aol.com reject_unverified_sender hotmail.com reject_unverified_sender yahoo.com reject_unverified_sender gmail.com reject_unverified_sender bigfoot.com reject_unverified_sender
smtpd_error_sleep_time = 5s smtpd_soft_error_limit = 10 smtpd_hard_error_limit = 20
smtpd_data_restrictions = reject_unauth_pipelining
wget http://www.openspf.org/blobs/postfix-policyd-spf-perl-2.005.tar.gz Add this to /etc/postfix/master.cf: spfpolicy unix - n n - - spawn user=nobody argv=/usr/bin/perl /etc/postfix/postfix-policyd-spf-perl
Instructions on adding DKIM support can be found here.
Instructions on adding domainkeys support can be found here.
smtpd_recipient_restrictions =
permit_mynetworks
permit_sasl_authenticated
reject_unauth_destination
check_recipient_access hash:/etc/postfix/access
reject_unknown_recipient_domain
reject_unknown_sender_domain
reject_unverified_recipient
reject_non_fqdn_recipient
reject_non_fqdn_sender
reject_invalid_hostname
reject_rbl_client list.dsbl.org
reject_rbl_client zen.spamhaus.org
reject_rbl_client l1.spews.dnsbl.sorbs.net
reject_rbl_client combined.njabl.org
reject_rbl_client bl.spamcop.net
reject_rhsbl_sender dsn.rfc-ignorant.org
reject_rhsbl_sender bogusmx.rfc-ignorant.org
reject_rhsbl_sender rhsbl.sorbs.net
reject_rhsbl_client dsn.rfc-ignorant.org
reject_rhsbl_client bogusmx.rfc-ignorant.org
reject_rhsbl_client rhsbl.sorbs.net
check_policy_service unix:private/spfpolicy
Milters [SpamAssassin & ClamAV]For your spam classification using spamassassin and virus scanning using clamav we will be using postfix's milter interface instead of using the resource intensive amavisd-new daemon. This is a very efficient way of doing it as we don't even have to run clamd the clamav milter does the scanning itself. smtpd_milters = unix:/var/clamav/clmilter.socket unix:/var/run/spamass.sock non_smtpd_milters = unix:/var/clamav/clmilter.socket unix:/var/run/spamass.sock
Create DB Files
postmap /etc/postfix/canonical
Sample Configuration FilesDovecot SetupIntroductionThis will setup dovecot as our IMAP/POP3 server.
Basic ConfigurationWe will setup dovecot for IMAP and POP3 and disable SSL. protocols = imap pop3 listen = * ssl_listen = * ssl_disable = yes
MaildirWe will use the maildir format as opposed to the default mbox format. mail_location = maildir:~/Maildir
Authentication & SASLConfigure dovecot to use LOGIN and PLAIN as the authentication mechanisims as many MS clients are unable to use encrypted authentication mechanisms. We also setup the SASL socket to enable postfix to authenticate SMTP connections using dovecot. auth default {
mechanisms = plain login
passdb pam {
}
userdb passwd {
}
socket listen {
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
}
Client IssuesSome MS imap clients in the outlook family have issues with both thier IMAP and POP3 implementations so we need to accommodate them by setting up these work arounds: protocol imap {
imap_client_workarounds = outlook-idle delay-newmail
}
protocol pop3 {
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}
Run IMAP Behind ProxyThe imap server is configured to run on port 10143 such that port 143 is handled by the imap proxy server that will improve performance for your webmail by caching connections to the imap server. The listen option under protocol sets this up. protocol imap {
imap_client_workarounds = outlook-idle delay-newmail
listen = 127.0.0.1:10143
}
Sample files
Setup Imap ProxyIntroductionimapproxy was written to compensate for webmail clients that are unable to maintain persistent connections to an IMAP server. Most webmail clients need to log in to an IMAP server for nearly every single transaction. This behaviour can cause tragic performance problems on the IMAP server. imapproxy tries to deal with this problem by leaving server connections open for a short time after a webmail client logs out. When the webmail client connects again, imapproxy will determine if there's a cached connection available and reuse it if possible. - according to the imapproxy website.
ConfigurationMake the following changes in the file /etc/imapproxy.conf: server_hostname 127.0.0.1 cache_size 3072 listen_port 143 server_port 10143 cache_expiration_time 900 proc_username nobody proc_groupname nobody stat_filename /var/run/pimpstats protocol_log_filename /var/log/imapproxy_protocol.log syslog_facility LOG_MAIL send_tcp_keepalives no enable_select_cache yes foreground_mode no force_tls no enable_admin_commands no
Sample Files
Bind SetupIntroductionBind will be set up chrooted to improve security we will also use views to prevent abuse of the dns server.
Basic ConfigurationThe basic configuration disables by default, recursive queries and zone transfers. We also obscure the version of BIND we are running such that we are not hit by zero day vulnerabilities from script kiddies. options {
directory "/var/named";
pid-file "/var/run/named/named.pid";
listen-on {
127.0.0.1;
192.168.1.5;
};
version "just guess";
allow-recursion { "localhost"; };
allow-transfer { "none"; };
};
LoggingThe logging is customized to remove the annoying "lame-server" and update errors that appear in the logs: logging {
category update { null; };
category update-security { null; };
category lame-servers{ null; };
};
ChrootEnsure that this is set in the file /etc/sysconfig/named (it's usually set by the bind-chroot package): ROOTDIR=/var/named/chroot
Point ServerLet the machine use this server for dns resolution edit /etc/resolv.conf and prepend: nameserver 127.0.0.1
Sample files
Vsftpd SetupIntroductionWe will use vsftpd as our ftp server. This has a better track record as opposed to the proftpd & wuftpd servers.
Basic SettingOur basic setup disables anonymous users, and enables local system users to connect to the ftp server. anonymous_enable=NO local_enable=YES write_enable=YES local_umask=022 anon_upload_enable=NO anon_mkdir_write_enable=NO dirmessage_enable=YES xferlog_enable=YES connect_from_port_20=YES xferlog_file=/var/log/vsftpd.log xferlog_std_format=YES ftpd_banner=Welcome to example.com server pam_service_name=vsftpd tcp_wrappers=YES
ChrootAll users will be chrooted to their home directories (except usernames in the /etc/vsftpd/chroot_list file) meaning the cannot break out and see other users files. chroot_list_enable=YES chroot_local_user=YES chroot_list_file=/etc/vsftpd/chroot_list
Banned UsersUsers added to the file /etc/vsftpd/user_list will not be allowed to login: userlist_enable=YES
Sample FilesClamav Milter Setup
CLAMAV_FLAGS="
--config-file=/etc/clamd.conf
--force-scan
--local
--max-children=5
--sendmail-cf=
--outgoing
--quiet
"
SOCKET_ADDRESS="local:/var/clamav/clmilter.socket"
wget http://www.topdog-software.com/files/clamav-milter.patch
MySQL SetupBasic Config
bind-address = 127.0.0.1
Set Root Password
service mysqld start
SpamAssassin SetupBasic Configrequired_hits 5 report_safe 0 rewrite_header Subject [SPAM]
Create MySQL Database
mysqladmin -p create bayes
mysql -p bayes < /usr/share/doc/spamassassin-$(rpm --qf %{VERSION} -q spamassassin)/sql/bayes_mysql.sql
mysql -p
Configure To Use DB
bayes_store_module Mail::SpamAssassin::BayesStore::MySQL bayes_sql_dsn DBI:mysql:bayes:localhost bayes_sql_override_username bayes bayes_sql_username bayes bayes_sql_password password
Configure FuzzyOCRWe will be storing the image hashes in a mysql database to improve on performance such that images that we have already scanned do not get scanned again as OCR is a resource intense activity.
Create MySQL Database
mysql -p < /usr/local/src/devel/FuzzyOcr.mysql
mysqladmin -u fuzzyocr -p fuzzyocr password
Basic Settings
focr_path_bin /usr/bin:/usr/local/bin focr_minimal_scanset 1 focr_autosort_scanset 1 focr_enable_image_hashing 3 focr_logfile /tmp/FuzzyOcr.log
Make FuzzyOCR Use The Database
focr_mysql_db FuzzyOcr focr_mysql_hash Hash focr_mysql_safe Safe focr_mysql_user fuzzyocr focr_mysql_pass password focr_mysql_host localhost focr_mysql_port 3306 focr_mysql_socket /var/lib/mysql/mysql.sock
SARE Rule Updates
mkdir /etc/mail/spamassassin/sa-update-keys/
updates.spamassassin.org 72_sare_redirect_post3.0.0.cf.sare.sa-update.dostech.net 70_sare_evilnum0.cf.sare.sa-update.dostech.net 70_sare_bayes_poison_nxm.cf.sare.sa-update.dostech.net 70_sare_html0.cf.sare.sa-update.dostech.net 70_sare_html_eng.cf.sare.sa-update.dostech.net 70_sare_header0.cf.sare.sa-update.dostech.net 70_sare_header_eng.cf.sare.sa-update.dostech.net 70_sare_specific.cf.sare.sa-update.dostech.net 70_sare_adult.cf.sare.sa-update.dostech.net 72_sare_bml_post25x.cf.sare.sa-update.dostech.net 99_sare_fraud_post25x.cf.sare.sa-update.dostech.net 70_sare_spoof.cf.sare.sa-update.dostech.net 70_sare_random.cf.sare.sa-update.dostech.net 70_sare_oem.cf.sare.sa-update.dostech.net 70_sare_genlsubj0.cf.sare.sa-update.dostech.net 70_sare_genlsubj_eng.cf.sare.sa-update.dostech.net 70_sare_unsub.cf.sare.sa-update.dostech.net 70_sare_uri0.cf.sare.sa-update.dostech.net 70_sare_obfu0.cf.sare.sa-update.dostech.net 70_sare_stocks.cf.sare.sa-update.dostech.net
#!/bin/bash # # sa-update -D --channelfile /etc/mail/spamassassin/sare-sa-update-channels.txt --gpgkey 856AA88A &>/var/log/sa-updates.log
chmod +x /usr/local/bin/update-sa
Spamass-milter SetupBasic Configuration
SOCKET=/var/run/spamass.sock EXTRA_FLAGS="-m -r 8"
PatchWe need to patch the init file to fix the permissions of the socket created such that postfix is able to use the socket.
wget http://www.topdog-software.com/files/spamass-milter.patch
Apache SetupDisable ModulesWe will disable some modules that we are not using thus freeing up memory and also improving security.
#LoadModule ldap_module modules/mod_ldap.so #LoadModule authnz_ldap_module modules/mod_authnz_ldap.so #LoadModule dav_module modules/mod_dav.so #LoadModule status_module modules/mod_status.so #LoadModule dav_fs_module modules/mod_dav_fs.so #LoadModule proxy_module modules/mod_proxy.so #LoadModule proxy_balancer_module modules/mod_proxy_balancer.so #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so #LoadModule proxy_http_module modules/mod_proxy_http.so #LoadModule proxy_connect_module modules/mod_proxy_connect.so #LoadModule cache_module modules/mod_cache.so #LoadModule disk_cache_module modules/mod_disk_cache.so #LoadModule file_cache_module modules/mod_file_cache.so #LoadModule mem_cache_module modules/mod_mem_cache.so
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
Listen To One IP For HTTPSApache has to be configured to listed to one address for port 443 as webmin will be using the same port. Edit /etc/httpd/conf.d/ssl: Listen 192,168.1.6:443
Enable Gzip CompressionWe setup gzip compression via the mod_deflate module to improve web server performance and to cut down on bandwidth usage by compressing responses to the client. SetOutputFilter DEFLATE BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html SetEnvIfNoCase Request_URI \ \.(?:gif|jpe?g|png)$ no-gzip dont-vary Header append Vary User-Agent env=!dont-vary Set up logging for the deflate module: DeflateFilterNote deflate_ratio
LogFormat "%v %h %l %u %t \"%r\" %>s %b mod_deflate: %{deflate_ratio}n pct." vhost_with_deflate_info
CustomLog logs/deflate_access_log vhost_with_deflate_info
Increase PHP Max MemoryEdit the file /etc/php.ini and set the following: memory_limit = 64M
Enable Virtual HostingNameVirtualHost *:80
Create Default Virtual HostThis needs to be the first virtual host, it will be the default on the server the equivalent of the server with out virtual hosting. <VirtualHost *:80>
Servername localhost.localdomain
Serveradmin root@localhost.localdomain
</Virtualhost>
Roundcube Webmail SetupCreate Database
mysqladmin -p create roundcube
mysql -u roundcube -p roundcube < /usr/share/doc/roundcube-0.1/SQL/mysql5.initial.sql
Basic Config
$rcmail_config['db_dsnw'] = 'mysql://roundcube:password@localhost/roundcube';
$rcmail_config['default_host'] = 'localhost'; $rcmail_config['default_port'] = 143; $rcmail_config['virtuser_file'] = '/etc/postfix/virtual'; $rcmail_config['smtp_server'] = 'localhost'; $rcmail_config['smtp_port'] = 25; $rcmail_config['smtp_helo_host'] = 'localhost';
Set Up Catch All VirtualhostAs we will be providing webmail for all domains that are created on the system we need to setup a catch all virtualhost that can display roundcube when ever a user accesses http://webmail.domainname. Edit /etc/httpd/conf/httpd.conf and append: <VirtualHost *:80> ServerName webmail.example.com ServerAlias webmail.* DocumentRoot /var/www/roundcube <Directory /var/www/roundcube> Options -Indexes IncludesNOEXEC FollowSymLinks allow from all </Directory> </VirtualHost>
Firewall SetupIntroductionThis is a basic firewall it may not suit your needs, firewalling is an art so i recommend to read into it to improve on this basic one.
Basic ConfigAdd these rules in your configuration file /etc/sysconfig/iptables: *raw :PREROUTING ACCEPT [0:0] :OUTPUT ACCEPT [0:0] COMMIT *nat :PREROUTING ACCEPT [0:0] :POSTROUTING ACCEPT [0:0] :OUTPUT ACCEPT [0:0] COMMIT *mangle :PREROUTING ACCEPT [0:0] :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] :POSTROUTING ACCEPT [0:0] COMMIT *filter :FORWARD DROP [0:0] :INPUT DROP [0:0] :OUTPUT DROP [0:0] -A INPUT -i lo -j ACCEPT -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -m tcp --dport 21 -j ACCEPT -A INPUT -p tcp -m multiport -j ACCEPT --dports 80,443,25,110,143,53 -A INPUT -p udp -m udp --dport 53 -j ACCEPT -A INPUT -p icmp -m icmp -m limit --icmp-type 8 --limit 5/min -j ACCEPT -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A OUTPUT -s 127.0.0.1 -j ACCEPT -A OUTPUT -s 192.168.1.5 -j ACCEPT -A OUTPUT -s 192.168.1.6 -j ACCEPT COMMIT
Activate Configservice iptables restart Configure VirtualminIntroductionVirtualmin is a powerful and flexible hosting control panel that integrates with webmin. We will be using it to provide the virtual hosting functions such as creation of domains, accounts and maintaining configurations on the system.
Start ServicesYou need to start up services that are required to be able to configure virtualmin. Start the following services:
service named start
Initial SettingsMySQLWebmin needs to be able to communicate with mysql since we have set a password for mysql we need to set that up in webmin, go to servers ? mysql and enter this information:
Configure FeaturesYou need to enable the features and plugins that we want to use. On login this is the screen that you will see.
Configure Server TemplatesServer template are used to customize the services and to create packages for different hosting account types.
Apache TemplateYou can make changes to the way apache virtual hosts are created by editing this template, The defaults however will do for purposes of this howto.
Domain Owner TemplateThis template is used to configure various server limits such as number of mailboxes,aliases,databases,virtual servers and other options like bandwidth limits, admin abilities. For this howto we will use the default values.
Home Directory TemplateThis template allows you to set a skel directory to hold setting for new users for this howto we will use the defaults.
Administration UserThis template lets you set the quota for the virtual server and the admin user for this howto we will use the default quota 1GB.
Mail For Domain TemplateThis template sets various mail related options, we will modify the email message sent on server creation to have the content below: The following virtual server has been set up successfully :
Domain name: ${DOM}
Hosting server: ${HOSTNAME}
${IF-VIRT}
Virtual IP address: ${IP}
${ENDIF-VIRT}
Administration login: ${USER}
Administration password: ${PASS}
${IF-WEBMIN}
Administration URL: ${WEBMIN_PROTO}://www.${DOM}:${WEBMIN_PORT}/
${ENDIF-WEBMIN}
${IF-WEB}
Website: http://www.${DOM}/
${IF-WEBALIZER}
Webalizer log reporting: Enabled
${ELSE-WEBALIZER}
Webalizer log reporting: Disabled
${ENDIF-WEBALIZER}
${ENDIF-WEB}
${IF-MAIL}
Email domain: ${DOM}
SMTP server: mail.${DOM}
POP3 server: mail.${DOM}
Webmail: webmail.${DOM}
${ENDIF-MAIL}
${IF-DNS}
DNS domain: ${DOM}
Nameserver: ${HOSTNAME}
${ENDIF-DNS}
${IF-MYSQL}
MySQL database: ${DB}
MySQL login: ${MYSQL_USER}
MySQL password: ${PASS}
${ENDIF-MYSQL}
${IF-POSTGRES}
PostgreSQL database: ${DB}
PostgreSQL login: ${USER}
PostgreSQL password: ${PASS}
${ENDIF-POSTGRES}
We will leave the other options as the defaults.
BIND DNS Domain TemplateThis template is used to customize the zones that will be created by virtualmin. The changes to be made are adding a spf record, add the following records to auto generated text box (replace ns1.home.topdog-software.com. with your slave server): @ IN NS ns1.home.topdog-software.com. ;slave admin IN A 192.168.1.6 ;virtualmin webmail IN A 192.168.1.5 ;webmail In the directives text box add the following with the IP address of your slave server such that the slave is allowed to do zone transfers. allow-transfer { 192.168.1.2; };
MySQL Database TemplateContains options on creation of databases by virtualmin, for the howto we will use the defaults.
Webmin Login TemplateContains option on creation of new users by virtualmin, for the howto we will use the defaults.
Create Virtual ServerFinally we have a working virtual server system, lets create our first virtual server. Go to servers ? virtualmin virtual servers and click add new virtual server, owned by new user. Fill in the require fields and click create. Add a mail user to the domain. click on the domain name, then click edit mail and FTP users, then add user and fill in the information.
TestingPostfixTest SMTP
telnet 192.168.1.5 25
telnet 192.168.1.5 25
Test dkimSend a mail to autorespond+dkim@dk.elandsys.com.
Test domainkeysSend a mail to autorespond+dk@dk.elandsys.com.
DovecotTest POP3
telnet 192.168.1.5 110
Test IMAP
telnet 192.168.1.5 143
BINDdig example.com @127.0.0.1
Clamav-milterWe are using the test virus from www.eicar.org.
telnet 192.168.1.5 25 Take a lot at your /var/log/maillog you should see something like this: 73BC87C4E4: milter-reject: END-OF-MESSAGE from localhost[127.0.0.1]: 5.7.1 virus Eicar-Test-Signature detected by ClamAV - http://www.clamav.net; from=<address@yahoo.com> to=<andrew@example.com> proto=SMTP helo=<me>
Spamass-milterWe are using the test message from http://spamassassin.apache.org/gtube/.
telnet 192.168.1.5 25 You will see this in your log files: spamd: result: Y 1002 - AWL,GTUBE,MISSING_SUBJECT,TVD_SPACE_RATIO,UNPARSEABLE_RELAY scantime=0.5,size=723,user=root,uid=99,required_score=5.0, Original link: http://www.howtoforge.com/virtua... |




































