Linked Search

Monday, October 25, 2010

Qmail Server Questions

Q: - What is procmail ?
Procmail is a popular Message Delivery Agent (MDA). The function of an MDA is to accept a message from the MTA for a specific user or mailbox, and deliver the message according to the user's desires. procmail can be used to "filter" messages by the content of various header fields or the body of the message.

Q: - What is maildir ?
Maildir is a mailbox format created by Dan Bernstein to address the shortcomings of the mbox format. A maildir mailbox is a directory containing three subdirectories, new, cur, and tmp. Each message in a maildir mailbox is in a separate file in one of the subdirectories, depending upon its status: new is for unread messages, cur is for messages that have been seen, and tmp is for messages in the process of being delivered.

Q: - Which qmail process use "concurrecylocal" control file ?
qmail-send

Q: - Which Groups and Users are required to start QMAIL Server ?
Groups :- nofiles
qmail
Users :- qmaild
alias
qmaill
qmailp
qmailq
qmailr
qmails

Q: - What is the role of "qmail-send" process ?

qmail-send - deliver mail messages from the queue

Q: - What is the location of qmail control files ?

/var/qmail/control

Q: - How to check, qmail server is up or down ?

We can use qmailctl command to check the status of qmail server.
# qmailctl stat
/service/qmail-send: up (pid 30303) 187 seconds
/service/qmail-send/log: up (pid 30304) 187 seconds
/service/qmail-smtpd: up (pid 30305) 187 seconds
/service/qmail-smtpd/log: up (pid 30308) 187 seconds
messages in queue: 0
messages in queue but not yet preprocessed: 0

Q: - What is QMAIL ?

Qmail is a mail transfer agent that runs on Unix/Linux. It was written, starting December 1995, by Daniel J. Bernstein as a more secure replacement for the popular Sendmail program. qmail's source code is released to the public domain, making qmail free software.

Q: - Explain the working of qmail?

For mail arriving from remote systems, tcpserver runs as a daemon listening for incoming connections on the SMTP port. Each time a connection arrives, it runs qmail-smtpd, which receives a message via SMTP and calls qmail-queue to queue the message. Regardless of where the message originates, qmail-queue writes the message to a temporary file in the queue/todo directory, putting a new Received: line at the top, and also saves the envelope sender and recipient addresses to files. Then it notifies qmail-send by writing a byte to a "trigger" socket file. qmail-send takes the message out of queue/todo, and analyzes each recipient address to see if it's local, remote, or virtual. For local addresses, it notifies qmail-lspawn to run qmail-local to do the local deliveries. For each remote address, qmail-send notifies qmail-rspawn to run qmail-remote to do the remote deliveries. For virtual addresses, qmail-send rewrites each virtual address as a modified local address, using the information from the virtualdomains files.

Q: - What is Courier-imap ?

A server that provides IMAP access to Maildir mailboxes. This IMAP server does NOT handle traditional mailbox files (/var/spool/mail, and derivatives), it was written for the specific purpose of providing IMAP access to Maildirs.

Q: - What is “
ucspi-tcp”?

A package for servers that respond to incoming TCP connections, as an alternative to the old inetd daemon. It used to be optional, but its tcpserver is now the only supported way to run qmail's SMTP daemon.

Q: - What is “
checkpassword”?

If you're using qmail's built-in POP3 server, you want Dan's checkpassword program, which validates user logins as well. Even if you're installing an alternative checkpassword, it's nice to have Dan's checkpassword installed for testing.

Q: - Which
Mailbox Format is used by Qmail?

Qmail supports two mailbox formats: the traditional mbox and Dan's newer Maildir.

Q: - Explain qmail control file “me”?

The name of this host, e.g., mail.test.com. This provides the default to use for many other configuration files.

Q: - Explain about qmail control file “
locals”?

Domain names to be delivered locally, one per line. Mail to any domain listed in locals is delivered by treating the mailbox part as a local address. This usually contains the name of the host and the name of the domain used for user mailboxes, such as test.com and mail.test.com.

Q: - Explain about qmail control file “
rcpthosts”?

Domains for which this host should accept mail via SMTP. This generally contains all of the domains in locals, as well as any virtual domains and any domains for which this host is a backup mail server. If rcpthosts does not exist, qmail accepts and delivers mail for any domain, a severe misconfiguration known as an "open relay," which will be hijacked by spammers. Be sure your rcpthosts file exists before starting qmail. If you haven't defined any virtual domains, just copy locals to rcpthosts.

Q: - Explain about qmail control file “
badmailfrom”?

This qmail control file is used by qmail-smtpd. Envelope addresses not allowed to send mail. If the envelope from address on an incoming message matches an entry in badmailfrom, the SMTP daemon will reject every recipient address. Entries may be either email addresses, or @domain to reject every address in a domain. This is a primitive form of spam filtering.

Q: - What is the use of “
bouncefrom” qmail control file?

This qmail control file is used by qmail-send daemon. This file contains the mailbox of the return address to put in bounce messages.

Q: - What is use of “
concurrencylocal” qmail control file?

This qmail control file is used by qmail-send daemon. This file contains the maximum number of simultaneous local deliveries. The default value is 10.

Q: - What is use of “
concurrencyremotel” qmail control file?

This qmail control file is used by qmail-send daemon. This file contains the maximum number of simultaneous remote deliveries. The default value is 20.

Q: - What is the use of “
queuelifetime” qmail control file?

This qmail control file is used by qmail-send daemon. In this file we define how long to keep trying to deliver a message. The default value is 604800 seconds (a week).

Q: - What is the use of “
timeoutconnect” qmail control file?

This qmail control file is used by qmail-remote daemon. In this file we define how long to wait for a remote server to accept the initial connection to send mail. The default value is 60 seconds.

Q: - What is the use of “
virtualdomains” qmail control file?

The list of virtual users and domains for which this system receives mail. The default value in this file is none.

Q: - How to rebuild the SMTP access database?

qmailctl cdb    
or
tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
chmod 644 /etc/tcp.smtp*

Q: - Which mailing list you have configured with qmail?

EZmlm

Q: - Have you installed autoresponder & what is the use of autoresponder?
Yes, this is a simple program to automatically respond to emails.

Q: - what is vpopmail?
vpopmail is a free GPL software package, to provide an easy way to manage virtual e-mail domains and non /etc/passwd e-mail accounts on your qmail server.

Q: -
Why vpopmail?
vpopmail provides a good set of management tools and a reasonably well designed structure which saves you implementing your own. vpopmail has also been around for a long time and enjoys support from a lot of other software packages related to mail which makes integration fairly simple.

Q: - Tell me the location of vpopmail binaries?

/home/vpopmail/bin

Q: - What is the use of vadddomain command?

Vadddomain command is used to adds a new domain to the qmail server

Q: - What is “vchkpw”?

vchkpw is the authentication mechanism used by qmail to check passwords required for downloading mail, and in the case of SMTP_AUTH, sending mail.

Q: - can vpopmail integrated with MySQL database?
Yes

Q: - Which web based interface you have used to manage vpopmail?

Vqadmin

Q: - What is maildrop?

Maildrop is a mail filtering agent which can be used to filter messages as they arrive on the server.

Q: - What is Qmailadmin?

Qmailadmin is going to provide us with a nice web based interface for administering mail accounts once they are setup through Vpopmail (or Vqadmin). From Qmailadmin we can create mailboxes, aliases, forwards, mail robots, mailing lists.

Q: - Which antivirus you have used with Qmail?

ClamAV antivirus

Q: - Where Clam AV quarantines the e-mails?

Clam AV quarantines the e-mails in /var/spool/qmailscan/quarantine

Q: - By which user we run ClamAV?

qscand user

Q: - Can I have Spamassassin tag suspected spam with a custom subject line?

Yes. Edit the /var/qmail/bin/qmail-scanner-queue.pl file and find the following line:
my $spamc_subject=`:SPAM:`;
Now type a custom spam subject. This subject line will be added to any mails that Spamassassin tags as suspected spam. Here's an example:
my $spamc_subject=`This is Spam Mail`;

Q: - When compiling qmail, I get the following error:

qmail-remote.c:36: openssl/ssl.h: No such file or directory

what' s wrong there?

openssl and libssl-dev packages are required for qmail compiling.
Check these packages are installed or not

Q: - How can I disable qmail from conducting reverse DNS lookups on SMTP connections?

This can be done by adding a "-H" flag to the tcpserver call within the qmail-smtpd supervise script.
/usr/local/bin/tcpserver -v -R -H -l "$LOCAL" -x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \

Q: - I am running qmail-scanner with Spamassassin and ClamAV. When I run the qmail-scanner test script or when I
view my logs, I see the following error: qmail-inject: fatal: qq temporary problem Bad error. qmail-inject died

This can be fixed by raising the "softlimit" setting within the /var/qmail/supervise/qmail-smtpd file.

Q: - I'm getting the following error concerning Vpopmail: configure: error: No vpopmail etc/lib_deps file. Upgrade to vpopmail-4.9.8 or above.... What's wrong?

This error is usually caused when installing Vpopmail over a previous Vpopmail installation. Try completely removing the /home/vpopmail directory and then install a fresh copy of Vpopmail. That should clear it up.

Q: - When I test qmail-scanner, I get an error that states: "can't do suid". What's wrong?
Your server is not set up to allow for setuid execution of scripts. The easiest way to fix this is to install the "perl-suidperl" package. If you're running Redhat, you can download the latest RPM of perl-suidperl.