|
mailold.phas.ubc.ca 142.103.236. / 192.168.1. |

| ALERT: Need to reset battery timers (using SMclient software) around March of 2012 |
| IBM x3650 | DS3200 | EXP3000 | |
| Machine type | 7979 (x3650) | 1726-HC2 | 1727-HC1 |
| Serial number | KQDNBLL | 130239T | 130952R |
| Product ID | 7979LBU | ||
| System memory | 32GB | ||
| Processors | 2 x Quad core, Intel(R) Xeon(R) CPU - L5420 @ 2.50GHz |
| RAID STATUS - login and run /usr/RaidMan/RaidMan.sh | ||
|
/ (root) |
RAID 1 - local disk mirror |
1 global hot spare 5 x 73GB, 2.5" drives total |
|
/mailindexes |
RAID 1 - local disk mirror |
|
| DS3200 Configuration - login and run /opt/IBM_DS4000/client/SMclient Currently three drives in Raid 5 plus one hot spare. | |||||||||||||
| RAID 0
striped over 2 RAID 6 arrays |
|
Two (2) hardware RAID 6 arrays were created using the SMclient software then LVM was used to create a (RAID 0) drive by striping the two RAID 6 arrays. 20 drives plus 1 hot spare = 21 drives (DS3200 / EXP3000) |
|||||||||||
| Note:we now only create home directories on the mail server
for new accounts for "department members" - aka - those who will be
included on the everyone@phas email list. Here's a code snippet from addusr:
# Set up files on mail server (for "everyone" only)
This therefore WILL NOT include the following categories of users: Ugrad, Visitor, System, Misc If a Ugrad or Visitor needs/want to have an email account you just need to log onto the mail server and run the following command: /opt/sysadmin/passwd/make_mailhome <username>
Assuming that the username has already been propagated to the mail server /etc/passwd file. |
old disk: FRU 39R7366 SN: 3NP359QW new disk: FRU 39R7366 SN: BSF9P8C03RRTDisk came up OK and was added as a global hot spare.
[0][root@mail]$ cat access localhost.localdomain RELAY localhost RELAY 127.0.0.1 RELAY 142.103.236 RELAY From:number1expert.com REJECT From:tikinhand.com.com REJECT
[0][root@mail]$ yum remove perdition ---> Package perdition.x86_64 0:1.17.1-3 set to be erased ==================================================================================================== Package Arch Version Repository Size perdition x86_64 1.17.1-3 installed 256 k ==================================================================================================== Erasing : perdition 1/1 warning: /etc/perdition/popmap saved as /etc/perdition/popmap.rpmsave warning: /etc/perdition/perdition.conf saved as /etc/perdition/perdition.conf.rpmsave Removed: perdition.x86_64 0:1.17.1-3 [1][root@mail]$ yum remove vanessa_socket vanessa_socket-devel vanessa_socket-pipe ---> Package vanessa_socket.x86_64 0:0.0.7-1 set to be erased ---> Package vanessa_socket-devel.x86_64 0:0.0.7-1 set to be erased ---> Package vanessa_socket-pipe.x86_64 0:0.0.7-1 set to be erased ==================================================================================================== Package Arch Version Repository Size ==================================================================================================== vanessa_socket x86_64 0.0.7-1 installed 19 k vanessa_socket-devel x86_64 0.0.7-1 installed 103 k vanessa_socket-pipe x86_64 0.0.7-1 installed 31 k ==================================================================================================== Erasing : vanessa_socket-devel 1/3 Erasing : vanessa_socket 2/3 Erasing : vanessa_socket-pipe 3/3 Removed: vanessa_socket.x86_64 0:0.0.7-1 vanessa_socket-devel.x86_64 0:0.0.7-1 vanessa_socket-pipe.x86_64 0:0.0.7-1
Summary Node ID: PHAS_MailStore Event Error Code: 1706 Event occurred: Mar 17, 2012 4:51:19 PM Event Message: Optimal wide port becomes degraded Component type: Enclosure Component (ESM, GBIC/SFP, Power Supply, or Fan) Component location: Enclosure 85, Slot 1 Event Error Code: 1707 Event occurred: Mar 17, 2012 4:51:19 PM Event Message: Degraded wide port becomes failed Component type: Enclosure Component (ESM, GBIC/SFP, Power Supply, or Fan) Component location: Enclosure 85, Slot 1 Event Error Code: 1706 Event occurred: Mar 17, 2012 4:57:04 PM Event Message: Optimal wide port becomes degraded Component type: Enclosure Component (ESM, GBIC/SFP, Power Supply, or Fan) Component location: Enclosure 85, Slot 1 Event Error Code: 1707 Event occurred: Mar 17, 2012 4:57:04 PM Event Message: Degraded wide port becomes failed Component type: Enclosure Component (ESM, GBIC/SFP, Power Supply, or Fan) Component location: Enclosure 85, Slot 1 Event Error Code: 280d Event occurred: Mar 17, 2012 4:57:15 PM Event Message: Drive enclosure component failed or removed Component type: Enclosure Component (ESM, GBIC/SFP, Power Supply, or Fan) Component location: Enclosure 0, Slot 1 Event Error Code: 281d Event occurred: Mar 17, 2012 4:57:15 PM Event Message: Temperature sensor removed Component type: Temperature Sensor Component location: Enclosure 0, Slot 1
[root@mail]$ diff /etc/squirrelmail/config.php /etc/squirrelmail/config.php.090519
33c33
< $useSendmail = true;
---
> $useSendmail = false;
185,187c185
< $only_secure_cookies = true;
< $disable_security_tokens = false;
< $check_referrer = '';
---
> $only_secure_cookies = true;
189c187
< $config_location_base = '';
---
> $config_location_base = '';
200c198
< ?>
\ No newline at end of file
---
> ?>
/var/log/messages /var/log/secure /var/log/spooler /var/log/boot.log /var/log/cron {
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}
/var/log/maillog {
daily
compress
missingok
notifempty
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
rotate 62
olddir /var/log/maillogs
}
# apcupsd lines added by rdp, 11-09-07 # See if this is a powerfail situation. # ***apcupsd*** if [ -f /etc/apcupsd/powerfail ]; then # ***apcupsd*** echo # ***apcupsd*** echo "APCUPSD will now power off the UPS" # ***apcupsd*** echo # ***apcupsd*** /etc/apcupsd/apccontrol killpower # ***apcupsd*** echo # ***apcupsd*** echo "Please ensure that the UPS has powered off before rebooting" # ***apcupsd*** echo "Otherwise, the UPS may cut the power during the reboot!!!" # ***apcupsd*** echo # ***apcupsd*** fi
Node ID: PHAS_MailStore
Host IP Address: localhost6.localdomain6/0:0:0:0:0:0:0:1%1
Host ID: localhost6.localdomain6
Event Error Code: 226c
Event occurred: Nov 11, 2010 2:37:12 AM
Event Message: Drive failure
Component type: Drive
Component location: Enclosure 85, Slot 3
SUMMARY
Number of drives: 21
Current drive types: Serial Attached SCSI (SAS) (21)
BASIC:
TRAY, SLOT STATUS CAPACITY TYPE CURRENT DATA RATE PRODUCT ID FIRMWARE VERSION
85, 3 Optimal 136.732 GB SAS 3 Gbps ST3146855SS BA28
Installed new certificate in /etc/pki/certs
rpmbuild --rebuild --define "build_rhel5 1" --define "build_client_only 1" bacula-5.0.2-1.src.rpm
rpm -Uvh /usr/src/redhat/RPMS/x86_64/bacula-client-5.0.2-1.x86_64.rpm /usr/src/redhat/RPMS/x86_64/bacula-libs-5.0.2-1.x86_64.rpm
cp /etc/pki/tls/private/mail.phas.ubc.ca.key.new /etc/pki/tls/private/mail.phas.ubc.ca.keyNow edit /etc/httpd/conf.d/ssl.conf and change the following lines to be as shown:
cp /etc/pki/tls/certs/091126/mail.phas.ubc.ca.crt /etc/pki/tls/certs/mail.phas.ubc.ca.crt
cp /etc/pki/tls/certs/091126/gd_bundle.crt /etc/pki/tls/certs/gd_bundle.crt
SSLCertificateFile /etc/pki/tls/certs/mail.phas.ubc.ca.crtNow edit /etc/dovecot.conf and change the following lines to be as shown:
SSLCertificateKeyFile /etc/pki/tls/private/mail.phas.ubc.ca.key
SSLCertificateChainFile /etc/pki/tls/certs/gd_bundle.crt
ssl_cert_file = /etc/pki/tls/certs/mail.phas.ubc.ca.crtNow restart the affected services:
ssl_key_file = /etc/pki/tls/private/mail.phas.ubc.ca.key
service sendmail restart
service dovecot restart
service httpd restart
cp /opt/pki/tls/private/mail.phas.ubc.ca.key /opt/pki/tls/private/mail.phas.ubc.ca.key.holdNow generate the new private key and csr:
rm /opt/pki/tls/private/mail.phas.ubc.ca.key
genkey mail.phas.ubc.caThe new csr was put in /opt/pki/tls/certs/mail.phas.ubc.ca.3.csr
(Selected 2048 bits, to generate a CSR (other) and to not use a pass phrase to encrypt the private key.)
#--------------------------------------------------------------Then ran "make virtusertable.db"
# ampel.ubc.ca domain
#--------------------------------------------------------------
# bounce any addresses not listed in this table
@ampel.ubc.ca error:unavailable User unknown
# admin addresses...
#-------------------
access@ampel.ubc.ca ampelsec
ampelsec@ampel.ubc.ca ampelsec
ampel-sec@ampel.ubc.ca ampelsec
cleanroom@ampel.ubc.ca cleanroom
cleanroom-admin@ampel.ubc.ca cleanroom-admin
nanofab@ampel.ubc.ca nanofab
wget http://dl.atrpms.net/el5-x86_64/atrpms/stable/dovecot-sieve-1.1.6-9.el5.x86_64.rpm
wget http://dl.atrpms.net/el5-x86_64/atrpms/testing/dovecot-1.2.5-0_100.el5.x86_64.rpm
wget http://dl.atrpms.net/el5-x86_64/atrpms/testing/dovecot-devel-1.2.5-0_100.el5.x86_64.rpm
Sep 6 05:50:14 mail named[11117]: network unreachable resolving
'midnight.state.ky.us/A/IN': 2001:503:a124:ffff:ffff:ffff:ffff:ff7e#53
To fix this you have to start the bind damon with "-4" (IPv4 only). I did this by adding the
line "OPTIONS="-4"" to /etc/sysconfig/named and restarting named.
[1][root@mail]$ pwdOther changes to autoreponder files that I made previously:
/usr/share/squirrelmail/plugins/autorespond
[0][root@mail]$ diff lib.php lib.php.orig
592c592
< $check_label = ar_gettext("Keep a copy?");
---
> $check_label = ar_gettext("Keep a copy here?");
600c600
< <tr align=left valign=top bgcolor="#ffffcc">
---
> <tr align=left valign=top bgcolor="{$color[4]}">
607,613d606
< <tr bgcolor="{$color[12]}">
< <td colspan="3" align="center">
< <font color="#993300"><b>
< To disable the autorespond functionality, uncheck all three options
< (Forward, Reply, Keep a copy)</b></font>
< </td>
< </tr>
789c782
< // if ($keep) {
---
> if ($keep) {
810c803
< // }
---
> }
[0][root@mail]$ diff config.php config.php.oldmail
34c34
< $AUTORESPOND_OPTS['ftphost'] = 'localhost';
---
> $AUTORESPOND_OPTS['ftphost'] = '192.168.1.13';
125c125
< you will not keep copies of mail in your mailbox unless you also select
---
> you will not keep copies of mail in your mailbox unless you also select
176,178d175
< //$AUTORESPOND_OPTS['keep_desc'] = '';
<
< // "keep a copy when vacationing or forwarding" option:
180,184c177
< Enable this to keep a copy of any mail you receive.
< <!--If you've set up
< <a href="../spamrule/options.php">Spam filters</a>, select "filtered"
< to send your mail through those, otherwise select "unfiltered" to
< store mail without filtering.-->
---
> <b>Enable this to keep a copy of any mail you receive.</b>
[0][root@mail]$ diff setup.php setup.php.orig
47c47
< 'name' => _("Auto Response (Vacation Msg)"),
---
> 'name' => _("Auto Response: Reply or Forward"),
28-Jun 19:10 mail-fd JobId 2378: Fatal error: ACL support not configured for your machine.Based on experience on hyper (see webapage), I did the following...
rpmbuild --rebuild --define "build_rhel5 1" --define "build_x86_64 1" --define "build_mysql5 1" bacula-3.0.1-1.src.rpmThis worked without errors so then I installed it:
rpm --force -Uvh /usr/src/redhat/RPMS/x86_64/bacula-client-3.0.1-1.x86_64.rpm
cd /usr/local/src
mkdir perdition
cd perdition/
wget http://www.vergenet.net/linux/vanessa/download/vanessa_adt/0.0.7/vanessa_adt-0.0.7.tar.gz
wget http://www.vergenet.net/linux/vanessa/download/vanessa_logger/0.0.7/vanessa_logger-0.0.7.tar.gz
wget http://www.vergenet.net/linux/vanessa/download/vanessa_socket/0.0.7/vanessa_socket-0.0.7.tar.gz
tar zxf vanessa_adt-0.0.7.tar.gz
vi vanessa_adt-0.0.7/vanessa_adt.spec (Change Copyright to License on lines with GNU)
mv vanessa_adt-0.0.7.tar.gz vanessa_adt-0.0.7.tar.gz.orig
tar zcf vanessa_adt-0.0.7.tar.gz ./vanessa_adt-0.0.7
1028 rpmbuild -tb vanessa_adt-0.0.7.tar.gz
tar zxf vanessa_logger-0.0.7.tar.gz
vi vanessa_logger-0.0.7/*.spec (Change Copyright to License on lines with GNU)
mv vanessa_logger-0.0.7.tar.gz vanessa_logger-0.0.7.tar.gz.orig
tar zcf vanessa_logger-0.0.7.tar.gz ./vanessa_logger-0.0.7
tar zxf vanessa_socket-0.0.7.tar.gz
vi vanessa_socket-0.0.7/*.spec
mv vanessa_socket-0.0.7.tar.gz vanessa_socket-0.0.7.tar.gz.orig
tar zcf vanessa_socket-0.0.7.tar.gz ./vanessa_socket-0.0.7
rpmbuild -tb vanessa_logger-0.0.7.tar.gz
rpm -Uvh /usr/src/redhat/RPMS/i386/vanessa_logger-0.0.7-1.i386.rpm
rpm -Uvh /usr/src/redhat/RPMS/i386/vanessa_logger-devel-0.0.7-1.i386.rpm
rpmbuild -tb vanessa_socket-0.0.7.tar.gz
rpm -Uvh /usr/src/redhat/RPMS/i386/vanessa_socket-0.0.7-1.i386.rpm
rpmbuild -tb vanessa_adt-0.0.7.tar.gz
rpm -Uvh /usr/src/redhat/RPMS/i386/vanessa_adt-0.0.7-2.i386.rpm
rpm -Uvh /usr/src/redhat/RPMS/i386/vanessa_adt-devel-0.0.7-2.i386.rpm
rpm -Uvh /usr/src/redhat/RPMS/i386/vanessa_socket-devel-0.0.7-1.i386.rpm
(downloaded mysql-devel-5.0.45-7.el5.i386.rpm, postgresql-8.1.11-1.el5_1.1.i386.rpm,
postgresql-devel-8.1.11-1.el5_1.1.i386.rpm, unixODBC-devel-2.2.11-7.1.i386.rpm
and installed them).
[
wget http://www.vergenet.net/linux/perdition/download/1.17.1/perdition-1.17.1.tar.gz
tar zxf perdition-1.17.1.tar.gz
vi perdition-1.17.1/packaging/lsb/perdition.spec
mv perdition-1.17.1.tar.gz perdition-1.17.1.tar.gz.orig
tar zcf perdition-1.17.1.tar.gz ./perdition-1.17.1
rpmbuild -tb perdition-1.17.1.tar.gz
NOTE: got some errors wrt perditionlibdb_daemon so tried next steps instead
]
wget http://www.invoca.ch/pub/packages/perdition/perdition-1.17.1-3.src.rpm
rpmbuild --rebuild perdition-1.17.1-3.src.rpm
rpm -Uvh /usr/src/redhat/RPMS/i386/perdition-1.17.1-3.i386.rpm
cd /usr/local/src
mkdir dovecot-1.1.11
cd dovecot-1.1.11
cp ../dovecot-1.1.7/dovecot.init-nopid .
cp ../dovecot-1.1.7/dovecot.pam .
cp ../dovecot-1.1.7/dovecot.init .
cp ../dovecot-1.1.7/maildir-migration.txt .
cp ../dovecot-1.1.7/migrate-folders .
cp ../dovecot-1.1.7/migrate-users .
cp ../dovecot-1.1.7/perfect_maildir.pl .
cp ../dovecot-1.1.7/dovecot-REDHAT-FAQ.txt .
cp ../dovecot-1.1.7/dovecot.logrotate .
wget http://dovecot.org/releases/1.1/dovecot-1.1.11.tar.gz
tar zxf dovecot-1.1.11.tar.gz
rm dovecot-1.1.11.tar.gz
cd dovecot-1.1.11 (cwd = /usr/local/src/dovecot-1.1.11/dovecot-1.1.11)
cp /usr/local/src/dovecot-1.1.7/dovecot-1.1.7/dovecot-1.1.7.spec .
mv dovecot-1.1.7.spec dovecot-1.1.11.spec
edit spec file and change version to be correct
- also commented out two lines with patch1 in them
cd .. (cwd = /usr/local/src/dovecot-1.1.11)
tar zcf dovecot-1.1.11.tar.gz ./dovecot-1.1.11
create new rpm file:
rpmbuild -tb dovecot-1.1.11.tar.gz
install new rpm file:
rpm -Uvh /usr/src/redhat/RPMS/x86_64/dovecot-1.1.11-0_83.x86_64.rpm
- downloaded src from http://bestpractical.com/rt/
- tar zxf rt-3.8.1.tar.gz
- chown -R root:root rt-3.8.1
- perl -MCPAN -e shell
- make fixdeps
- yum install perl-Return-Value
- RT_FIX_DEPS_CMD='/usr/bin/perl -MCPAN -e"install %s"'
- export RT_FIX_DEPS_CMD
- make fixdeps
- perl -MCPAN -e "install Bundle::CPAN"
- /usr/bin/perl -MCPAN -e shell
o conf urllist http://cpan.yahoo.com/
- make fixdeps
- yum install graphviz
- make fixdeps
- ./configure --enable-graphviz --enable-gd --enable-gpg --with-web-user=apache --with-web-group=apache
- vi /etc/group
- cpan Sys::Syslog
- cp RT_Config.pm RT_SiteConfig.pm
- vi RT_SiteConfig.pm
- vi /etc/httpd/conf/httpd.conf
- service httpd restart
- ln -s /opt/rt3/bin/rt-mailgate /etc/smrsh/rt-mailgate
- newaliases
- make dropdb
- make initialize-database
[root@mail bacula-2.4.2]# ./configure --with-python --with-openssl --prefix=/opt/bacula --exec-prefix=/opt/bacula --sysconfdir=/opt/bacula/etc --with-scriptdir=/opt/bacula/scripts --with-dump-email=root@localhost --with-job-email=root@localhost --with-smtp-host=localhost --enable-client-only
[root@mail bacula-2.4.2]# make
[root@mail bacula-2.4.2]# make install
[root@mail bacula-2.4.2]# make install-autostart-fd
sendmail -d0.1 -bv rootNeeded to start saslauthd:
[0][root@mailX]$ chkconfig saslauthd on
[0][root@mailX]$ service saslauthd start
ssl_cert_file = /etc/pki/tls/certs/mail.phas.ubc.ca.crtmodified /etc/security/limits.conf Added the following lines:
ssl_key_file = /etc/pki/tls/private/mail.phas.ubc.ca.key
ssl_ca_file = /etc/pki/tls/certs/gd_bundle.crt
# 08-12-01 rdp add next lines to prevent dovecot warning:
# Dovecot Imap: Warning: fd limit 1024 is lower than what Dovecot can use
# These lines allow for processes to run with 4096 file descriptors by
# default and the user process can increase it to 8192 via ulimit.
* hard locks 8192
* hard nofile 8192
* soft locks 4096
* soft nofile 4096
cd /usr/local/src
mkdir dovecot-1.1.9
cd dovecot-1.1.9
cp ../dovecot-1.1.7/dovecot-1.1-default-settings.patch .
cp ../dovecot-1.1.7/dovecot.init-nopid .
cp ../dovecot-1.1.7/dovecot.pam .
cp ../dovecot-1.1.7/dovecot.init .
cp ../dovecot-1.1.7/maildir-migration.txt .
cp ../dovecot-1.1.7/migrate-folders .
cp ../dovecot-1.1.7/migrate-users .
cp ../dovecot-1.1.7/perfect_maildir.pl .
cp ../dovecot-1.1.7/dovecot-REDHAT-FAQ.txt .
cp ../dovecot-1.1.7/dovecot.logrotate .
wget http://www.dovecot.org/releases/1.1/dovecot-1.1.9.tar.gz
tar zxf dovecot-1.1.9.tar.gz
rm dovecot-1.1.9.tar.gz
cd dovecot-1.1.9 (cwd = /usr/local/src/dovecot-1.1.9/dovecot-1.1.9)
cp /usr/local/src/dovecot-1.1.7/dovecot-1.1.7/dovecot-1.1.7.spec .
mv dovecot-1.1.7.spec dovecot-1.1.9.spec
edit spec file and change version to be correct
cd .. (cwd = /usr/local/src/dovecot-1.1.9)
tar zcf dovecot-1.1.9.tar.gz ./dovecot-1.1.9
create new rpm file:
rpmbuild -tb dovecot-1.1.9.tar.gz
install new rpm file:
rpm -Uvh /usr/src/redhat/RPMS/x86_64/dovecot-1.1.9-0_83.x86_64.rpm
yum remove dovecot (to remove v1.0.7, RHEL5 default)
downloaded source files and uncompressed/untarred, had no spec file with it.
downloaded spec file from http://atrpms.net/dist/el5/dovecot/ and put into source dir
downloaded rpm source file from redhat (for V1.0.7) to get spec file
compared the spec files and modified the atrpm spec file a little to more closely match config options in RHEL spec file
created new tgz file (now has spec file in it):
tar zcf dovecot-1.1.7.tar.gz ./dovecot-1.1.7
created new rpm file:
rpmbuild -tb dovecot-1.1.7.tar.gz
installed new rpm file:
rpm -ivh /usr/src/redhat/RPMS/x86_64/dovecot-1.1.7-0_83.x86_64.rpm
[0][root@mailX]$ rpm -Uv http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-3.noarch.rpmInstalled ProjectPier and dotproject.
[0][root@mailX]$ yum install phpMyAdmin
Installed: phpMyAdmin.noarch 0:2.11.9.3-1.el5
- installed crypto-utils package
- ran genkey program to generate private/public key pair and to generate CSR
- selected 1024 bits and to generate CSR for "other"
- CSR was put in file: /etc/pki/tls/certs/mail.phas.ubc.ca.0.csr - did not set a passphrase on the private key You now need to submit your CSR and documentation to your certificate authority. Submitting your CSR may involve pasting it into an online web form, or mailing it to a specific address. In either case, you should include the BEGIN and END lines. -----BEGIN CERTIFICATE REQUEST----- MIIB7DCCAVUCAQAwgasxCzAJBgNVBAYTAkNBMRkwFwYDVQQIExBCcml0aXNoIENv bHVtYmlhMRIwEAYDVQQHEwlWYW5jb3V2ZXIxJzAlBgNVBAoTHlVuaXZlcnNpdHkg b2YgQnJpdGlzaCBDb2x1bWJpYTEpMCcGA1UECxMgUGh5c2ljcyBhbmQgQXN0cm9u b215IERlcGFydG1lbnQxGTAXBgNVBAMTEG1haWwucGhhcy51YmMuY2EwgZ8wDQYJ KoZIhvcNAQEBBQADgY0AMIGJAoGBAMZqsKZM4RIWKqi2vbXK0bP5f3syQNXzy17Q BH/fjjraPTa1vN3qCHwb1zdduLEd6ybIWIWN0Dia98BQ6Y9MeBvAM1Y1QGIWdTpc KL+Yxv4vL1DH/AE+YOzlqk/J1hNa+RF/qtaa70Bzhhgl267jg2TEUzl0kmsJh+u4 PHAFx0HfAgMBAAGgADANBgkqhkiG9w0BAQUFAAOBgQAyUTjzC+n7jsWsfNbBtZ8R xhrYAD5dA4VIWPnqS0oQpULDql98oKZZH0yqayn6aSKcMJ/++coxIuXZQB0plkLn XHn47rewEoz3NJsVe6KqmhVs+ieanFvZzLPkH2+er1kxH7GiNAwFCEQRjyb02nMR CuejoaO2z9ukJN5F6gumbg== -----END CERTIFICATE REQUEST-----
[root@mail bacula-2.4.2]# ./configure --with-python --with-openssl --with-x --prefix=/opt/bacula --exec-prefix=/opt/bacula --sysconfdir=/opt/bacula/etc --with-scriptdir=/opt/bacula/scripts --with-dump-email=root@localhost --with-job-email=root@localhost --with-smtp-host=localhost --enable-client-only
[root@mail bacula-2.4.2]# make install
[root@mail bacula-2.4.2]# make install-autostart-fd
- Edited /etc/xinetd.d/imap[s] and changed the cps line from 500 5 to 5000 2. This controls the number of connections per second and the wait-to-restart time. I also added the line flags = NOLIBWRAP. According to documents on the squirrelmail website, this could increase connection performance by up to 10%.
05-02-01[root@mail vsftpd]# iostat -d -k -x /dev/sda6 15
[root@mail root]# vmstat 15
Create
an RSA private key without a passphrase for the mail server:
edited /usr/share/ssl/openssl.conf and set defaults (including
expiry of 3650 days).
cd /etc/httpd/conf
/usr/bin/openssl genrsa 1024 > /etc/httpd/conf/ssl.key/server.key
chmod go-rwx /etc/httpd/conf/ssl.key/server.key
Generate
a CSR (certificate signing request) using the server RSA private key
(didn't actually do this since I am doing a self-signed certificate:
umask 77
/usr/bin/openssl req -new -key /etc/httpd/conf/ssl.key/server.key -out
/etc/httpd/conf/ssl.csr/server.csr
Create a
self-signed (CA) certificate (x509 structure) using the RSA key of our
CA:
umask 77
/usr/bin/openssl req -new -key /etc/httpd/conf/ssl.key/server.key -x509
-days 3650 -out
/etc/httpd/conf/ssl.crt/server.crt
Make the
imapd.pem file so we can connect to the imap server securely:
cd /usr/share/ssl/certs
make imapd.pem
Testing SendmailUsing telnet
|
To make sure your sendmail binary is compiled with Milter support just run :You can display class w entries with the following command: echo '$=w' | sendmail -bt -d0.4By default, class w contains localhost, the IP address 127.0.0.1, and the system's IP address(es), fully qualified domain names, and short hostnames. Entries placed in /etc/mail/local-host-names or /etc/mail/sendmail.cw are added to these default values. |
Testing SMTP AUTH connectionshttp://qmail.jms1.net/test-auth.shtml When setting up a mail server, one of the things you should do before you "go live" is to test it- not only to make sure things which should work, do work, but to make sure things which shouldn't work, don't. One of the things to test is whether or not your server correctly supports the AUTH command. This command is used when a remote client wishes to identify themself as an "authenticated" user, normally so that they can use your server as an outbound mail relay. This is very handy for companies with employees who travel, or for ISPs with clients who travel. Find your authentication informationIn order to use the AUTH command, you need to know the base64-encoded version of the userid and password you will be using to authenticate to the server. Normally this would be the same as the userid and password you would use to check your mail using IMAP or POP3. This perl command (which requires the MIME::Base64 module) will do the encoding for you:
% perl -MMIME::Base64 -e 'print
encode_base64("\000jms1\@jms1.net\000not.my.real.password")'
Note: Make sure to use
\0 both as the first character of what you're
encoding, and as the separator between the userid and the password.
There was an error with the original version of these directions- I had
forgotten about needing a \0 at the beginning.
Sorry
all!
Another reader pointed out that perl silently interprets the "@" sign in the middle of a string and replaces it with the contents of an array with that name, if one exists... or with nothing, if not. I just did a full two-way test with my real password, and it turns out if you don't put a backslash in front of the "@" sign it won't work. Good call. And JT Justman pointed out that if you use \0
as the
separator, and the userid or password happens to start with a digit,
perl will try to find and use a three-digit octal character code
instead
of a one-digit null byte with two normal digits behind it. Using
\000 instead of just \0
prevents
this from happening.
Connecting to the serverDepending on how the server is configured, you may need to use SSL or TLS before you are able to use the AUTH command. In fact, if you are able to use the AUTH command without using either SSL or TLS, you are in fact sending your userid and password over the internet in clear text. Anybody with a packet sniffer in the right spot will be able to read the base64-encoded string you send to authenticate, and it's really easy to decode that stuff- in fact the same command above will work if you change "encode_base64" to "decode_base64" (and put the encoded string between the double quotes, obviously.)
Make sure the server supports AUTHWhen you first connect to an SSL or TLS server, you will see the key-exchange information fly by on the screen, and the last line you see when it stops scrolling text will be the server's "banner" message, which tells the client that the server is ready to accept commands. For a non-secured connection, the first thing you see will be the banner. When the banner is received, a normal SMTP client would send an EHLO command to the server in order to identify the client machine, as well as ask for a list of the capabilities supported by the server. If you are using an openssl command to connect to an SSL or TLS server, make sure to enter your SMTP commands in lowercase as shown here. The openssl "s_client" command watches what you type- if you send a line of text starting with a capital "R", it will re-key the SSL layer instead of sending your command to the server... and if you send a line of text which starts with a capital "Q", it will terminate the SSL connection and exit.
220 a.mx.jms1.net NO UCE ESMTP Look at the response from your EHLO command, make sure AUTH is on the list, and that PLAIN is one of the options it supports. If it's not listed, the server will not let you send an AUTH command. This may be because the connection is not secured and the server is protecting you from sending your authentication information across the net in plain text... Sending the AUTH commandAssuming the server supports AUTH, we will send the actual AUTH command to try and authenticate.
AUTH PLAIN AGptczFAam1zMS5uZXQAbm90Lm15LnJlYWwucGFzc3dvcmQ= If you see this message, you are authenticated. If you see this one instead...
AUTH PLAIN AGptczFAam1zMS5uZXQAbm90Lm15LnJlYWwucGFzc3dvcmQ= ... then obviously it means you are not authenticated. If you were not able to authenticate, you can try another AUTH PLAIN command- although if the server is logging the traffic or running an intrusion detection system, having multiple AUTH commands in a single SMTP session is enough to raise a red flag. Be careful not to ban your test client's IP address. Sending the messageOnce you are authenticated, you may continue with a normal SMTP conversation and the server should accept any message from you, whether you are relaying to an outside domain or not. Even if you don't authenticate, the server will still accept messages from you- it just won't relay (it will act the same as if you had never entered an AUTH command at all.)
mail from: <nospam@jms1.net> |
| Testing IMAPD |
IMAPD Testing
[root@mail root]# telnet localhost 143 Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. * OK [CAPABILITY IMAP4REV1 LOGIN-REFERRALS STARTTLS AUTH=LOGIN] localhost.localdomain IMAP4rev1 2003.338rh at Thu, 27 Sep 2007 14:34:47 -0700 (PDT) A01 CAPABILITY * CAPABILITY IMAP4REV1 IDLE NAMESPACE MAILBOX-REFERRALS BINARY UNSELECT SCAN SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND LOGIN-REFERRALS STARTTLS AUTH=LOGIN A01 OK CAPABILITY completed A02 LOGOUT * BYE mail.phas.ubc.ca IMAP4rev1 server terminating connection A02 OK LOGOUT completed Connection closed by foreign host. |
| Testing pop |
[root@mail ~]# telnet localhost pop3 +OK dovecot ready. user johndoe +OK pass password +OK Logged in. list +OK 1 messages: 1 622 . retr 1 +OK 622 octets Return-Path: |
| Testing TLS - 17-06-09, rdp |
rap@ada:~$ openssl s_client -starttls smtp -crlf -connect smtp.phas.ubc.ca:587
CONNECTED(00000003)
depth=3 C = US, O = "The Go Daddy Group, Inc.", OU = Go Daddy Class 2 Certification Authority
verify return:1
depth=2 C = US, ST = Arizona, L = Scottsdale, O = "GoDaddy.com, Inc.", CN = Go Daddy Root Certificate Authority - G2
verify return:1
depth=1 C = US, ST = Arizona, L = Scottsdale, O = "GoDaddy.com, Inc.", OU = http://certs.godaddy.com/repository/, CN = Go Daddy Secure Certificate Authority - G2
verify return:1
depth=0 OU = Domain Control Validated, CN = *.phas.ubc.ca
verify return:1
---
Certificate chain
0 s:/OU=Domain Control Validated/CN=*.phas.ubc.ca
i:/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certs.godaddy.com/repository//CN=Go Daddy Secure Certificate Authority - G2
1 s:/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certs.godaddy.com/repository//CN=Go Daddy Secure Certificate Authority - G2
i:/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./CN=Go Daddy Root Certificate Authority - G2
2 s:/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./CN=Go Daddy Root Certificate Authority - G2
i:/C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority
3 s:/C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority
i:/C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIFIzCCBAugAwIBAgIHKzArIl0lbDANBgkqhkiG9w0BAQsFADCBtDELMAkGA1UE
BhMCVVMxEDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAY
BgNVBAoTEUdvRGFkZHkuY29tLCBJbmMuMS0wKwYDVQQLEyRodHRwOi8vY2VydHMu
Z29kYWRkeS5jb20vcmVwb3NpdG9yeS8xMzAxBgNVBAMTKkdvIERhZGR5IFNlY3Vy
ZSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjAeFw0xNDA0MTQyMjQwMDVaFw0x
ODA4MTIxNzMxMTdaMDsxITAfBgNVBAsTGERvbWFpbiBDb250cm9sIFZhbGlkYXRl
ZDEWMBQGA1UEAwwNKi5waGFzLnViYy5jYTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAK+T9PRn9qAtaKB1DjS7uw6xzUIhJX5YD6zsEog9M2PB7s6t7TqW
LqT2l/aJAIZKLZnalmJMoR2b0u8Cl8hjAhMaWW1dLeQsLp4N8LQat6xPUTICS8I1
3IYrAj8cqW2vTfZC8HORa4mMnh/yqD9AiXJc9Zu7/XCYE4yYaqhhpLXHUDM8HeDI
ek4I2SslSkoYW1P396PUSZPZ7veHMhVZpaZpCJ60P4Ci04Rg0U1FqpxCb3/RPRXC
uChcOYRolYOnbOj6fZ/kkDQMR0T5g1Vp0m+PEyLpOOfXWC/ZP45sUUDAKO7crTkm
HrMjrKRqbwX+u3MRSCmCj1uUxWqPOy7VYBMCAwEAAaOCAbAwggGsMA8GA1UdEwEB
/wQFMAMBAQAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMA4GA1UdDwEB
/wQEAwIFoDA2BgNVHR8ELzAtMCugKaAnhiVodHRwOi8vY3JsLmdvZGFkZHkuY29t
L2dkaWcyczEtNDIuY3JsMFMGA1UdIARMMEowSAYLYIZIAYb9bQEHFwEwOTA3Bggr
BgEFBQcCARYraHR0cDovL2NlcnRpZmljYXRlcy5nb2RhZGR5LmNvbS9yZXBvc2l0
b3J5LzB2BggrBgEFBQcBAQRqMGgwJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLmdv
ZGFkZHkuY29tLzBABggrBgEFBQcwAoY0aHR0cDovL2NlcnRpZmljYXRlcy5nb2Rh
ZGR5LmNvbS9yZXBvc2l0b3J5L2dkaWcyLmNydDAfBgNVHSMEGDAWgBRAwr0njsw0
gzCiM9f7bLPwtCyAzjAlBgNVHREEHjAcgg0qLnBoYXMudWJjLmNhggtwaGFzLnVi
Yy5jYTAdBgNVHQ4EFgQU70cF9ruMsWsmTEQ1l5RwbBvmV30wDQYJKoZIhvcNAQEL
BQADggEBAFgz5naeLjhoYGQja+v3u+HX/CEEiB8lTFQMDA26ghcofO++7+zENss5
Tbbs2Cph99xaMh//EIAZRxN/GKZn9CUIdzCvvp82PwxuSW34EvXXoUJRU76tHv3X
0PSd1McFiPq26eO/iMbk+ROaKwviHpTLKDHQLP4bby8E1I094bJskro6iYmc7a16
Z5Vo7mo3fIaxaZnKpuNnSY6uyWC1vOUjpIY85wBcCCYZlJGLVtja1lS6N0CjXAD6
5X5n6EBZGHRSN19TruJC/+q65d6a5FRfUq/aY/p3Alxq21j68o0jLqpDozIKh8pI
yOddBN1aZKrUKZjoZlL3Rs/GhHsufeo=
-----END CERTIFICATE-----
subject=/OU=Domain Control Validated/CN=*.phas.ubc.ca
issuer=/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certs.godaddy.com/repository//CN=Go Daddy Secure Certificate Authority - G2
---
Acceptable client certificate CA names
/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certs.godaddy.com/repository//CN=Go Daddy Secure Certificate Authority - G2
/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./CN=Go Daddy Root Certificate Authority - G2
/C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority
Client Certificate Types: RSA fixed DH, DSS fixed DH, RSA sign, DSA sign, ECDSA sign
Requested Signature Algorithms: RSA+SHA512:DSA+SHA512:ECDSA+SHA512:RSA+SHA384:DSA+SHA384:ECDSA+SHA384:RSA+SHA256:DSA+SHA256:ECDSA+SHA256:RSA+SHA224:DSA+SHA224:ECDSA+SHA224:RSA+SHA1:DSA+SHA1:ECDSA+SHA1
Shared Requested Signature Algorithms: RSA+SHA512:DSA+SHA512:ECDSA+SHA512:RSA+SHA384:DSA+SHA384:ECDSA+SHA384:RSA+SHA256:DSA+SHA256:ECDSA+SHA256:RSA+SHA224:DSA+SHA224:ECDSA+SHA224:RSA+SHA1:DSA+SHA1:ECDSA+SHA1
Peer signing digest: SHA512
Server Temp Key: DH, 2048 bits
---
SSL handshake has read 6652 bytes and written 566 bytes
---
New, TLSv1/SSLv3, Cipher is DHE-RSA-AES256-GCM-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : DHE-RSA-AES256-GCM-SHA384
Session-ID: 9718FC75BD24A59CA9AB5F1EA7CC2582FA6E2A489AB06E8C36E81064DA2906AF
Session-ID-ctx:
Master-Key: E7FF56EA1089736F70A6C87DDF16314AA3E531CA52DE71BE57F7CBD3841ADDCD32D79163067C568DED2111CED9A971AB
Key-Arg : None
Krb5 Principal: None
PSK identity: None
PSK identity hint: None
TLS session ticket lifetime hint: 1 (seconds)
TLS session ticket:
0000 - 29 05 8b 3c fd cc 73 a9-98 a0 9d f2 9f ad 94 5b )..<..s........[
0010 - ab 6f f8 70 9b 16 44 e5-50 53 d2 64 fe 28 37 6f .o.p..D.PS.d.(7o
0020 - 87 88 bc 28 de b7 ca c0-ad b4 a5 c8 19 c1 3a 91 ...(..........:.
0030 - 17 61 8f dc ad 17 6f 73-e3 1e 48 0a 4f 94 ea 07 .a....os..H.O...
0040 - 7c 35 10 c7 91 5e 45 42-df 67 2e 72 a2 03 17 99 |5...^EB.g.r....
0050 - 0d 42 57 f6 f3 fd 2e 16-e0 9a a7 8e 1c bf 6a 1b .BW...........j.
0060 - b8 8d 39 b7 25 e1 01 96-b8 4a a5 7d cf 32 ad 99 ..9.%....J.}.2..
0070 - 25 33 a2 a7 e5 e4 df 34-30 96 ed 02 57 c9 d8 9d %3.....40...W...
0080 - 46 58 78 d1 e4 ad ad a8-46 dd 27 04 5f 12 05 51 FXx.....F.._..Q
0090 - eb 72 3c ac f9 d2 be 4c-9a 7c 24 7b 89 73 be 91 .r<....L.|${.s..
Start Time: 1497046301
Timeout : 300 (sec)
Verify return code: 0 (ok)
---
250 HELP
ehlo localhost
250-mail.phas.ubc.ca Hello ada.phas.ubc.ca [142.103.235.80], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-AUTH DIGEST-MD5 CRAM-MD5 LOGIN PLAIN
250-DELIVERBY
250 HELP
QUIT
DONE
|
| Testing POP3 TLS/SSL |
|
This is a followup to Juliet Kemp's excellent
Troubleshooting Linux Servers with telnet article.
This is adapted from the aging but still-excellent
Linux Cookbook. Telnet does not support any encryption. If you are protecting your POP3 sessions with TLS/SSL then you need s_client, which is part of OpenSSL. You can query both local and remote mail servers, using your own server names of course. Commands that you type are in bold:
$ openssl s_client -connect localhost.com:995 You'll see a whole lot of lines about certificates and protocols, and eventually something like this:
---
Now we know we're talking to a Dovecot server. Dovecot supports both secure POP3 and secure IMAP. Now I can give Dovecot my login. Note that if you enter an invalid username it won't tell you, but will still say +OK:
Let's see if I have any messages: list
Yay, two messages for me! Use the retr command to read them:
retr 1
Hello Little Carla,
We're having a little get-together this weekend and hope you can come.
Bring your fabulous chicken skewers.
Love,
To read the second message type retr 2. To delete messages type dele followed by the message number, for example dele 1. Messages are not really deleted until you type quit, so you can change your mind and un-delete with the rset command, which un-deletes all messages marked for deletion.
You may need to use the domain name on a remote server to log in, for example
user carla@example.com. RFC 1939 contains a complete listing of POP3 commands.
|
| Testing IMAP TLS/SSL |
| This is how to talk to an IMAP server over TLS/SSL. Again, commands that you type are in bold, and remember to use your own server name and login:
$ openssl s_client -connect localhost.com:993 login carla password
Hurrah, we're in! Now let's list mailboxes: a002 list "" "*"
And let's see what's in the Inbox:
a003 examine inbox
There are ten messages; let's read the body of the fourth one without the headers: a004 4 rfc822.text
I hear there is going to be food this weekend-- may I come?
Thanks!
a005 OK Fetch completed.
I'm bored with reading email this way, so it's time to go:
a005 logout
There are many different commands for listing messages, and reading headers and selected headers. Read all about them in RFC 3501.
|
| HBA |
ID |
LUN |
Vendor |
Product |
| 0 |
7 |
0 |
LSI |
LSI 1030 [ 402] 1000E00 |
| 0 |
8 |
0 |
IBM |
32P0032a S320 1 1 |
| 1 |
7 |
0 |
LSI |
LSI 1030 [ 402] 1000E00 |
DISASTER RECOVERY
|
[root@mail root]# df -h |
Installation Notes
|
[root@mail root]# df -h |
For more assistance contact
Ron Parachoniak, rap@phas.ubc.ca ( Sysadmin )
| webmaster@phas.ubc.ca | [Dept. Home Page] | last
updated: June 28, 2005 |