11:13 PM

Towards higher availability

In this post I’ll demonstrate how easy it is to setup open virtualization system with hypervisor and management. oVirt is based on Red Hat’s Red Hat Enterprise Virtualization manager (RHEV-M) and Red Hat Enterprise Virtualization hypervisor (RHEV-H).


Some oVirt Information

oVirt is a virtualization management framework constisting of a small host image, the oVirt Node, that provides the libvirt service to host virtual machines, and a robust vm management software stack, controlled by a web-based management interface, the oVirt Server.

So lets start with installing some prerequisite packages:

[root@ovirt-manager ~]# yum install -y wget postgresql-server postgresql-contrib pgadmin3 java-1.6.0-openjdk-devel

Next we’ll add new repository for ovirt:

[root@ovirt-manager ~]# wget http://www.ovirt.org/releases/nightly/fedora/16/ovirt-engine.repo -P /etc/yum.repos.d/

Final step is to install actual ovirt-manager packages:

[root@ovirt-manager ~]# yum install -y ovirt-engine ovirt-engine-setup

Now we have all needed packages installed and we can configure manager.

[root@ovirt-manager ~]# engine-setup Welcome to oVirt Engine setup utility HTTP Port  [8080] : HTTPS Port  [8443] : Host fully qualified domain name, note that this name should be fully resolvable  [ovirt-manager.demo.local] : ovirt-manager.demo.local did not resolve into an IP address User input failed validation, do you still wish to use it? (yes|no): yes Password for Administrator (admin@internal) : Warning: Weak Password. Confirm password : Database password (required for secure authentication with the locally created database) : Warning: Weak Password. Confirm password : Organization Name for the Certificate: Demolab The default storage type you will be using  ['NFS'| 'FC'| 'ISCSI']  [NFS] : Should the installer configure NFS share on this server to be used as an ISO Domain? ['yes'| 'no']  [yes] : yes Mount point path: /install Display name for the ISO Domain: install Firewall ports need to be opened. You can let the installer configure iptables automatically overriding the current configuration. The old configuration will be backed up. Alternately you can configure the firewall later using an example iptables file found under /usr/share/ovirt-engine/conf/iptables.example Configure iptables ? ['yes'| 'no']: yes  oVirt Engine will be installed using the following configuration: ================================================================= http-port:                     8080 https-port:                    8443 host-fqdn:                     ovirt-manager.demo.local auth-pass:                     ******** db-pass:                       ******** org-name:                      Demolab default-dc-type:               NFS nfs-mp:                        /install iso-domain-name:               install override-iptables:             yes Proceed with the configuration listed above? (yes|no): yes

After this setup might take while, but in few minutes you should get output like below:

Installing: Configuring oVirt-engine...                              [ DONE ] Creating CA...                                           [ DONE ] Setting Database Security...                             [ DONE ] Creating Database...                                     [ DONE ] Updating the Default Data Center Storage Type...         [ DONE ] Editing JBoss Configuration...                           [ DONE ] Editing oVirt Engine Configuration...                    [ DONE ] Configuring the Default ISO Domain...                    [ DONE ] Configuring Firewall (iptables)...                       [ DONE ] Starting JBoss Service...                                [ DONE ]   **** Installation completed successfully ******       (Please allow oVirt Engine a few moments to start up.....)  Additional information:  * There is less than 4 GB available free memory on the Host. It is  recommended to have at least 4 GB available memory to run the RHEV Manager.  * Keystore already exists, skipped certificates creation phase  * A default ISO share has been created on this host.    If IP based access restrictions are required, please edit /install entry in /etc/exports  * The firewall has been updated, the old iptables configuration file was saved to /usr/share/ovirt-engine/conf/iptables.backup.074609-01032012_1691  * The installation log file is available at: /var/log/engine/engine-setup_2012_01_03_07_44_46.log  * Please use the user "admin" and password specified in order to login into oVirt Engine  * To configure additional users, first configure authentication domains using the 'engine-manage-domains' utility  * To access oVirt Engine please go to the following URL: http://ovirt-manager.demo.local:8080

If you get database creation error, please check the database installation log. If there’s lines saying “Peer authentication failed for user “postgres”" please change authentication method in pg_hba.conf to trust and restart your postgresql-service and run installer again.

Next step is install ovirt-node (Hypervisor). It’s really simple and straightforward. Just get latest iso from http://www.ovirt.org/releases/nightly/binary/ and boot your hypervisor machine with it, install to local disk and do basic configurations: This shouldn’t take long, there is only few things to do. Select disk where you are installing, type root password and go.

Next thing to do is install more hypervisors and connect them to ovirt-engine. I’ll write another post about this with basic configuration examples. Try oVirt today, it’s really competitive alternative for VMware / Citrix and it’s totally open source :-)



Reference :

http://www.linux-kvm.org/page/Management_Tools

http://www.ovirt.org/

http://blog.jaurola.fi/

6:14 PM

Beza Antara Fungsi UV Filter, CPL Filter dan ND8 Filter

Banyak jenis sebenarnya filter lens yang ada untuk lens kita.Kalau nak diringkaskan bolehlah kita bagi pada3 jenis filter ni; uv,cpl dan nd8.Filter ni bukan setakat menapis cahaya yang direct datang pada lens,tapi ia juga boleh membantu untuk bagi hasil art pada gambar.Terutamanya kalau nak dapat gambar pemandangan yang cantik.

UV Filter

Ni Filter yang biasanya dapat bila kita beli lens.UV Filter ni simple saja fungsinya.Tapis sinar UV dan protection pada lens.Kalau kita beli lens tu,jangan kedekut nak beli uv filter terus(kalau tak dapat free).Nak elak calar pada lens yang baru beli tu.Harga murah mahal pun tak apa.Ada dua jenis,slim dan biasa.Bezanya nipis tebal saja.

RM25

CPL Filter

Polarizing filter biasanya orang guna untuk bagi gambar efek gelap pada langit.warna langit biru tu timbul terang. Ada juga kalau untuk tangkap gambar produk macam jam tangan biasanya.Bila ambik gambar jam,kurang lah efek pantulan cahaya dari cermin jam tu.jadi boleh nampak detail jarum dalam jam tanpa ada pantulan.

cpl biasanya lebih gelap warnanya dari uv filter

Awan pada langit lagi menyerlah

credit gambar: http://braendan.blogspot.com/2009/01/bw-kasemann-ksm-cpl-filter.html

ND8 Filter

Neutral Density filter (ND filter) adalah jenis filter yang digunakan untuk tangkap gambar air terjun,salji. Ia sebenarnya nak kurangkan amount cahaya yang sampai pada sensor camera.Jadi boleh tambah efek halus pada foto disamping baiki tone.

ND8 berwarna hitam. RM65

Credit gambar:http://www.foxsaver.com/public/picture/66481617

Yangni gabung cpl dan nd8 filter.

Itu lah sikit info pasal jenis filter dan fungsinya.Review jenis biasa-biasa sahaja.Hope dapat bantu korang dapat brief idea sebelum membeli filter.

6:13 PM

Tips Shooting Outdoor Photography

Tangkap gambar outdoor ni cantik sebenarnya.Gambar pemandangan mahupun gambar potrait, part warna dia yang best tu.Naik semacam.Tapi part yang susah sikit bila kena bayang-bayang terutamanya time matahari terik.Nanti gambar jadi macam ni

Perasan tak ada bayang-bayang daun,ranting dan pokok pada muka subject.Isy2.Tak cantik macam ni.

Solution Pertama:

Cara yang senang sikit,orang pakai reflector lah.

Yang mana terlindung dengan bayang-bayang pada model tu, boleh lah kita cover dengan reflector.Dia pantul balik cahaya kena dekat model.Nampak natural sikit. Nak tengok beza pakai reflector tak?

Gambar kat atas tu saya ambil dari istock.Cute sungguh!

Orang sekarang suka buat outdoor wedding shoot kan. Memang nak lah pada benda ni.Senang kerja. Reflector ada 5 warna yang ada fungsi-fungsi dia sendiri.Kita explore lah nanti baru nampak bezanya.Kalau nak cari reflector, cari yang boleh lipat dan biarlah ada beg dia sekali.Sebab benda ni kan kalau dah buka,mak aiihh.Pernahlah hari tu customer datang beli reflector ni dengan saya.Kitorang cuba-cuba buka nak test,fuh besar sungguh.

Solution Kedua:

Kalau model/subject menghadap matahari boleh tambah cahaya kan.Tapi nanti dia silau pulak.Terkebil-kebil jadi dia. Kat sini kita kena main dengan kedudukan angle. Try cuba bagi matahari tu 135 degree dari model kita.Sipi-sipi belakang.

Lukisan tak cantik tu biasalah kan.Haha!!

Itu sudut kalau tangkap gambar potret orang.Kalau tangkap gambar pemandangan seperti persekitaran rumah misalnya, disarankan biarlah matahari tu berada belakang kita pulak. Boleh naik contrast warna sekitar rumah tu seperti warna rumput dengan awan.Itulah penangan matahari.

Itu sahaja kali ini.Korang mesti ada buat outdoor jugak kan.Share lah cara korang pulak di bahagian komen ok!

6:36 PM

Installing Apache2 With PHP5 And MySQL Support On Fedora 16 (LAMP)

LAMP is short for Linux, Apache, MySQL, PHP. This tutorial shows how you can install an Apache2 webserver on a Fedora 16 server with PHP5 support (mod_php) and MySQL support.

I do not issue any guarantee that this will work for you!

1 Preliminary Note

In this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate.

2 Installing MySQL 5

To install MySQL, we do this:

yum install mysql mysql-server

Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server:

systemctl enable mysqld.service
systemctl start mysqld.service

Run

mysql_secure_installation

to set a password for the user root (otherwise anybody can access your MySQL database!):

[root@server1 ~]# mysql_secure_installation




NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!


In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
<-- ENTER
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n]
<-- ENTER
New password: <-- yourrootsqlpassword
Re-enter new password: <-- yourrootsqlpassword
Password updated successfully!
Reloading privilege tables..
... Success!


By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n]
<-- ENTER
... Success!

Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n]
<-- ENTER
... Success!

By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n]
<-- ENTER
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n]
<-- ENTER
... Success!

Cleaning up...



All done! If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!


[root@server1 ~]#

3 Installing Apache2


Apache2 is available as a Fedora package, therefore we can install it like this:

yum install httpd

Now configure your system to start Apache at boot time...

systemctl enable httpd.service

... and start Apache:

systemctl start httpd.service

Now direct your browser to http://192.168.0.100, and you should see the Apache2 placeholder page:

Click to enlarge

Apache's default document root is /var/www/html on Fedora, and the configuration file is /etc/httpd/conf/httpd.conf. Additional configurations are stored in the /etc/httpd/conf.d/ directory.

4 Installing PHP5

We can install PHP5 and the Apache PHP5 module as follows:

yum install php

We must restart Apache afterwards:

systemctl restart httpd.service

5 Testing PHP5 / Getting Details About Your PHP5 Installation


The document root of the default web site is /var/www/html. We will now create a small PHP file (info.php) in that directory and call it in a browser. The file will display lots of useful details about our PHP installation, such as the installed PHP version.

vi /var/www/html/info.php

Now we call that file in a browser (e.g. http://192.168.0.100/info.php):

Click to enlarge

As you see, PHP5 is working, and it's working through the Apache 2.0 Handler, as shown in the Server API line. If you scroll further down, you will see all modules that are already enabled in PHP5. MySQL is not listed there which means we don't have MySQL support in PHP5 yet.

6 Getting MySQL Support In PHP5

To get MySQL support in PHP, we can install the php-mysql package. It's a good idea to install some other PHP5 modules as well as you might need them for your applications. You can search for available PHP5 modules like this:

yum search php

Pick the ones you need and install them like this:

yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-magickwand php-mbstring php-mcrypt php-mssql php-shout php-snmp php-soap php-tidy

Now restart Apache2:

systemctl restart httpd.service

Now reload http://192.168.0.100/info.php in your browser and scroll down to the modules section again. You should now find lots of new modules there, including the MySQL module:

Click to enlarge

7 phpMyAdmin

phpMyAdmin is a web interface through which you can manage your MySQL databases.

phpMyAdmin can be installed as follows:

yum install phpmyadmin

Now we configure phpMyAdmin. We change the Apache configuration so that phpMyAdmin allows connections not just from localhost (by commenting out the stanza):

vi /etc/httpd/conf.d/phpMyAdmin.conf

# phpMyAdmin - Web based MySQL browser written in php # # Allows only localhost by default # # But allowing phpMyAdmin to anyone other than localhost should be considered # dangerous unless properly secured by SSL  Alias /phpMyAdmin /usr/share/phpMyAdmin Alias /phpmyadmin /usr/share/phpMyAdmin  # #   Order Deny,Allow #   Deny from All #   Allow from 127.0.0.1 #   Allow from ::1 #      Order Deny,Allow    Deny from All    Allow from 127.0.0.1    Allow from ::1   # These directories do not require access over HTTP - taken from the original # phpMyAdmin upstream tarball #      Order Deny,Allow     Deny from All     Allow from None        Order Deny,Allow     Deny from All     Allow from None        Order Deny,Allow     Deny from All     Allow from None   # This configuration prevents mod_security at phpMyAdmin directories from # filtering SQL etc.  This may break your mod_security implementation. # # #     #        SecRuleInheritance Off #     #

Restart Apache:

systemctl restart httpd.service

Afterwards, you can access phpMyAdmin under http://192.168.0.100/phpmyadmin/:

Click to enlarge

8 Links

6:07 PM

How To: Instal Asterisk Painlessly on OpenSUSE 10.3

This took me some time to figure out… here you go.

1. Add the Telephony network repository in YaST2. The URL is http://download.opensuse.org/repositories/network:/telephony/openSUSE_10.3/ …

2. There’s a bug in the deps for Asterisk with mISDNuser (the version in the repository is more recent, but is “uninstallable”) that will block the install process… so as a workaround, first, type zypper install zaptel. Then download mISDN-1_1_5-3.5.i586.rpm and mISDNuser-1_1_5-2.4.i586.rpm and install them with rpm -ihv mISDN*.rpm.

3. -Then- you can install asterisk with zypper install asterisk.

If I have the time, I'll provide configuration details later...

P.S. - Don't even try using the freepbx RPM -- it's busted pretty badly. Not sure why it is, I'll figure it out later...

Related:

5:58 PM

IPMI / STONITH howto with Pacemaker

With Dell kit of 1950/860 and newer, I’m using the built in IPMI-over-LAN in the BIOS for stonith instead of messing with DRAC5 or more complicated means. It’s easy to configure on it’s own IP and it just plain works.

First, a security note with people who have their machines on a “public” network: You’ll want to disable or set a password for the ‘null’ default user for ipmi. This may be done for you in recent versions of dell firmware, but it isn’t on some older stuff. Also, IPMI v. 1.5 doesn’t do encryption by default; you’ll want to make sure you set an encryption key in the bios settings and then use that when you connect (with the lanplus interface, and I have no idea what the syntax is with the stonith resource agent…) or you’ll be sending your authentication information “in the clear”. Since you need to have ADMINISTRATOR permission to reboot the machine as far as I know, you will want to make sure you have this secured… or anyone who’s sniffing can power your machines off at will.

You can test the sequence by using ipmitool. ipmitool -H (ip address) -U (user) -a chassis power cycle should cause your server to reboot after you enter the password. Please test this first.

Now all you need to do is add a configuration to your cluster. Using the pacemaker clm command line tool, just go configure primitive (host)-stonith stonith:external/ipmi \
params hostname=(host) ipaddr=(ip address) user=(user) passwd=(password) interface=lan
. Double check your stonith resource agents to be sure of the syntax. ( crm# ra meta external/ipmi stonith )

You’ll want to add constraints (out of the scope of this document, since it depends on your cluster design) so that a host won’t have it’s own stonith running on it. Although I’m thinking that a game of stonith-based russian roulette would be kinda fun as a computer art installation someday.

5:57 PM

CentOS, Postfix, Dovecot, Spamassassin, Postfixadmin, and Squirrelmail

What a mouthful. Like most other americans who live on a budget, I’m taking a “staycation” this weekend. What better thing to do than to get my mail server migrated to my new VPS? Well, first, I suppose, I should get the mail server all working on the new VPS…

In CentOS, the default Postfix package doesn’t have MySQL support built in. If you’ve got the priorities plugin installed, you’re either going to need to disable it or otherwise work around it so that you get the one from the centosplus repo. Other than that, it’s been made about as easy as it can be… just keep in mind as you’re reading this tutorial that I really loathe administering mail servers and consider it to be a quite onerous chore that’s been made even more onerous by spammers and hackers and script kiddies and what have you.

You’ll need to install:

yum install gcc postfix clamav mysql-server mysql-devel spamassassin  dovecot php php-mbstring php-mysql rpm-build

. There’s no RPM for Postfixadmin, but it’s available from the project’s site on Sourceforge.

And now the fun begins. This howto assumes that you have a decent level of knowledge and skill setting up services that run on Linux.I’ve included my configuration files where appropriate, please note you’ll need to establish your own files associated with mysql, since the main purpose of those files is authentication.Please read the documents on how to do this. I’ve even linked to the correct pages.

Since Dovecot and Postfix hang off of postfixadmin, let’s get that installed first. Download the tarball, untar it somewhere (I use /opt/postfixadmin/), and point apache at it… basically, just add this into your virtual host container on the server:

Alias /pfadmin/ "/opt/postfixadmin/"          Order allow,deny         Allow from all         DirectoryIndex index.php 

Don’t forget to set up a database. I’m assuming you’re using mysql; as root:

mysql> create database postfix; Query OK, 1 row affected (0.01 sec)  mysql> grant all on postfix.* to postfix@localhost identified  by 'passwordgoeshere'; Query OK, 0 rows affected (0.03 sec)

Change the settings in /opt/postfixadmin/config.inc.php to reflect your server’s setup. If you are using MySQL >= 4.1, don’t forget to change the database type to mysqli… you’ll get much better performance. To finish setup, head to http://www.yourserver.com/pfadmin/setup.php and follow the prompts. You’ll want to have already pointed the domain’s MX at this IP address — that’s outside the scope of this tutorial, but rest assured that if you haven’t already done it, you’re going to want to go take a nice long nap … say, for a day or two … and come back when it resolves. Don’t add a domain or a mailbox yet.

Postfix

On to Postfix. Postfix is the mail transfer agent. In post office terms, Postfix is the guy at the central office who receives your mail from the truck or airplane, takes it out of the big bulk bag, filters it into your correct mailbox after applying any additional filters (i.e. “I’m on vacation, hold my mail”) to your individual account, and puts it in your P.O. box ready for you to pick up.

The official word on how to do postfix with mysql is available here. Go read that, I’ll wait.

Before proceeding with the Postfix configuration, make sure that the postfix version you have has MySQL support built in. To do this, run postconf -m and verify that mysql appears in the list. If mysql isn’t there, uninstall postfix using yum, download the version from the centosplus repository, and install that one manually.

To get postfix working, you’ll need to tell it to use mysql virtual maps for it’s user and domain tables. I’ve posted my configuration files below to make it easy on you. There’s a decent walkthrough in the postfixadmin DOCUMENTS folder.

A few things of note:

  • Note in postfix’s master.cf that I have ports 25 and 587 open. 587 is known as the alternate SMTP port, and us poor peons in the US with horrible ISPs that block port 25 for some misguided reason need to use it to pass mail to our servers.
  • The virtual_uid_maps and virtual_gid_maps need to be set to a user that postfix has access to (the postfix user is fine, but I created an extra user called vmail.) You will need to create /var/spool/mail/vmail and chown it over to the group ID and user ID that you’ve set in the configuration file.
  • Note the smtpd_auth_type and smtpd_auth_path settings — these are important to make sure that you are not hosting an open relay. Postfix can use dovecot instead of saslauthd — there’s no reason you should have to run two authentication mechanisms… is there? Here’s documentation on sasl with dovecot.
  • Note that we also are using a static user ID of 502 for the vmail user that owns the virtual mailboxes — this MUST be set in both the postfix and dovecot mail configurations! Create a vmail user by calling `adduser -s /sbin/nologin vmail` as root, and then `addgroup vmail` — cat /etc/groups and /etc/passwd to get the user and group IDs, and set the group ID definitions in postfix (look for the lines that say static:###) and dovecot.

Dovecot

The next step is to get Dovecot configured. Dovecot is the part that allows users to authenticate to the mail server and to get the mail from their mailbox. In post office terms, it’s the authentication mechanism (key or combination) that lets you into your private P.O. box.

Again, there’s a DOVECOT.txt in the postfixadmin/DOCUMENTS directory that will tell you what settings you need to change, but I’ve attached my file below. In round terms, what you need to do is set up the pop3 and IMAP servers for the appropriate locations, tell them to look in the mysql tables for the authentication information, etc. Please note that Dovecot changed it’s configuration file schema, so default_mail_env is now mail_location and a few other details. Depending on what version of dovecot you’re using (I’m using 1.0-1.2.rc15, which is the latest from centos) you might have to make some changes to the configuration files below. There some very good information in the Dovecot wiki that you want to read before we go any farther.

/etc/dovecot.conf

Securing / Opening things up

With both of those servers running, make sure you don’t have any errors in /var/log/maillog. Then make sure that your firewalls are open on ports 25, 110 and 143. (This tutorial doesn’t cover SSL/TLS. I’ll cover it at a later date — but I recommend that you go from here and follow the very easy instructions at both the postfix and dovecot websites to configure it yourself.)

With both dovecot and postfix running with users from the database, we should have a secure and working server. Let’s test it. Before we start testing, you’re going to need a hash of your username and password… this is the virtual mailbox you set up when you were setting up postfixadmin. The command to get this hash looks like:

perl -MMIME::Base64 -e ‘print encode_base64(“\000foo\@foobar.com\000foobar“)’;

… replace the first green part with the email user’s name, then the second green part with the virutal domain we’re handling mail for, and the third green part with the user’s password.

Which would result in a hash of:

AGZvb0Bmb29iYXIuY29tAGZvb2Jhcg==

SMTP first. Open up a shell and telnet to your mailserver on port 25 or 587. You should be able to hold a session that looks something like this:

:~ karlkatzke$ telnet mailserver.com 587 Trying xx.xx.xx.xx... Connected to mailserver.com. Escape character is '^]'. 220 mailserver.com ESMTP Postfix ehlo mail.foobar.net 250-mailserver.com 250-PIPELINING 250-SIZE 10240000 250-ETRN 250-AUTH PLAIN 250-AUTH=PLAIN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN auth plain foobar 535 5.7.0 Error: authentication failed: auth plain AGZvb0Bmb29iYXIuY29tAGZvb2Jhcg== 235 2.0.0 Authentication successful 

At this point you could send mail and see if it actually goes through. Google it if you need to figure it out, since I’m not going to really cover it much here. Let’s test Dovecot some though. Telnet to port 110 on your mailserver, and let’s use the same password hash to do something similar. (Note that you’ll have to have sent an email to the user first in order for the mailboxes to be created, so if you haven’t, do so!)

:~ karlkatzke$ telnet mailserver.com 110 Trying xx.xx.xx.xx... Connected to mailserver. Escape character is '^]'. +OK Dovecot ready. user foobar@mailserver.com +OK pass foobar +OK Logged in. list +OK 2 messages: 1 601 2 486 . quit +OK Logging out. Connection closed by foreign host. 

Ok, you can receive mail, send mail, and everything else. If that’s all you want, you’re done. Just to make sure, head over to the abuse.net relay test and run a test against your server to make very sure you don’t have any open relays that could be used by spammers. Having open relays on your server WILL get you blacklisted almost immediately.

Spam Assassin

The easiest way to get spamassassin running is to follow this tutorial. Just remember that if you’re running SMTP on port 587, run spamassassin there too. Don’t forget to start and chkconfig the spamasssassin service before you restart postfix.

Squirrelmail

Install squirrelmail via yum. It’s easy — just install it, restart apache, and you’re good to go. Update: See this blog article for SMTP auth.

Wrapping up

This configuration, it should be noted, is the one that works for me. It may not work for you. It may not also follow the best security principles — I would especially recommend getting SSL/TLS working for any sort of deployment in the workplace. If you identify any security holes or problems, please post a comment below or email me via the contact page and I’ll update the tutorial. Also, please note the date the tutorial was published and check documentation files accordingly. Reading this tutorial and/or downloading the files is no replacement for actually reading the documentation.