Kmaiti

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Saturday, 8 May 2010

Qmail : How does it work ?

Posted on 05:41 by Unknown
Qmail programs & configuration files
Qmail works using about 15 small programs. It also uses a pretty large number of configuration files. At the beginning, this may appear as quite confusing. Once you are familiarised with these configuration files & programs, qmail administration will be easier.

Qmail programs

Qmail continuously runs 5 daemons. Remaining 10 programs are launched by these 5 daemons as and when required.

Let us see which are the 5 daemons.

1. qmail-send
2. qmail-lspawn
3. qmail-rspawn
4. qmail-clean
5. tcpserver

How Qmail works

1. Email arrival in Qmail

Mail arrives in Qmail in two different ways.

(i) Locally injected emails.

There is a program called sendmail that comes with qmail. It is a program that mimics functionality of legacy sendmail, its arguments are also similar. sendmail accepts the local email and passes it to qmail-inject.

(ii) Remote emails arrived via SMTP

* tcpserver listens incoming connections on the SMTP port.
* upon a new SMTP connection, qmail-smtpd is launched.
* qmail-smtpd receives emails via SMTP.



2. Queuing emails

* qmail-inject & qmail-smpd pass received emails to qmail-queue.
* qmail-queue places emails in the folder /var/qmail/todo
* qmail-queue adds necessary headers to emails
* Then, it notifies qmail-send about newly queued emails.

3. Processing queued emails

* qmail-send takes the message out of /var/qmail/queue/todo folder
* qmail-send checks the recipient address of the email
* If the recipient addres is local, email is passed to qmail-lspwan
* If the recipient address is remote, email is passed to qmail-rspawn

4. Email delivery to local and remote recipients

* qmail-lspawn passes email to qmail-local
* qmail-local delivers email to local email address
* qmail-rspawn passes email to qmail-remote
* qmail-remote connects to remote mail server and delivers email to remote email address

5. Cleaning queue after delivering emails

* Once all messages are delivered, qmail-send notifies qmail-clean
* qmail-clean removes the delivered emails from the queue

Qmail configuration files

Qmail configuration files are located in the folder /var/qmail/control.

1. badmailfrom
All "from addresses" which are blacklisted.

2. bouncefrom
It is the bounce email from address. Usually it is "mailer-daemon".

3. bouncehost
It is host name of server

4. concurrencyincoming
Maximum number of simultaneous incoming SMTP connections allowed.

5. concurrencylocal
Maximum number of simultaneous local deliveries

6. concurrencyremote
Maximum number of simultaneous remote deliveries

7. defaultdomain
Default domain name of server

8. defaulthost
Host name of server

9. databytes
Maximum number of bytes in message (0=no limit)

10. doublebouncehost
It is the bounce email from address. Usually it is "mailer-daemon".

11. doublebounceto
It is the bounce email to address. Usually it is "postmaster".

12. helohost
It is the host name used in SMTP HELO command

13. idhost
It is host name of server. It is used when creating Message-ID.

13. localiphost
It is local IP address

14. locals
List of all local domains.

15. me
It is the hostname of server

16. morercpthosts
Only 50 domains can be added in rcpthosts, remaining domains should be in morercpthosts.

17. queuelifetime
It is the number of seconds an email can remain in queue

18. rcpthosts
Domains of all locally hosted email addresses.

19 smtpgreeting
It is the SMTP greeting message used by mail server.

20. timeoutconnect
Time in seconds, the server has to wait for SMTP connection

21. timeoutremote
Time in seconds, server has to wait for remote server

22. timeoutsmtpd
Time in seconds, server has to wait for SMTP client

23. virtualdomains
List of all virtual domains
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Posted in | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • unable connect to socket: No route to host (113)
    Guys, This error message usually comes when you try to access remote linux desktop using vncviewer. Please check the firewall in the linux s...
  • NDMP communication failure error
    Guys, Issue : Netbackup server sends alert NDMP communication failure once everyday. But there is no issue to run scheduled backup jobs. Env...
  • what does it mean by "cman expected_votes="1" two_node="1" in cluster.conf ?
    For two node clusters ordinarily, the loss of quorum after one out of two nodes fails will prevent the remaining node from continuing (if bo...
  • How to make bridge over VLAN?
    How to make bridge over VLAN? Bridging over VLAN's : By constructing a bridge between a "normal" and a "VLAN" ethern...
  • How to verify UDP packet communication between two linux system?
    Guys, Today, I had to check UDP packet communication between linux and a windows system. Main purpose of the windows system was to capturing...
  • How to install pdo_mysql module with php on 64 bit linux machine?
    Guys, The PHP Data Objects (PDO) extension defines a lightweight, consistent interface for accessing databases in PHP. Each database driver ...
  • configure: error: C preprocessor "/lib/cpp" fails sanity check + Resolved
    Guys, I got that error messages when I was going to configure any software on the linux server. I was unable to execute easyapache or ./conf...
  • configure: error: could not find library containing RSA_new
    Guys, It seems you have enabled the SSL option during configuring the package. Please either resolve that dependency or disable the SSL opti...
  • Cannot find config.m4 + phpize +Resolved
    Guys, I got the same error messages and sorted out it. Here is the error that I got. ===== root@server [/home/cpeasyapache/src/php-5.2.9/ext...
  • How to redirect output of script to a file(Need to save log in a file and file should be menioned in the script itself?
    Expectation : @subject Steps : 1. Create a bash script. 2. add line : exec > >(tee /var/log/my_logfile.txt) That's it. All output ...

Categories

  • ACL
  • ESX
  • Linux
  • Storage
  • UCS

Blog Archive

  • ►  2013 (5)
    • ►  May (1)
    • ►  April (3)
    • ►  February (1)
  • ►  2012 (10)
    • ►  July (1)
    • ►  June (1)
    • ►  April (1)
    • ►  March (3)
    • ►  February (3)
    • ►  January (1)
  • ►  2011 (86)
    • ►  December (3)
    • ►  November (2)
    • ►  September (19)
    • ►  August (9)
    • ►  July (5)
    • ►  June (9)
    • ►  May (12)
    • ►  April (3)
    • ►  March (4)
    • ►  February (5)
    • ►  January (15)
  • ▼  2010 (152)
    • ►  December (9)
    • ►  November (34)
    • ►  October (20)
    • ►  September (14)
    • ►  August (24)
    • ►  July (19)
    • ►  June (3)
    • ▼  May (25)
      • Log message analysis of Qmail :
      • Directory structure of Qmail :-
      • How to install Qmail?
      • How to configure alias, forwarder, virtual domain ...
      • How to configure alias, forwarder, virtual domain ...
      • Qmail : How does it work ?
      • Cannot lock Container
      • Make swap partition
      • Automatic adjustment of Container
      • MLAT/cpulimit/cpuunits
      • Validating Container Configuration(VPS)
      • Monitoring Memory Consumption
      • Monitor resources usage of VPS
      • Managa VPS resources :
      • Virtuzoo commands
      • Increase connection speed of FTP server
      • Add IP and route
      • Plesk Config & Binary file
      • Exim comman cheet sheet
      • spam check on linux server
      • How to create swap space on linux system?
      • Resource control hardware node
      • List iptable rules
      • Virtuozzo Command Line Utilities
      • Virtuozzo Configuration Files
    • ►  April (3)
    • ►  January (1)
Powered by Blogger.