Saturday, February 27, 2016
RHEL Server ISO download page
Wednesday, February 24, 2016
How to Configure MongoDB with PHP for XAMPP on Windows
XAMPP is an open source, easy to use and easy to install stack that contains Apache webserver, MySQL database, PHP compiler and Perl.
MongoDB
is one of the most widely NoSQL database in market today. We often
end up in a situation where we might find it useful to set up mongodb
also along with PHP in the XAMPP stack.
Since
mongoDB is not an integral part of this stack, we have to set it up
manually as the XAMPP installer is not going to take care of it for
you.
Follow
the steps below to configure MongoDB for the XAMPP stack.
1. Install and Configure XAMPP
First,
you should install the XAMPP stack. Download and install the XAMPP
stack fromApache
friends project.
After
the install, start your Apache server from XAMPP controls and create
a simple PHP file to get the detailed info about the PHP running with
your stack. Just copy paste the below lines to a test.php file in the
htdocs folder and execute it to see the output.
<?php echo phpinfo(); ?>
As
highlighted in the screenshot below, you will find the PHP version,
Architecture, Compiler in use and can see whether thread safety is
enabled or not.
2. Download PHP Mongo Driver
From
this PHP
Mongo Driver download page,
download the appropriate file that matches the PHP version,
Architecture, Compiler in use and Thread Safety from the XAMPP that
is installed on your system.
3. Copy PHP Mongo DDL to EXT Directory
After
you unzip the php monngo driver zip file, copy and paste the “.dll”
file to the folder “C:\xampp\php\ext”( Assuming that xampp is
installed on C drive).
This
ext folder all the “.dll” files of all the extensions that are
installed. XAMPP loads the driver files for the extensions from this
folder.
After
copying the file over here, rename the “.dll” file to
“php_mongo.dll” for simplicity.
4. Add Extension to php.ini
Next,
open the “php.ini” file from the path “C:\xampp\php” (again,
assuming that xampp is installed on C drive), and edit this file to
add the name of the “.dll” file as an extension.
Add
the following line to the php.ini file.
extension=php_mongo.dll
Later,
if you like, you can also disable this extension by adding a
semicolon before the line so that it becomes as shown below:
;extension=php_mongo.dll
5. Modify the PATH Variable
Go
to control panel, and open the system settings to add the
“Environment Variable”.
Add
the path of the xampp php installation ( C:\xampp\php ) to the path
variable, if it is not present already. This ensures that the newly
added “.dll” file is loaded when xampp is started.
6. Restart Apache and Verify
Finally,
restart the Apache server from the XAMPP control panel.
If
everything is configured properly, xampp should not throw any error
messages while starting apache. You can also check the loaded
extension by going through the first step and looking into the php
information.
You
will be able to see the loaded extension information on the page as
shown below.
Monitoring command netstat examples on RHEL/CentOS
1. List All Ports (both listening and non listening ports)
List all ports using netstat -a
# netstat -a | more
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 localhost:30037 *:* LISTEN
udp 0 0 *:bootpc *:*
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 6135 /tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 5140 /var/run/acpid.socket
List all tcp ports using netstat -at
# netstat -at
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 localhost:30037 *:* LISTEN
tcp 0 0 localhost:ipp *:* LISTEN
tcp 0 0 *:smtp *:* LISTEN
tcp6 0 0 localhost:ipp [::]:* LISTEN
List all udp ports using netstat -au
# netstat -au
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
udp 0 0 *:bootpc *:*
udp 0 0 *:49119 *:*
udp 0 0 *:mdns *:*
2. List Sockets which are in Listening State
List only listening ports using netstat -l
# netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 localhost:ipp *:* LISTEN
tcp6 0 0 localhost:ipp [::]:* LISTEN
udp 0 0 *:49119 *:*
List only listening TCP Ports using netstat -lt
# netstat -lt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 localhost:30037 *:* LISTEN
tcp 0 0 *:smtp *:* LISTEN
tcp6 0 0 localhost:ipp [::]:* LISTEN
List only listening UDP Ports using netstat -lu
# netstat -lu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
udp 0 0 *:49119 *:*
udp 0 0 *:mdns *:*
List only the listening UNIX Ports using netstat -lx
# netstat -lx
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 6294 private/maildrop
unix 2 [ ACC ] STREAM LISTENING 6203 public/cleanup
unix 2 [ ACC ] STREAM LISTENING 6302 private/ifmail
unix 2 [ ACC ] STREAM LISTENING 6306 private/bsmtp
3. Show the statistics for each protocol
Show statistics for all ports using netstat -s
# netstat -s
Ip:
11150 total packets received
1 with invalid addresses
0 forwarded
0 incoming packets discarded
11149 incoming packets delivered
11635 requests sent out
Icmp:
0 ICMP messages received
0 input ICMP message failed.
Tcp:
582 active connections openings
2 failed connection attempts
25 connection resets received
Udp:
1183 packets received
4 packets to unknown port received.
.....
Show statistics for TCP (or) UDP ports using netstat -st (or) -su
# netstat -st
# netstat -su
4. Display PID and program names in netstat output using netstat -p
netstat -p option can be combined with any other netstat option. This will add the “PID/Program Name” to the netstat output. This is very useful while debugging to identify which program is running on a particular port.
# netstat -pt
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 1 0 ramesh-laptop.loc:47212 192.168.185.75:www CLOSE_WAIT 2109/firefox
tcp 0 0 ramesh-laptop.loc:52750 lax:www ESTABLISHED 2109/firefox
5. Don’t resolve host, port and user name in netstat output
When you don’t want the name of the host, port or user to be displayed, use netstat -n option. This will display in numbers, instead of resolving the host name, port name, user name.
This also speeds up the output, as netstat is not performing any look-up.
# netstat -an
If you don’t want only any one of those three items ( ports, or hosts, or users ) to be resolved, use following commands.
# netsat -a --numeric-ports
# netsat -a --numeric-hosts
# netsat -a --numeric-users
6. Print netstat information continuously
netstat will print information continuously every few seconds.
# netstat -c
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 ramesh-laptop.loc:36130 101-101-181-225.ama:www ESTABLISHED
tcp 1 1 ramesh-laptop.loc:52564 101.11.169.230:www CLOSING
tcp 0 0 ramesh-laptop.loc:43758 server-101-101-43-2:www ESTABLISHED
tcp 1 1 ramesh-laptop.loc:42367 101.101.34.101:www CLOSING
^C
7. Find the non supportive Address families in your system
netstat --verbose
At the end, you will have something like this.
netstat: no support for `AF IPX' on this system.
netstat: no support for `AF AX25' on this system.
netstat: no support for `AF X25' on this system.
netstat: no support for `AF NETROM' on this system.
8. Display the kernel routing information using netstat -r
# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth2
link-local * 255.255.0.0 U 0 0 0 eth2
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth2
Note: Use netstat -rn to display routes in numeric format without resolving for host-names.
9. Find out on which port a program is running
# netstat -ap | grep ssh
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 1 0 dev-db:ssh 101.174.100.22:39213 CLOSE_WAIT -
tcp 1 0 dev-db:ssh 101.174.100.22:57643 CLOSE_WAIT -
Find out which process is using a particular port:
# netstat -an | grep ':80'
10. Show the list of network interfaces
# netstat -i
Kernel Interface table
Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0 1500 0 0 0 0 0 0 0 0 0 BMU
eth2 1500 0 26196 0 0 0 26883 6 0 0 BMRU
lo 16436 0 4 0 0 0 4 0 0 0 LRU
Display extended information on the interfaces (similar to ifconfig) using netstat -ie:
# netstat -ie
Kernel Interface table
eth0 Link encap:Ethernet HWaddr 00:10:40:11:11:11
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Memory:f6ae0000-f6b00000
List all ports using netstat -a
# netstat -a | more
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 localhost:30037 *:* LISTEN
udp 0 0 *:bootpc *:*
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 6135 /tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 5140 /var/run/acpid.socket
List all tcp ports using netstat -at
# netstat -at
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 localhost:30037 *:* LISTEN
tcp 0 0 localhost:ipp *:* LISTEN
tcp 0 0 *:smtp *:* LISTEN
tcp6 0 0 localhost:ipp [::]:* LISTEN
List all udp ports using netstat -au
# netstat -au
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
udp 0 0 *:bootpc *:*
udp 0 0 *:49119 *:*
udp 0 0 *:mdns *:*
2. List Sockets which are in Listening State
List only listening ports using netstat -l
# netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 localhost:ipp *:* LISTEN
tcp6 0 0 localhost:ipp [::]:* LISTEN
udp 0 0 *:49119 *:*
List only listening TCP Ports using netstat -lt
# netstat -lt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 localhost:30037 *:* LISTEN
tcp 0 0 *:smtp *:* LISTEN
tcp6 0 0 localhost:ipp [::]:* LISTEN
List only listening UDP Ports using netstat -lu
# netstat -lu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
udp 0 0 *:49119 *:*
udp 0 0 *:mdns *:*
List only the listening UNIX Ports using netstat -lx
# netstat -lx
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 6294 private/maildrop
unix 2 [ ACC ] STREAM LISTENING 6203 public/cleanup
unix 2 [ ACC ] STREAM LISTENING 6302 private/ifmail
unix 2 [ ACC ] STREAM LISTENING 6306 private/bsmtp
3. Show the statistics for each protocol
Show statistics for all ports using netstat -s
# netstat -s
Ip:
11150 total packets received
1 with invalid addresses
0 forwarded
0 incoming packets discarded
11149 incoming packets delivered
11635 requests sent out
Icmp:
0 ICMP messages received
0 input ICMP message failed.
Tcp:
582 active connections openings
2 failed connection attempts
25 connection resets received
Udp:
1183 packets received
4 packets to unknown port received.
.....
Show statistics for TCP (or) UDP ports using netstat -st (or) -su
# netstat -st
# netstat -su
4. Display PID and program names in netstat output using netstat -p
netstat -p option can be combined with any other netstat option. This will add the “PID/Program Name” to the netstat output. This is very useful while debugging to identify which program is running on a particular port.
# netstat -pt
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 1 0 ramesh-laptop.loc:47212 192.168.185.75:www CLOSE_WAIT 2109/firefox
tcp 0 0 ramesh-laptop.loc:52750 lax:www ESTABLISHED 2109/firefox
5. Don’t resolve host, port and user name in netstat output
When you don’t want the name of the host, port or user to be displayed, use netstat -n option. This will display in numbers, instead of resolving the host name, port name, user name.
This also speeds up the output, as netstat is not performing any look-up.
# netstat -an
If you don’t want only any one of those three items ( ports, or hosts, or users ) to be resolved, use following commands.
# netsat -a --numeric-ports
# netsat -a --numeric-hosts
# netsat -a --numeric-users
6. Print netstat information continuously
netstat will print information continuously every few seconds.
# netstat -c
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 ramesh-laptop.loc:36130 101-101-181-225.ama:www ESTABLISHED
tcp 1 1 ramesh-laptop.loc:52564 101.11.169.230:www CLOSING
tcp 0 0 ramesh-laptop.loc:43758 server-101-101-43-2:www ESTABLISHED
tcp 1 1 ramesh-laptop.loc:42367 101.101.34.101:www CLOSING
^C
7. Find the non supportive Address families in your system
netstat --verbose
At the end, you will have something like this.
netstat: no support for `AF IPX' on this system.
netstat: no support for `AF AX25' on this system.
netstat: no support for `AF X25' on this system.
netstat: no support for `AF NETROM' on this system.
8. Display the kernel routing information using netstat -r
# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth2
link-local * 255.255.0.0 U 0 0 0 eth2
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth2
Note: Use netstat -rn to display routes in numeric format without resolving for host-names.
9. Find out on which port a program is running
# netstat -ap | grep ssh
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 1 0 dev-db:ssh 101.174.100.22:39213 CLOSE_WAIT -
tcp 1 0 dev-db:ssh 101.174.100.22:57643 CLOSE_WAIT -
Find out which process is using a particular port:
# netstat -an | grep ':80'
10. Show the list of network interfaces
# netstat -i
Kernel Interface table
Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0 1500 0 0 0 0 0 0 0 0 0 BMU
eth2 1500 0 26196 0 0 0 26883 6 0 0 BMRU
lo 16436 0 4 0 0 0 4 0 0 0 LRU
Display extended information on the interfaces (similar to ifconfig) using netstat -ie:
# netstat -ie
Kernel Interface table
eth0 Link encap:Ethernet HWaddr 00:10:40:11:11:11
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Memory:f6ae0000-f6b00000
httpd proxy to redirect port 8080 to port 80 in tomcat7 on Linux server(RHEL/CentOS/Amazon Linux)
Here I have redirected
tomcat7 service running in port 8080 to port 80 and another httpd
service is also running in port 80.
Domain Name : mydomain.com
Hosting address1: mail.mydomain.com(httpd)
Hosting address2: mydomain.com(tomcat7)
Server : Linux
edit httpd conf file /etc/httpd/conf/httpd.conf and add the below lines
<VirtualHost mail.mydomain.com:80>
ServerName mail.mydomain.com
#ServerAlias mail.*
ServerAdmin support@mydomain.com
DocumentRoot /var/www/html/squirrelmail
#SSLEngine on
#SSLCertificateFile /etc/httpd/conf/ssl/mailcert.pem
#SSLCertificateKeyFile /etc/httpd/conf/ssl/mailkey.pem
</VirtualHost>
<VirtualHost mydomain.com:80>
ServerName mydomain.com
ServerAlias www.mydomain.com
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
ProxyTimeOut 320
<Location />
Order allow,deny
Allow from all
</Location>
ProxyRequests Off
ProxyPreserveHost On
ProxyPassReverseCookiePath / /
<IfModule mod_rewrite.c>
# Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^bharathjeeva\.com$ [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L]
</IfModule>
ErrorDocument 503 /errors/503.html
ErrorDocument 502 /errors/502.html
</VirtualHost>
Save and restart httpd service by
#/etc/init.d/httpd restart
or
#service httpd restart
Domain Name : mydomain.com
Hosting address1: mail.mydomain.com(httpd)
Hosting address2: mydomain.com(tomcat7)
Server : Linux
edit httpd conf file /etc/httpd/conf/httpd.conf and add the below lines
<VirtualHost mail.mydomain.com:80>
ServerName mail.mydomain.com
#ServerAlias mail.*
ServerAdmin support@mydomain.com
DocumentRoot /var/www/html/squirrelmail
#SSLEngine on
#SSLCertificateFile /etc/httpd/conf/ssl/mailcert.pem
#SSLCertificateKeyFile /etc/httpd/conf/ssl/mailkey.pem
</VirtualHost>
<VirtualHost mydomain.com:80>
ServerName mydomain.com
ServerAlias www.mydomain.com
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
ProxyTimeOut 320
<Location />
Order allow,deny
Allow from all
</Location>
ProxyRequests Off
ProxyPreserveHost On
ProxyPassReverseCookiePath / /
<IfModule mod_rewrite.c>
# Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^bharathjeeva\.com$ [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L]
</IfModule>
ErrorDocument 503 /errors/503.html
ErrorDocument 502 /errors/502.html
</VirtualHost>
Save and restart httpd service by
#/etc/init.d/httpd restart
or
#service httpd restart
Life with qmail - document
What is qmail?
qmail is
an Internet Mail Transfer Agent (MTA) for UNIX-like operating
systems. It's a drop-in replacement for the Sendmail system
provided with UNIX operating systems. qmail uses the
Simple Mail Transfer Protocol (SMTP) to exchange messages with MTA's
on other systems.
3. Why use qmail?
Your
operating system included an MTA, probably Postfix or Sendmail,
so if you're reading this document you're probably looking for
something different. Some of the advantages of qmail over
vendor-provided MTA's include:
3. Security
qmail was
designed for high security. Sendmail has a long
history of serious security problems. When Sendmail was
written, the Net was a much friendlier place. Everyone knew everyone
else, and there was little need to design and code for high security.
Today's Internet is a much more hostile environment for network
servers.Sendmail's author, Eric Allman, and the current
maintainer, Claus Assman, have done a good job of tightening up the
program, but nothing short of a redesign can achieve true security.
3.2. Performance
qmail parallelizes
mail delivery, performing up to 20 deliveries simultaneously, by
default.
3.3. Reliability
Once qmail accepts
a message, it guarantees that it won't be lost. qmail also
supports a new mailbox format that works reliably even over
NFS without locking.
3.4. Simplicity
qmail is
smaller than any other equivalently-featured MTA.
Note: The
official qmail web
page, http://cr.yp.to/qmail.html covers
the advantages of qmail more
extensively.
4. History
qmail was
written by Dan Bernstein
(DJB), http://en.wikipedia.org/wiki/Daniel_J._Bernstein,
a math professor now at the University of Illinois in Chicago. Dr.
Bernstein is also well known for his work in the field of
cryptography and for his lawsuit against the U.S. government
regarding the publishing of encryption source code.
Seehttp://en.wikipedia.org/wiki/Bernstein_v._United_States or http://cr.yp.to/export.html for
information regarding the lawsuit.
The
first public release of qmail, beta version 0.70,
occurred on January, 24, 96. The first gamma release, 0.90, was on
August, 96.
Version
0, the first general release, was announced on February, 20, 97. The
current version, 03, was released on June, , 98.
The
next release is expected to be an evaluation version of 2.0. Some of
things that might appear in version 2 are covered
at http://cr.yp.to/qmail/future.html.
5. Features
The qmail web
page, http://cr.yp.to/qmail.html,
has a comprehensive list of qmail's
features. This section is based heavily on that list.
5. Setup
- Automatic adaptation to your UNIX variant--no porting needed
- Automatic per-host configuration
- Quick installation--no big list of decisions to make
5.2. Security
- Clear separation between addresses, files, and programs
- Minimization of setuid code
- Minimization of root code
- Five-way trust partitioning--security in depth
- Optional logging of one-way message hashes, entire message contents, etc. (See What is QUEUE_EXTRA? in Appendix E.)
5.3. Message construction
- Full support for address groups
- Automatic conversion of old-style address lists to RFC 822 format
- sendmail command for compatibility with current user agents
- Header line length limited only by memory
- Host masquerading (See defaulthost)
- Automatic Mail-Followup-To creation (See QMAILMFTFILE)
5.4. SMTP service
- RFC 82 RFC 23, RFC 5 RFC 52, and RFC 54 compliant
- 8-bit clean
- RFC 93/ident/TAP callback--can help track spammers/forgers
- Relay control--stops unauthorized relaying by outsiders
- No interference between relay control and aliases
- Automatic recognition of local IP addresses
- Per-buffer timeouts
- Hop counting
- Parallelism limit (via ucspi-tcp)
- Refusal of connections from known abusers (via ucspi-tcp)
- Relaying and message rewriting for authorized clients
- Optional RBL/ORBS support (via rblsmtpd)
5.5. Queue management
- Instant handling of messages added to queue
- Parallelism limits
- Split queue directory--no slowdown when queue gets big
- Quadratic retry schedule--old messages tried less often (see Appendix E)
- Independent message retry schedules
- Automatic safe queueing--no loss of mail if system crashes
- Automatic per-recipient checkpointing
- Automatic queue cleanups
- Queue viewing (See qmail-qread)
- Detailed delivery statistics (via qmailanalog)
5.6. Bounces
- QSBMF bounce messages--both machine-readable and human-readable
- HCMSSC support--language-independent RFC 93 error codes
- Double bounces sent to postmaster
5.7. Routing by domain
- Any number of names for local host (See locals)
- Any number of virtual domains (See virtualdomains)
- Domain wildcards (See virtualdomains)
- Configurable "percent hack" support (See percenthack)
- UUCP hook
5.8. SMTP delivery
- RFC 82 RFC 974, and RFC 23 compliant
- 8-bit clean
- Automatic downed host backoffs
- Artificial routing--smarthost, localnet, mailertable (See smtproutes)
- per-buffer timeouts
- Passive SMTP queue--perfect for SLIP/PPP (via serialmail)
- AutoTURN support (via serialmail)
5.9. Forwarding and mailing lists
- Hashed forwarding databases (via fastforward)
- Address wildcards (See .qmail-default)
- Mailing list owners--automatically divert bounces and vacation messages
- VERPs--automatic recipient identification for mailing list bounces
- Delivered-To--automatic loop prevention, even across hosts
5.. Local delivery
- User-controlled address hierarchy--fred controls fred-anything mbox delivery
- Reliable NFS delivery (See maildir)
- User-controlled program delivery: procmail etc. (See qmail-command)
- Optional new-mail notification (See qbiff)
- Optional NRUDT return receipts (See qreceipt)
- Conditional filtering (See condredirect and bouncesaying)
5.. POP3 service
- RFC 39 compliant
- UIDL support
- TOP support
- APOP hook
- modular password checking (via checkpassword)
6. Related packages
qmail follows
the classic UNIX philosophy that each tool should perform a single,
well-defined function, and complex functions should be built by
connecting a series of simple tools into a "pipeline". The
alternative is to build more and more complex tools that re-invent
much of the functionality of the simpler tools.
It's
not surprising, then, that qmail itself doesn't do
everything everyone might want it to do. Here, then, are some of the
most popular add-ons written for qmail. Of course, many
standard UNIX utilities can also be plugged into qmail.
- daemontools--a set of tools for managing daemons and their logs
- qmailanalog--a set of qmail log file analysis tools
- serialmail--tools for mailing over slow networks
- mess822--tools for parsing Internet mail messages
- ezmlm--a mailing list manager for qmail
7. Architecture
Appendix
D covers qmail's
functional and physical structure. In a nutshell, qmail consists
of a series of programs (modules) that perform different tasks.
8. License
As
of 2007--30, qmail 03
is in the public domain. See http://cr.yp.to/qmail/dist.html.
This means that there are no legal limits to what you can do with it:
you can copy it, give it away, sell it, modify it, rename it, or use
pieces of it in copy-protected works, without any restrictions.
Other
packages by Dan Bernstein, such as daemontools and ucspi-tcp,
are copyrighted by the author, and are not distributed with a
statement of user's rights. Inhttp://cr.yp.to/softwarelaw.html,
he outlines what he thinks your rights are under U.S. copyright law.
See also http://en.wikipedia.org/wiki/License-free_software.
9. Comparison with other MTA's
A
book could be written about this topic, but it would be tedious
reading. Here's a quick comparison of qmail with
some of the most common UNIX MTA's.
MTA |
Maturity |
Security |
Features |
Performance |
Sendmailish |
Modular |
qmail |
medium |
high |
high |
high |
addons |
yes |
Sendmail |
high |
low |
high |
low |
x |
no |
Postfix |
medium |
high |
high |
high |
yes |
yes |
exim |
medium |
low |
high |
medium |
yes |
no |
Courier |
low |
medium |
high |
medium |
optional |
yes |
Sendmailish means
the MTA behaves like Sendmail in
some ways that would make a switch from Sendmail to
the alternative MTA more user-transparent, such as the use
of .forward files, /etc/aliases,
and delivery to /var/spool/mail.
Jonathan
de Boyne Pollard has reviews of many Unix MTAs
at http://homepages.tesco.net/~J.deBoynePollard/Reviews/UnixMTSes/.
Another detailed comparison is available
at http://www.geocities.com/mailsoftware42/.
. Documentation
. man pages
The qmail distribution
comes with a complete set of man pages.
After installation, they're in /var/qmail/man.
You'll probably need to add that directory to your MANPATHenvironment
variable.
Shell |
Command |
Bourne (/bin/sh) |
MANPATH=$MANPATH:/var/qmail/man; export
MANPATH |
bash, Korn |
export MANPATH=$MANPATH:/var/qmail/man |
C Shell |
setenv MANPATH $MANPATH:/var/qmail/man |
At
this point, commands in the format "man name-of-qmail-man-page"
should display the appropriate man page.
The man pages
are also available on-line in HTML format from:
Note: The qmail man
pages are loaded with information, but they require careful reading
because they're written in a very dense, technical style. You might
want to print off a set and read them through once to familiarize
yourself with what's there and where it is. Very little information
is repeated on multiple pages, so if you don't know where something
is covered, it can be hard to find it.
.2. Docs
The qmail distribution
includes a series of documents that are installed
under /var/qmail/doc.
They include:
- FAQ: Frequently Asked Questions, with answers
- INSTALL*: Installation documentation
- PIC.*: Descriptions of how qmail performs key tasks. See the Architecture appendix for more information.
- Various other installation-related documentation
These
docs are also available on-line from:
.3. FAQs
There
are two official FAQ (Frequently Asked Questions, with answers)
documents:
- /var/qmail/doc/FAQ, the plain text version, and
- The web FAQ at http://cr.yp.to/qmail/faq.html.
The
web FAQ is more complete.
.4. Books
.4. The qmail Handbook
Dave
Sill, the author of Life
with qmail,
has written a qmail book
for Apress (http://www.apress.com/).
This book, The
qmail Handbook,
covers everything in this guide, but goes into much more detail and
also covers a lot of new ground.
For
more information, see http://www.apress.com/catalog/book/935402/.
To order this book from my bookstore, in association with Amazon.com,
seehttp://www.amazon.com/exec/obidos/ASIN/935402/davesill.
.4.2. Qmail Quickstarter: Install, Set Up and Run your own Email Server
Kyle
Wheeler has written a qmail book
for Packt (http://www.packtpub.com/).
As the title suggests, this book is designed to help people new
to qmail to
set up a mail server.
To
order this book from my bookstore, in association with Amazon.com,
see http://www.amazon.com/exec/obidos/ASIN/4750/davesill.
.4.3. qmail
John
Levine has written a qmail book
for O'Reilly & Associates (http://www.oreilly.com/).
See http://qmail.gurus.com/ for
more info including the Table of Contents and a sample chapter.
To
order this book from my bookstore, in association with Amazon.com,
see http://www.amazon.com/exec/obidos/ASIN/65926285/davesill.
.4.4. Running qmail
Richard
Blum has written Running qmail, which is published by
Sams. This book has received mixed reviews on the qmail mailing
list.
For
more information or to order this book,
see http://www.amazon.com/exec/obidos/ASIN/06723454/davesill.
.4.5. qmail: Yuksek Performansli E-Posta Sunucu
Ismail
Yenigul, et al, have written a Turkish-language qmail book.
See http://www.acikakademi.com/catalog/qmail/.
.5. List archives
The qmail e-mail
mailing list, maintained by Dan Bernstein, is a valuable source of
information. Web archives of the lists messages are kept at:
Most
questions about qmail can be answered by searching
the list archives first.
.6. Other Web Sites
- http://www.qmail.org: the unofficial qmail home page. Contains lots of information about add-ons and patches, and links to many good qmail web pages on other sites.
- http://www.flounder.net/qmail/qmail-howto.html: Adam McKenna's HOWTO.
. Support
. Mailing lists
The
following lists reside on list.cr.yp.to. In order to prevent
harvesting of e-mail addresses by spammers, I'm avoiding the use of
complete, valid addresses and "mailto" URL's.
The
lists are managed by ezmlm, which uses different
addresses to perform different functions:
- listname@list.cr.yp.to: the submission address. Messages sent here go out to all members of the list. Do not send subscribe/unsubscribe requests here: they won't work, and they'll annoy the subscribers.
- listname-help@list.cr.yp.to: the "help" address. Returns a list of command addresses and general usage information.
- listname-subscribe: send a blank message here to subscribe.
- listname-unsubscribe: send a blank message here to unsubscribe.
To
specify a subscription/unsubscription address, say joe@example.com,
send the message to:
- listname-subscribe-joe=example.com@list.cr.yp.to.
. qmail
The
main qmail mailing
list. For discussion and questions/answers on most things related
to qmail,
except those with their own lists. Read Charles Cazabon's "
Steps to qmail List Bliss"
at http://pyropus.ca/personal/writings/-steps-to-qmail-list-bliss.html before
posting. Also read the FAQs and search the list
archives before posting a question. When you ask questions,
please try to include sufficient details to make it possible for
people to respond:
- What did you do? What's your configuration? Include qmail-showctl output if you're not sure what's important. What action did you take? If this is a new installation, tell how you installed qmail.
- What did you expect to happen? What was the outcome you were trying to achieve? Don't assume the reader can guess.
- What did happen? Describe the actual result. Include log file clippings and copies of messages, with headers.
Note: The qmail list
uses a utility called qsecretary to
verify that messages posted to the list are not spam. Each message
posted to the list will result in an e-mail confirmation request
from qsecretary.
Read the message and follow the directions to confirm your
message--usually just replying to the qsecretary message
will do the trick. Regular list posters often automate this process
using autoresponders like Charles Cazabon's pymsgauth,
available
fromhttp://pyropus.ca/software/pymsgauth/. pymsgauth verifies
that message sent to the qmail list
really came from you, so it won't automatically confirm forged
messages sent to the list in your name.
.2. qmailannounce
The qmail announcement
mailing list. New releases are announced here. There's no submission
address: it's a read-only list.
.3. serialmail
For
discussion of the serial mail package.
.4. ezmlm
For
discussion of the ezmlm mailing list manager.
.2. Consultants
See http://www.qmail.org/top.html#paidsup for
a list of commercial support providers.
.3. FAQTS Knowledgebase
A
database of qmail-related
questions and answers is available at http://qmail.faqts.com/.
If you have a question that the FAQ doesn't answer, try searching
this knowledgebase. It's especially good at answering "how to"
questions
Subscribe to:
Posts (Atom)