qmail-logo-fixing-qmail-mail-smtp-port-25-connect-delayslogo_clamavspamassassin-logoDovecot-logosmmysql-logo-1

 

Introduction:
Qmail is a secure, reliable, efficient, simple message transfer agent. It is meant as a replacement for the entire sendmail-binmail system on typical Internet-connected UNIX hosts.

qmail’s straight-paper-path philosophy guarantees that a message, once accepted into the system, will never be lost. qmail also supports maildir, a new, super-reliable user mailbox format. Maildirs, unlike mbox files and mh folders, won’t be corrupted if the system crashes during delivery. Even better, not only can a user safely read his mail over NFS, but any number of NFS clients can deliver mail to him at the same time.

On a Pentium under BSD/OS, qmail can easily sustain 200000 local messages per day—that’s separate messages injected and delivered to mailboxes in a real test! Although remote deliveries are inherently limited by the slowness of DNS and SMTP, qmail overlaps 20 simultaneous deliveries by default, so it zooms quickly through mailing lists.

Other MTAs have separate forwarding, aliasing, and mailing list mechanisms. qmail has one simple forwarding mechanism that lets users handle their own mailing lists.

Other MTAs offer a spectrum of delivery modes, from fast+unsafe to slow+queued. qmail- send is instantly triggered by new items in the queue, so the qmail system has just one delivery mode: fast+queued.

Other MTAs include, in effect, a specialized version of inetd that watches the load average. qmail’s design inherently limits the machine load, so qmail-smtpd can safely run from your system’s inetd.

Replacement for sendmail: qmail supports host and user masquerading, full host hiding, virtual domains, null clients, list-owner rewriting, relay control, double-bounce recording, arbitrary RFC 822 address lists, cross-host mailing list loop detection, per-recipient checkpointing, downed host backoffs, independent message retry schedules, etc. In short, it’s up to speed on modern MTA features. qmail also includes a drop-in “sendmail” wrapper so that it will be used transparently by your current UAs.

 

 

Required packages:

 

netqmail-1.06.tar.gz

qmail is a secure, reliable, efficient, simple message transfer agent. It is designed for typical Internet-connected UNIX hosts. As of October 2001, qmail is the second most common SMTP server on the Internet, and has by far the fastest growth of any SMTP server.

 

ucspi-tcp-0.88.tar.gz

It is a tool similar to inetd. ucspi-tcp listens in 25 port and spawns qmail-smtpd when required. ucspi-tcp stands for Unix Client Server Program Interface for TCP.

 

daemontools-0.76.tar.gz

daemontools is actually a tool to manage & monitor daemons linux. It is used in qmail as well to manage qmail daemons.

 

checkpassword-0.90.tar.gz

checkpassword provides a simple, uniform password-checking interface to all root applications. It is suitable for use by applications such as login, ftpd, and pop3d.

 

qmail-smtpd-auth-0.31.tar.gz

This patch enables SMTP AUTH protocol with following auth types: LOGIN, PLAIN and CRAM-MD5.

 

vpopmail-5.4.33.tar.gz

Vpopmail allows us to do virtual domain mail hosting

 

dovecot-1.2.6.tar.gz

Dovecot is an open source IMAP and POP3 server for Linux/UNIX-like systems, written primarily with security in mind

 

 

Configuration:

#yum install gcc gcc-c++ make patch pam-devel openssl* wget vim-common vim-enhanced -y

#cd /usr/local/src

#wget http://www.qmail.org/netqmail-1.06.tar.gz
#wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
#wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz
#wget http://cr.yp.to/checkpwd/checkpassword-0.90.tar.gz
#wget http://tomclegg.net/qmail/qmail-smtpd-auth-0.31.tar.gz
#wget http://garr.dl.sourceforge.net/project/vpopmail/vpopmail-stable/5.4.33/vpopmail-5.4.33.tar.gz
#wget http://www.dovecot.org/releases/1.2/dovecot-1.2.6.tar.gz
wget http://www.suspectclass.com/sgifford/ucspi-tls/files/ucspi-ssl-0.70.2-sg.tar.gz

 

 

Create users and groups

#groupadd -g 1161 nofiles
#groupadd -g 1162 qmail

#useradd -u 1161 -g nofiles -d /var/qmail/alias -s /usr/sbin/nologin -p’*’ -c ‘QMail alias user’ alias
#useradd -u 1162 -g nofiles -d /var/qmail -s /usr/sbin/nologin -p’*’ -c ‘QMail daemon user’ qmaild
#useradd -u 1163 -g nofiles -d /var/qmail -s /usr/sbin/nologin -p’*’ -c ‘QMail log user’ qmaill
#useradd -u 1164 -g nofiles -d /var/qmail -s /usr/sbin/nologin -p’*’ -c ‘QMail password user’ qmailp
#useradd -u 1165 -g qmail -d /var/qmail -s /usr/sbin/nologin -p’*’ -c ‘QMail queue user’ qmailq
#useradd -u 1166 -g qmail -d /var/qmail -s /usr/sbin/nologin -p’*’ -c ‘QMail remote user’ qmailr
#useradd -u 1167 -g qmail -d /var/qmail -s /usr/sbin/nologin -p’*’ -c ‘QMail send user’ qmails

 

Compile & Install

#cd /usr/local/src
#tar -xzvf netqmail-1.06.tar.gz
#cd /usr/local/src
#tar -xzvf qmail-smtpd-auth-0.31.tar.gz

#cd qmail-smtpd-auth-0.31/
#cp README.auth base64.c base64.h ../netqmail-1.06
#patch -d ../netqmail-1.06 < auth.patch

 

 

Compile & install qmail.

#cd /usr/local/src/netqmail-1.06
#make setup check
#./config-fast mail.bhuvana.com

 

Configure Qmail aliases.
Create a user named “admin” to receive all administrator emails.

#useradd admin
#echo admin > /var/qmail/alias/.qmail-root
#echo admin > /var/qmail/alias/.qmail-postmaster
#ln -s /var/qmail/alias/.qmail-postmaster /var/qmail/alias/.qmail-mailer-daemon
#ln -s /var/qmail/alias/.qmail-postmaster /var/qmail/alias/.qmail-abuse
#chmod 644 /var/qmail/alias/.qmail-postmaster /var/qmail/alias/.qmail-root

 

Configure Qmail to use Maildir

Create “/var/qmail/rc” with following contents.
#vi /var/qmail/rc
#!/bin/sh
exec env – PATH=”/var/qmail/bin:$PATH” \
qmail-start “`cat /var/qmail/control/defaultdelivery`”

#chmod 755 /var/qmail/rc

 

Replace Sendmail binaries

#rpm -e –nodeps sendmail -y
#chmod 0 /usr/lib/sendmail
#chmod 0 /usr/sbin/sendmail
#mv /usr/lib/sendmail /usr/lib/sendmail.bak
#mv /usr/sbin/sendmail /usr/sbin/sendmail.bak
#ln -s /var/qmail/bin/sendmail /usr/lib/sendmail
#ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail

 

Install ucspi-tcp by untar the ucspi-tcp source.

#cd /usr/local/src/
#tar -xzvf ucspi-tcp-0.88.tar.gz
#cd ucspi-tcp-0.88
#patch < /usr/local/src/netqmail-1.06/other-patches/ucspi-tcp-0.88.errno.patch
#make
#make setup check

 

Install ucspi-ssl by untar the ucspi-ssl source.

#cd /usr/local/src/
#tar -xzvf ucspi-ssl-0.70.2-sg.tar.gz
#cd ucspi-ssl-0.70.2-sg
#package/install

 

Install checkpassword

#cd /usr/local/src
#tar -xzvf checkpassword-0.90.tar.gz
#cd checkpassword-0.90
#patch < /usr/local/src/netqmail-1.06/other-patches/checkpassword-0.90.errno.patch
#make
#make setup check

 

Install daemontools

#mkdir /package
#mv /usr/local/src/daemontools-0.76.tar.gz /package
#chmod 1755 /package
#cd /package
#tar -xzvf daemontools-0.76.tar.gz
#cd /package/admin/daemontools-0.76/src
#patch < /usr/local/src/netqmail-1.06/other-patches/daemontools-0.76.errno.patch
#cd ..
#package/install

 

Installing mysql

#yum install mysql mysql-server -y
#mkdir /var/vpopmail/etc
#chmod 770 /var/vpopmail
#echo “localhost|0|vpopmailuser|password|vpopmail” > /var/vpopmail/etc/vpopmail.mysql
#chmod 640 /var/vpopmail/etc/vpopmail.mysql
#chown vpopmail:vchkpw /var/vpopmail/etc/vpopmail.mysql
#chkconfig mysqld –level 2345 on
#service mysqld start
#/usr/bin/mysql_secure_installation

#mysql -u root -p
mysql > CREATE DATABASE vpopmail;
mysql > GRANT select,insert,update,delete,create,drop ON vpopmail.* TO vpopmailuser@localhost IDENTIFIED BY ‘password’;
mysql > quit;

test the account vpopmailuser

#mysql -u vpopmailuser -p password

 

 

Installing vpopmail

#groupadd -g 1189 vchkpw
#useradd -u 1189 -g vchkpw -d /var/vpopmail -s /usr/sbin/nologin -p’*’ -c ‘Vpopmail (virtual domains) user’ vpopmail

#cd /usr/local/src
#tar -xzf vpopmail-5.4.33.tar.gz
#cd vpopmail-5.4.33

#./configure –enable-logging=p –enable-auth-module=mysql –disable-passwd –enable-clear-passwd –enable-many-domains –enable-sql-logging –enable-auth-logging –enable-incdir=/usr/include/mysql –enable-libdir=/usr/lib64/mysql –disable-mysql-limits –disable-roaming-users && #make && make install-strip

#chown -R vpopmail:vchkpw /var/vpopmail
#chmod 770 /var/vpopmail

 

 

Installing Dovecot

#useradd -u 1193 -s /usr/sbin/nologin dovecot

#cd /usr/local/src
#tar xzf dovecot-1.2.6.tar.gz
#cd dovecot-1.2.6
#./configure –with-ioloop –with-notify –with-sslopenssl –with-passwd –with-passwd-file –with-shadow –with-pam –with-checkpassword –with-vpopmail –with-static-userdb && make && make install
#mkdir -p /etc/ssl/certs
#mkdir -p /etc/ssl/private
#cd doc
#chmod 755 mkcert.sh
#./mkcert.sh

 

Installing certificate

#cd /usr/local/src
#openssl req -x509 -nodes -days 365 -subj ‘/C=IN/ST=TN/L=Chennai/CN=mail.bhuvana.com’ -newkey rsa:1024 -keyout servercert.pem -out servercert.pem
#cat /usr/local/src/servercert.pem > /var/qmail/control/servercert.pem
#chown root:qmail /var/qmail/control/servercert.pem
#chmod 644 /var/qmail/control/servercert.pem
#ln -s /var/qmail/control/servercert.pem /var/qmail/control/clientcert.pem

 

#vi /usr/local/etc/dovecot.conf

protocols = imap imaps
disable_plaintext_auth = no
ssl = yes
ssl_cert_file = /etc/ssl/certs/dovecot.pem
ssl_key_file = /etc/ssl/private/dovecot.pem
first_valid_uid = 1189
first_valid_gid = 1
passdb vpopmail {
}
userdb vpopmail {
}

 

#vi /etc/init.d/dovecot

#!/bin/bash
. /etc/init.d/functions
RETVAL=0
prog=”Dovecot Imap”
exec=”/usr/local/sbin/dovecot”
config=”/usr/local/etc/dovecot.conf ”
pidfile=”/usr/local/var/run/dovecot/master.pid”
lockfile=”/var/lock/subsys/dovecot”
start() {
[ $UID -eq 0 ] || exit 4
[ -x $exec ] || exit 5
[ -f $config ] || exit 6

echo -n $”Starting $prog: ”
daemon –pidfile $pidfile $exec $OPTIONS
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $lockfile
echo
}
stop() {
[ $UID -eq 0 ] || exit 4
echo -n $”Stopping $prog: ”
killproc -p $pidfile $exec
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f $lockfile
echo
}
reload() {
[ $UID -eq 0 ] || exit 4
echo -n $”Reloading $prog: ”
killproc -p $pidfile $exec -HUP
RETVAL=$?
echo
}
#
# See how we were called.
#
case “$1″ in
start)
start
;;
stop)
stop
;;
reload)
reload
;;
force-reload|restart)
stop
sleep 1
start
RETVAL=$?
;;
condrestart|try-restart)
if [ -f $lockfile ]; then
stop
sleep 3
start
fi
;;
status)
status -p $pidfile $exec
RETVAL=$?
;;
*)
echo $”Usage: $0 {condrestart|try-restart|start|stop|restart|reload|force-reload|status}”
RETVAL=2
[ “$1” = ‘usage’ ] && RETVAL=0
esac

exit $RETVAL

 

#vi /etc/pam.d/dovecot

auth required pam_unix.so nullok
account required pam_unix.so
#chmod 755 /usr/local/etc/dovecot.conf
#chmod 755 /etc/init.d/dovecot

 

 

Instaling clamav

Clam AntiVirus (ClamAV) is a free, cross-platform antivirus software tool-kit able to detect many types of malicious software, including viruses. One of its main uses is on mail servers as a server-side email virus scanner.

#groupadd -g 1190 clamav
#useradd -u 1190 -g clamav -d /tmp -s /usr/sbin/nologin clamav

#cd /usr/local/src
#wget http://mirror.trouble-free.net/sources/clamav-0.97.6.tar.gz
#tar -xzf clamav-0.97.6.tar.gz
#cd clamav-0.97.6
#./configure && make && make install
#vi /usr/local/etc/clamd.conf

#Example
PidFile /var/run/clamd/clamd.pid
DatabaseDirectory /usr/local/share/clamav
FixStaleSocket yes
TCPSocket 3310
TCPAddr 127.0.0.1
User simscanForeground yes
ScanMail yes
PhishingSignatures yes
PhishingScanURLs yes
ScanHTML yes
ScanArchive yes

 

#vi /usr/local/etc/freshclam.conf

#Example
DatabaseDirectory /usr/local/share/clamav
PidFile /var/run/clamd/freshclam.pid
DatabaseOwner simscan
DNSDatabaseInfo current.cvd.clamav.net
DatabaseMirror database.clamav.net
ScriptedUpdates yes
CompressLocalDatabase no

#chmod 744 /usr/local/etc/clamd.conf
#chmod 744 /usr/local/etc/freshclam.conf
#mkdir /var/run/clamav
#chown -R simscan:simscan /var/run/clamav

#touch /var/log/clamd/freshclam.log

#chmod 600 /var/log/clamd/freshclam.log
#mkdir /usr/local/share/clamav
#chown -R clamv:clamav /usr/local/share/clamav
#touch /var/log/clamd/freshclam.log
#chmod 600 /var/log/clamd/freshclam.log

 

#vi /etc/init.d/clamdctl

#!/bin/sh
# description: the clamav daemon
case “$1” in
start)
echo “Starting the clamav daemon clamd…”
/usr/local/sbin/clamd
;;
stop)
echo “Stopping the clamav daemon clamd…”
kill `cat /var/run/clamd/clamd.pid`
;;
restart)
echo “Restarting the clamav daemon clamd…”
/etc/init.d/clamdctl stop
/etc/init.d/clamdctl start
;;
help)
cat <<HELP
stop — stops the clamav daemon
start — starts the clamav daemon
restart — stops and restarts clamd
HELP
;;
*)
echo $“Usage: $0 {start|stop|restart|help}”
exit 1
;;
esac
exit 0

 

#vi /etc/init.d/freshclam

#!/bin/sh
# chkconfig: 2345 80 30
# description: Freshclam daemon to update the ClamAV virus signatures
COMMAND=$1
if [ “$COMMAND” == “start” ] ; then
echo -n “Starting freshclam daemon … ”
/usr/local/bin/freshclam -d
echo ” done.”
exit
elif [ “$COMMAND” == “stop” ] ; then
echo -n “Stopping freshclam daemon … ”
killall -TERM freshclam
echo ” done.”
exit
else
echo “usage: $0 start|stop”
exit
fi
#vi /etc/logrotate.d/freshclam

/var/log/freshclam.log {
daily
notifempty
missingok
postrotate
/usr/bin/killall -HUP freshclam 2> /dev/null || true
endscript
}

 

Installing SpamAssassin

SpamAssassin is a mail filter to identify spam. It is an intelligent email filter which uses a diverse range of tests to identify unsolicited bulk email, more commonly known as Spam. These tests are applied to email headers and content to classify email using advanced statistical methods.

#groupadd -g 1191 spamd
#useradd -u 1191 -g spamd -d /etc/mail/spamassassin -s /usr/sbin/false -m spamd

#yum install mod_perl.x86_64 mod_perl-devel.x86_64 perl-CPAN -y

#cd /usr/local/src
#wget http://www.cpan.org/authors/id/K/KM/KMCGRAIL/Mail-SpamAssassin-3.3.2.tar.gz

#tar -xzf Mail-SpamAssassin-3.3.2.tar.gz
#cd Mail-SpamAssassin-3.3.2

#perl -MCPAN -e shell

#conf > o conf commit prerequisites_policy ask

#conf >Digest::SHA HTML::Parser Net::DNS NetAddr::IP Time::HiRes Archive::Tar Mail::SPF IO::Zlib IP::Country Net::Ident IO::Socket::INET6 IO::Socket::SSL IO::Compress Mail::DKIM libwww::perl DBI HTTP::Date Encode::Detect Mail::SpamAssassin Digest::HMAC Digest::MD5 MIME::Base64 Test::Harness Test::Simple Mail::SpamAssassin::Plugin:Razor2

#conf > o conf commit prerequisites_policy ask
#conf > quit

 

Installing Razor2

Vipul’s Razor is a checksum-based, distributed, collaborative, spam-detection-and-filtering network.Detection is done with statistical and randomized signatures that efficiently spot mutating spam content.

#cd /usr/local/src

#wget http://kaz.dl.sourceforge.net/project/razor/razor-agents-sdk/2.07/razor-agents-sdk-2.07.tar.bz2
#wget http://kaz.dl.sourceforge.net/project/razor/razor-agents/2.85/razor-agents-2.85.tar.bz2

#tar -xjf razor-agents-sdk-2.07.tar.bz2
#cd razor-agents-sdk-2.07
#perl Makefile.PL && make && make install

#cd ..
#tar -xjf razor-agents-2.85.tar.bz2
#cd razor-agents-2.85
#perl Makefile.PL && make && make install

 

#vi /etc/mail/spamassassin/local.cf

rewrite_header Subject *****SPAM*****
report_contact postmaster@bhuvana.com
required_score 5.0
skip_rbl_checks 1
use_razor2 1
razor_config /var/qmail/simscan/.razor/razor-agent.conf
score RAZOR2_CHECK 5.00
use_bayes 1
bayes_auto_learn 1
bayes_file_mode 0700
bayes_path /etc/mail/spamassassin/.spamassassin/bayes
bayes_auto_learn_threshold_spam 8.0
ok_languages all
ok_locales all
add_header spam Flag _YESNOCAPS_
bayes_ignore_header X-Bogosity
bayes_ignore_header X-Spam-Flag
bayes_ignore_header X-Spam-Status
bayes_ignore_header X-Spam-Level
bayes_ignore_header X-Spam-Checker-Version
loadplugin Mail::SpamAssassin::Plugin::Razor2
#mkdir /var/qmail/simscan/.razor
#chmod -R simscan:simscan /var/qmail/simscan
#razor-admin -home=/var/qmail/simscan/.razor -register
#razor-admin -home=/var/qmail/simscan/.razor -create
#razor-admin -home=/var/qmail/simscan/.razor -discover

 

#echo “loadplugin Mail::SpamAssassin::Plugin::Razor2” >> /etc/mail/spamassassin/init.pre
#echo “loadplugin Mail::SpamAssassin::Plugin::Razor2” >> /etc/mail/spamassassin/v310.pre

#echo “loadplugin Mail::SpamAssassin::Plugin::AWL” >> /etc/mail/spamassassin/v310.pre

#echo “loadplugin Mail::SpamAssassin::Plugin::AutoLearnThreshold” >> /etc/mail/spamassassin/v310.pre
#echo “loadplugin Mail::SpamAssassin::Plugin::WhiteListSubject” >> /etc/mail/spamassassin/v310.pre
#echo “loadplugin Mail::SpamAssassin::Plugin::MIMEHeader” >> /etc/mail/spamassassin/v310.pre
#echo “loadplugin Mail::SpamAssassin::Plugin::ReplaceTags” >> /etc/mail/spamassassin/v310.pre

#echo “loadplugin Mail::SpamAssassin::Plugin::Check” >> /etc/mail/spamassassin/v320.pre
#echo “loadplugin Mail::SpamAssassin::Plugin::HTTPSMismatch” >> /etc/mail/spamassassin/v320.pre
#echo “loadplugin Mail::SpamAssassin::Plugin::URIDetail” >> /etc/mail/spamassassin/v320.pre
#echo “loadplugin Mail::SpamAssassin::Plugin::Bayes” >> /etc/mail/spamassassin/v320.pre
#echo “loadplugin Mail::SpamAssassin::Plugin::BodyEval” >> /etc/mail/spamassassin/v320.pre
#echo “loadplugin Mail::SpamAssassin::Plugin::DNSEval” >> /etc/mail/spamassassin/v320.pre
#echo “loadplugin Mail::SpamAssassin::Plugin::HTMLEval” >> /etc/mail/spamassassin/v320.pre
#echo “loadplugin Mail::SpamAssassin::Plugin::HeaderEval” >> /etc/mail/spamassassin/v320.pre
#echo “loadplugin Mail::SpamAssassin::Plugin::MIMEEval” >> /etc/mail/spamassassin/v320.pre
#echo “loadplugin Mail::SpamAssassin::Plugin::RelayEval” >> /etc/mail/spamassassin/v320.pre
#echo “loadplugin Mail::SpamAssassin::Plugin::URIEval” >> /etc/mail/spamassassin/v320.pre
#echo “loadplugin Mail::SpamAssassin::Plugin::WLBLEval” >> /etc/mail/spamassassin/v320.pre
#echo “loadplugin Mail::SpamAssassin::Plugin::VBounce” >> /etc/mail/spamassassin/v320.pre
#echo “loadplugin Mail::SpamAssassin::Plugin::ImageInfo” >> /etc/mail/spamassassin/v320.pre

#echo “loadplugin Mail::SpamAssassin::Plugin::RelayCountry” >> /etc/mail/spamassassin/init.pre
#echo “loadplugin Mail::SpamAssassin::Plugin::URIDNSBL” >> /etc/mail/spamassassin/init.pre
#echo “loadplugin Mail::SpamAssassin::Plugin::ImageInfo” >> /etc/mail/spamassassin/init.pre
#echo “razorhome = /var/qmail/simscan/.razor/” >> /var/qmail/simscan/.razor/razor-agent.conf
#chown -R simscan:simscan /var/qmail/simscan/
#chown root:simscan /var/qmail/simscan/.razor/razor-agent.conf
#cp /usr/local/src/conf/local.cf /etc/mail/spamassassin/local.cf
#ln -s /usr/local/bin/spamassassin /etc/bin
#sa-update

 

#vi /etc/init.d/spamdctl

#!/bin/sh
# description: the spamassassin daemon
case “$1” in
start)
echo “Starting the spamassassin daemon spamd…”
/service/spamd/run
#spamd -x -u spamd -H /etc/mail/spamassassin -s /var/log/spamd.log -d –pidfile /var/run/spamd/spamd.pid
;;
stop)
echo “Stopping the spamassassin daemon spamd…”
kill `cat /var/run/spamd/spamd.pid`
;;
restart)
echo “Restarting the spamassassin daemon spamd…”
/etc/init.d/spamdctl stop
/etc/init.d/spamdctl start
;;
help)
cat <<HELP
stop — stops the spamassassin daemon
start — starts the spamassassin daemon
restart — stops and restarts spamd
HELP
;;
*)
echo $“Usage: $0 {start|stop|restart|help}”
exit 1
;;
esac
exit 0
#vi /etc/logrotate.d/spamd

/var/log/spamd {
daily
notifempty
missingok
postrotate
/usr/bin/killall -HUP spamd 2> /dev/null || true
endscript
}
#mkdir /var/run/spamd
#chown -R spamd:spamd /var/run/spamd

 

Installing Ripmime

ripMIME’s primary pupose is to extract attachments out of a MIME encoded email packages.

#cd /usr/local/src
#wget http://www.pldaniels.com/ripmime/ripmime-1.4.0.10.tar.gz
#tar xzf ripmime-1.4.0.10.tar.gz
#cd ripmime-1.4.0.10
#mkdir -p /usr/local/man/man1
#make && make install

 

Installing Simscan

Simscan enables qmail to reject viruses, spam, and block attachments during the SMTP conversation so the email never makes it into your email server. Supports ClamAV, SpamAssassin.

#groupadd -g 1168 simscan
#useradd -u 1168 -g simscan -d /bin/false -s /usr/sbin/nologin -p’*’ -c ‘Antivirus user’ simscan

#cd /usr/local/src
#wget http://garr.dl.sourceforge.net/project/simscan/simscan/simscan-1.4.0/simscan-1.4.0.tar.gz
#wget http://qmail.jms1.net/simscan/simscan-1.4.0-combined.3.patch
#chown -R simscan:clamav /usr/local/share/clamav

#tar xzf simscan-1.4.0.tar.gz
#cd simscan-1.4.0
#patch < ../simscan-1.4.0-combined.3.patch

#./configure –enable-clamav=y –enable-custom-smtp-reject=y –enable-per-domain=y –enable-attach=y –enable-spam-passthru=y –enable-spam=y –enable-ripmime –enable-receive=y –enable-attach –enable-dropmsg –enable-spamc-user –enable-qmail-queue –enable-userclamav –enable-spam-auth-user –enable-clamavdb-path=/usr/local/share/clamav/daily.cvd

#make && make install-strip
#echo “:clam=yes,spam=yes,spam_hits=5,attach=.vbs:.lnk:.src:.wsh:.hta:.pif:.com:.exe:.hqx:.bhx:.BHX:.mim,regex=(?i)^Subject72.*server.*report:(?i)Content-.*Update-.*.zip:(?i)Content-.*body*.zip” > /var/qmail/control/simcontrol

#/var/qmail/bin/simscanmk
#/var/qmail/bin/simscanmk -g
#chown simscan:simscan /var/qmail/simscan
#chmod 2750 /var/qmail/simscan
#qmailctl cdb

 

Installing Autoresponse

It allows us to set up autoresponders for mailboxes

#cd /usr/local/src
#wget http://www.inter7.com/devel/autorespond-2.0.5.tar.gz

#tar -xzf autorespond-2.0.5.tar.gz
#cd autorespond-2.0.5
#gcc -Wall -o autorespond autorespond.c
#cp autorespond /usr/local/bin

 

Installing Ezmlm

ezmlm is a software package for managing electronic mailing lists.

#cd /usr/local/src
#wget http://untroubled.org/ezmlm/archive/7.1.1/ezmlm-idx-7.1.1.tar.gz
#tar -xzf ezmlm-idx-7.1.1.tar.gz
#cd ezmlm-idx-7.1.1
#make && make man && make install

 

Installing QmailAdmin

QmailAdmin is a web interface for managing email addresses in virtual domains created by Vpopmail.

#cd /usr/local/src
#wget http://garr.dl.sourceforge.net/project/qmailadmin/qmailadmin-devel/qmailadmin-1.2.16.tar.gz

#tar xzf qmailadmin-1.2.16.tar.gz
#cd qmailadmin-1.2.16

#./configure –enable-cgibindir=/var/www/cgi-bin/ –enable-htmldir=/var/www/cgi-bin/ –enable-imagedir=/var/www/images –enable-domain-autofill –enable-ezmlmdir=/usr/local/bin/ezmlm –enable-autoresponder-bin=/usr/local/bin/autorespond

#make && make install-strip
#yum install httpd -y
#HOSTNAME=`hostname -f`

#echo “ServerName $HOSTNAME:80” >> /etc/httpd/conf/httpd.conf
#echo “<Directory /var/www/cgi-bin>” >> /etc/httpd/conf/httpd.conf
#echo “AllowOverride None” >> /etc/httpd/conf/httpd.conf
#echo “Options None” >> /etc/httpd/conf/httpd.conf
#echo “Order allow,deny” >> /etc/httpd/conf/httpd.conf
#echo “Allow from all” >> /etc/httpd/conf/httpd.conf
#echo “</Directory>” >> /etc/httpd/conf/httpd.conf
#chmod -R 755 /var/www/cgi-bin
#chown -R apache:apache /var/www/cgi-bin

 

Installing SquirrelMail

SquirrelMail is an Open Source project that provides both a web-based email application and an IMAP proxy server.

#cd /usr/local/src
#wget http://garr.dl.sourceforge.net/project/squirrelmail/stable/1.4.22/squirrelmail-webmail-1.4.22.tar.gz
#yum install httpd php -y
#tar xzf squirrelmail-webmail-1.4.22.tar.gz
#cd squirrelmail-webmail-1.4.22
#./configure

Screenshot22

Screenshot-33

Screenshot-38

Screenshot-39

 

 

#mkdir -p /var/local/squirrelmail/data/ /var/local/squirrelmail/attach
#chown apache:apache /var/local/squirrelmail
#chown apache:apache /var/local/squirrelmail/data
#chown apache:apache /var/local/squirrelmail/attach

 

#echo “Alias /webmail /var/www/webmail” >> /etc/httpd/conf/httpd.conf
#echo “<Directory /var/www/webmail>” >> /etc/httpd/conf/httpd.conf
#echo “Options Indexes FollowSymLinks” >> /etc/httpd/conf/httpd.conf
#echo “RewriteEngine On” >> /etc/httpd/conf/httpd.conf
#echo “AllowOverride All” >> /etc/httpd/conf/httpd.conf
#echo “DirectoryIndex index.php” >> /etc/httpd/conf/httpd.conf
#echo “Order allow,deny” >> /etc/httpd/conf/httpd.conf
#echo “Allow from all” >> /etc/httpd/conf/httpd.conf
#echo “</Directory>” >> /etc/httpd/conf/httpd.conf

 

#cd ..
#mv squirrelmail-webmail-1.4.22 /var/www/
#ln -s /var/www/squirrelmail-webmail-1.4.22 /var/www/webmail
#chmod -R 755 /var/www/webmail
#chown -R apache:apache /var/www/webmail
#service httpd start
#chkconfig httpd on

 

Installing Validrcrptto

It is to verify the RCPT TO argument, and reject (at SMTP level) messages which were being sent to non-existent addresses.

#cd /usr/local/src
#wget http://qmail.jms1.net/scripts/mkvalidrcptto
#wget http://www.cpan.org/authors/id/T/TO/TODDR/CDB_File-0.97.tar.gz
#wget http://qmail.jms1.net/scripts/mkauth

#tar xzf CDB_File-0.97.tar.gz
#cd CDB_File-0.97
#perl Makefile.PL && make && make install
#cd ..
#chmod 755 pfix
#mv mkvalidrcptto /usr/local/bin
#mv mkauth /usr/local/bin
#chmod 755 /usr/local/bin/mk*
#ln -s /usr/local/bin/mkvalidrcptto /usr/bin
#ln -s /usr/local/bin/mkauth /usr/bin
#cd /var/qmail/control
#mkvalidrcptto -c /var/qmail/control/validrcptto.cdb
#mkauth -c /var/qmail/control/auth.cdb

 

Installing QmailHandle

qmHandle is a simple program which allows you to view and manage the qmail message queue.

#cd /usr/local/src
#wget http://kaz.dl.sourceforge.net/project/qmhandle/qmhandle-1.3/qmhandle-1.3.2/qmhandle-1.3.2.tar.gz

#tar xzf qmhandle-1.3.2.tar.gz
#cd qmhandle-1.3.2
#cp qmHandle /usr/local/bin
#ln -s /usr/local/bin/qmHandle /usr/bin

 

 

Installing QmQtools

Qmail queue manipulation program geared towards the viewing and safe modification of the contents in a qmail queue

#cd /usr/local/src
#wget http://jeremy.kister.net/code/qmqtool/files/qmqtool-1.14.tgz

#tar xzf qmqtool-1.14.tgz
#cd qmqtool-1.14
#./configure –perl=/usr/bin/perl –qmaildir=/var/qmail
#make && make install
#ln -s /usr/local/script/qmqtool /usr/local/bin/qmqtool
ln -s /usr/local/bin/qmqtool /usr/bin

 

Installing TinyDns

tinydns is a DNS server. It accepts iterative DNS queries from hosts around the Internet, and responds with locally configured information.

#cd /usr/local/src
#wget http://smarden.org/tinydyndns/tinydyndns-0.4.2.tar.gz
#wget http://cr.yp.to/djbdns/djbdns-1.05.tar.gz

#tar xzf djbdns-1.05.tar.gz
#tar xzf tinydyndns-0.4.2.tar.gz
#cp -r tinydyndns-0.4.2/* djbdns-1.05/
#cd djbdns-1.05

#echo “gcc -O2 -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings -include /usr/include/errno.h” > conf-cc

#make -f Makefile.tinydyndns
#make setup check
#mkdir -p /etc/tinydns/log

 

#vi /etc/tinydns/run

#!/bin/sh
PATH=/var/qmail/bin:/usr/local/bin:/usr/bin:/bin
export PATH
exec 2>&1
exec envuidgid tinydns envdir ./env softlimit -d300000 /usr/local/bin/tinydns

 

#vi /etc/tinydns/log/run

#!/bin/sh
PATH=/var/qmail/bin:/usr/local/bin:/usr/bin:/bin
export PATH
exec setuidgid gdnslog multilog t ./main

#chmod -R 1755 /etc/tinydns
#ln -s /etc/tinydns /service

 

 

Setup qmail-send & qmail-smtpdssl and Create supervise directories for qmail-send, qmail-smtpd & qmail-pop3d.

#mkdir -p /var/qmail/supervise/qmail-send/log
#mkdir -p /var/qmail/supervise/qmail-smtpd/log
#mkdir -p /var/qmail/supervise/qmail-pop3d/log
#mkdir -p /var/qmail/supervise/qmail-smtpdssl/log
#mkdir -p /var/qmail/supervise/clamd/log
#mkdir -p /var/qmail/supervise/spamd/log
#mkdir -p /var/qmail/supervise/freshclam

#mkdir /var/log/qmail
#chown -R qmaill:wheel /var/log/qmail
#chmod -R 750 /var/log/qmail

#mkdir -p /var/log/qmail/qmail-send
#mkdir -p /var/log/qmail/qmail-pop3d
#mkdir -p /var/log/qmail/qmail-smtpd
#mkdir -p /var/log/qmail/qmail-smtpssl
#mkdir -p /var/log/clamd
#mkdir -p /var/log/spamd
#chmod +t /var/qmail/supervise/qmail-smtpd
#chmod +t /var/qmail/supervise/qmail-send
#chmod +t /var/qmail/supervise/qmail-pop3d
#chmod +t /var/qmail/supervise/qmail-smtpdssl
#chmod +t /var/qmail/supervise/clamd
#chmod +t /var/qmail/supervise/spamd
#chmod +t /var/qmail/supervise/freshclam

#chown -R simscan:clamav /var/log/clamd
#chown -R simscan:spamd /var/log/spamd
#ln -s /var/log/clamd /var/log/qmail/clamav
#ln -s /var/log/spamd /var/log/qmail/spamassassin

 

#vi /var/qmail/supervise/qmail-smtpd/run

#!/bin/sh
QMAILQUEUE=”/var/qmail/bin/simscan”
export QMAILQUEUE
QMAILDUID=`id -u vpopmail`
NOFILESGID=`id -g vpopmail`
SMTPD=”/var/qmail/bin/qmail-smtpd”
HOSTNAME=”mail.bhuvana.com”
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
LOCAL=`head -1 /var/qmail/control/me`

if [ -z “$QMAILDUID” -o -z “$NOFILESGID” -o -z “$MAXSMTPD” -o -z “$LOCAL” ]; then
echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in
echo /var/qmail/supervise/qmail-smtpd/run
exit 1
fi
if [ ! -f /var/qmail/control/rcpthosts ]; then
echo “No /var/qmail/control/rcpthosts!”
echo “Refusing to start SMTP listener because it’ll create an open relay”
exit 1
fi

VALIDRCPTTO_CDB=”$VQ/control/validrcptto.cdb”
VALIDRCPTTO_LIMIT=10
VALIDRCPTTO_LOG=2

exec /usr/local/bin/softlimit -m 100000000 /usr/local/bin/tcpserver -v -R -l “$HOSTNAME” -x /etc/tcp/smtp.cdb -c “$MAXSMTPD” -u “$QMAILDUID” -g “$NOFILESGID” 0 smtp \$SMTPD /var/vpopmail/bin/vchkpw /bin/true 2>&1

 

#vi /var/qmail/supervise/qmail-smtpd/log/run

#!/bin/sh
VQ=”/var/qmail”

exec env – PATH=”$VQ/bin:/usr/local/bin:/usr/bin:/bin” \
multilog t n1024 s1048576 /var/log/qmail/qmail-smtpd \
‘-*’ ‘+*ver: status:*’ =lstatus

 

#vi /var/qmail/supervise/qmail-send/run

#!/bin/sh
exec /var/qmail/rc

 

#vi /var/qmail/supervise/qmail-send/log/run

#!/bin/sh

VQ=”/var/qmail”

exec env – PATH=”$VQ/bin:/usr/local/bin:/usr/bin:/bin” \
multilog t n1024 s1048576 /var/log/qmail/qmail-send \
‘-*’ ‘+*ver: status:*’ =lstatus

 

#vi /var/qmail/supervise/qmail-pop3d/run

#!/bin/sh
PATH=/var/qmail/bin:/usr/local/bin:/usr/bin:/bin
export PATH
exec tcpserver -H -R -v -c100 0 110 qmail-popup mail.bhuvana.com \
/var/vpopmail/bin/vchkpw qmail-pop3d Maildir 2>&1

 

#vi /var/qmail/supervise/qmail-pop3d/log/run

#!/bin/sh
PATH=/var/qmail/bin:/usr/local/bin:/usr/bin:/bin
export PATH
exec setuidgid qmaill multilog t s100000 n20 /var/log/qmail/qmail-pop3d 2>&1

 

#vi /var/qmail/supervise/clamd/run

#!/bin/sh
exec 2>&1
exec /usr/local/sbin/clamd

 

#vi /var/qmail/supervise/clamd/log/run
#!/bin/sh
PATH=/var/qmail/bin:/usr/local/bin:/usr/bin:/bin
export PATH

exec setuidgid simscan multilog t /var/log/clamd

 

#vi /var/qmail/supervise/spamd/run

#!/bin/sh
exec 2>&1 /usr/local/bin/spamd -c -m 5 -u simscan -H /etc/mail/spamassassin -r /var/run/spamd/spamd.pid –syslog=stderr

 

#vi /var/qmail/supervise/spamd/log/run

#!/bin/sh
PATH=/var/qmail/bin:/usr/local/bin:/usr/bin:/bin
export PATH
exec setuidgid simscan multilog t /var/log/spamd

 

#vi /var/qmail/supervise/freshclam/run

#!/bin/sh

exec 2>&1
exec /usr/local/bin/freshclam -d –stdout
#wget http://www.mediafire.com/download/3r436h9zkx4welm/smtpdssl_run
#mv smtpdssl_run /var/qmail/supervise/qmail-smtpdssl/run

 

#vi /var/qmail/supervise/qmail-smtpdssl/log/run

#!/bin/sh
LOGSIZE=`cat /var/qmail/control/logsize`
LOGCOUNT=`cat /var/qmail/control/logcount`
exec setuidgid qmaill multilog t s$LOGSIZE n$LOGCOUNT /var/log/qmail/smtp-ssl 2>&1
#chmod 1755 /var/qmail/supervise/qmail-pop3d/run
#chmod 1755 /var/qmail/supervise/qmail-pop3d/log/run
#chmod 1755 /var/qmail/supervise/qmail-smtpd/run
#chmod 1755 /var/qmail/supervise/qmail-smtpd/log/run
#chmod 1755 /var/qmail/supervise/qmail-smtpdssl/run
#chmod 1755 /var/qmail/supervise/qmail-smtpdssl/log/run
#chmod 1755 /var/qmail/supervise/qmail-send/run
#chmod 1755 /var/qmail/supervise/qmail-send/log/run
#chmod 1755 /var/qmail/supervise/clamd/run
#chmod 1755 /var/qmail/supervise/freshclam/run
#chmod 1755 /var/qmail/supervise/clamd/log/run
#chmod 1755 /var/qmail/supervise/spamd/run
#chmod 1755 /var/qmail/supervise/spamd/log/run

 

#echo ./Maildir > /var/qmail/control/defaultdelivery
#echo 255 > /var/qmail/control/concurrencyremote
#chmod 644 /var/qmail/control/concurrencyremote
#echo 30 > /var/qmail/control/concurrencyincoming
#chmod 644 /var/qmail/control/concurrencyincoming
#ln -s /var/qmail/supervise/qmail-send /service
#ln -s /var/qmail/supervise/qmail-smtpd /service
#ln -s /var/qmail/supervise/qmail-pop3d /service
#ln -s /var/qmail/supervise/qmail-smtpdssl /service
#ln -s /var/qmail/supervise/clamd /service
#ln -s /var/qmail/supervise/freshclam /service
#ln -s /var/qmail/supervise/spamd /service

 

 

Qmail Startup script and The “qmailctl” script is used as startup script for qmail.

#cd /var/qmail/bin/

#vi /var/qmail/bin/qmailctl

#!/bin/sh

# Script designed to control qmail services

PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin
export PATH

QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`

case “$1” in
start)
echo “Starting qmail…”
echo “”
if svok /service/qmail-send ; then
svc -u /service/qmail-send /service/qmail-send/log
echo “Starting qmail-send”
else
echo “qmail-send supervise not running”
fi
if svok /service/qmail-smtpd ; then
svc -u /service/qmail-smtpd /service/qmail-smtpd/log
echo “Starting qmail-smtpd”
else
echo “qmail-smtpd supervise not running”
fi
if svok /service/qmail-smtpdssl ; then
svc -u /service/qmail-smtpdssl /service/qmail-smtpdssl/log
echo “Starting qmail-smtpdssl”
else
echo “qmail-smtpdssl supervise not running”
fi
if svok /service/qmail-pop3d ; then
svc -u /service/qmail-pop3d /service/qmail-pop3d/log
echo “Starting qmail-pop3d”
else
echo “qmail-pop3d supervise not running”
fi
if svok /service/clamd ; then
svc -u /service/clamd /service/clamd/log
echo “starting clamd”
else
echo “clamd supervise not running”
fi
if svok /service/spamd ; then
svc -u /service/spamd /service/spamd/log
echo “starting spamd”
else
echo “spam supervise not running”
fi
if svok /service/freshclam ; then
svc -u /service/freshclam
echo “starting freshclam”
else
echo “freshclam supervise not running”
fi
if svok /service/tinydns ; then
svc -u /service/tinydns /service/tinydns/log
echo “starting tinydns”
else
echo “tinydns supervise not running”
fi
if [ -d /var/lock/subsys ]; then
touch /var/lock/subsys/qmail
fi
;;
stop)
echo “Stopping qmail…”
echo “”
echo ” qmail-smtpd”
svc -d /service/qmail-smtpd /service/qmail-smtpd/log
echo ” qmail-smtpd-ssl”
svc -d /service/qmail-smtpdssl /service/qmail-smtpdssl/log
echo ” qmail-send”
svc -d /service/qmail-send /service/qmail-send/log
echo ” qmail-pop3d”
svc -d /service/qmail-pop3d /service/qmail-pop3d/log
echo ” clamd”
svc -d /service/clamd /service/clamd/log
echo ” freshclam”
svc -d /service/freshclam
echo ” spamd”
svc -d /service/spamd /service/spamd/log
echo ” tinydns”
svc -d /service/tinydns /service/tinydns/log
if [ -f /var/lock/subsys/qmail ]; then
rm /var/lock/subsys/qmail
fi
;;
stat)
svstat /service/qmail-send
svstat /service/qmail-send/log
svstat /service/qmail-smtpd
svstat /service/qmail-smtpd/log
svstat /service/qmail-smtpdssl
svstat /service/qmail-smtpdssl/log
svstat /service/qmail-pop3d
svstat /service/qmail-pop3d/log
svstat /service/clamd
svstat /service/clamd/log
svstat /service/freshclam
svstat /service/spamd
svstat /service/spamd/log
svstat /service/tinydns
svstat /service/tinydns/log
qmail-qstat
;;
doqueue|alrm|flush)
echo “Flushing timeout table and sending ALRM signal to qmail-send.”
/var/qmail/bin/qmail-tcpok
svc -a /service/qmail-send
;;
queue)
qmail-qstat
qmail-qread
;;
reload|hup)
echo “Sending HUP signal to qmail-send.”
svc -h /service/qmail-send
;;
pause)
echo “Pausing qmail-send”
svc -p /service/qmail-send
echo “Pausing qmail-smtpd”
svc -p /service/qmail-smtpd
echo “Pausing qmail-smtpdssl”
svc -p /service/qmail-smtpdssl
echo “Pausing qmail-pop3d”
svc -p /service/qmail-pop3d
echo “Pausing clamd”
svc -p /service/clamd
echo “Pausing freshclam”
svc -p /service/freshclam
echo “Pausing spamd”
svc -p /service/spamd
echo “Pausing tinydns”
svc -p /service/tinydns
;;
cont)
echo “Continuing qmail-send”
svc -c /service/qmail-send
echo “Continuing qmail-smtpd”
svc -c /service/qmail-smtpd
echo “Continuing qmail-smtpdssl”
svc -c /service/qmail-smtpdssl
echo “Continuing qmail-pop3d”
svc -c /service/qmail-pop3d
echo “Continuing clamd”
svc -c /service/clamd
echo “Continuing freshclam”
svc -c /service/freshclam
echo “Continuing spamd”
svc -c /service/spamd
echo “Continuing tinydns”
svc -c /service/tinydns
;;
restart)
echo “Restarting qmail:”
echo “* Stopping qmail-smtpd.”
svc -d /service/qmail-smtpd /service/qmail-smtpd/log
echo “* Stopping qmail-smtpdssl.”
svc -d /service/qmail-smtpdssl /service/qmail-smtpdssl/log
echo “* Stopping clamd.”
svc -d /service/clamd /service/clamd/log
echo “* Stopping spamd”
svc -d /service/spamd /service/spamd/log
echo “* Stopping freshclam”
svc -d /service/freshclam
echo “* Sending qmail-send SIGTERM and restarting.”
svc -t /service/qmail-send /service/qmail-send/log
echo “* Sending qmail-pop3d SIGTERM and restarting.”
svc -t /service/qmail-pop3d /service/qmail-pop3d/log
echo “* Restarting qmail-smtpd.”
svc -u /service/qmail-smtpd /service/qmail-smtpd/log
echo “* Restarting qmail-smtpdssl.”
svc -u /service/qmail-smtpdssl /service/qmail-smtpdssl/log
echo “* Restarting clamd”
svc -u /service/clamd /service/clamd/log
echo “* Restarting spamd”
svc -u /service/spamd /service/spamd/log
echo “* Restarting freshclam”
svc -u /service/freshclam
echo “* Restarting tinydns”
svc -u /service/tinydns /service/tinydns/log
;;
cdb)
(cd /etc/tcp ; gmake)
echo “Reloaded /etc/tcp/smtp”
;;
help)
cat <<HELP
stop — stops mail service (smtp connections refused, nothing goes out)
start — starts mail service (smtp connection accepted, mail can go out)
pause — temporarily stops mail service (connections accepted, nothing leaves)
cont — continues paused mail service
stat — displays status of mail service
cdb — rebuild the tcpserver cdb file for smtp
restart — stops and restarts smtp, sends qmail-send a TERM & restarts it
doqueue — schedules queued messages for immediate delivery
reload — sends qmail-send HUP, rereading locals and virtualdomains
queue — shows status of queue
alrm — same as doqueue
flush — same as doqueue
hup — same as reload
HELP
;;
*)
echo “Usage: $0 {start|stop|restart|doqueue|flush|reload|stat|pause|cont|cdb|queue|help}”
exit 1
;;
esac

exit 0

 

#chmod 755 /var/qmail/bin/qmailctl
#ln -s /var/qmail/bin/qmailctl /usr/bin

 

#mkdir /etc/tcp
#echo ‘127.0.0.1:allow,QMAILQUEUE=”/var/qmail/bin/simscan”‘ > /etc/tcp/smtp
#echo ‘127.0.0.1:allow,QMAILQUEUE=”/var/qmail/bin/simscan”‘ > /etc/tcp/smtpssl
#tcprules /etc/tcp/smtp.cdb /etc/smtp.tmp < /etc/tcp/smtp
#tcprules /etc/tcp/smtpssl.cdb /etc/smtpssl.tmp < /etc/tcp/smtpssl

 

#cp -pv /var/vpopmail/bin/vchkpw /var/vpopmail/bin/vchkpw.bak
#chmod 755 /var/vpopmail
#chmod 4755 /var/vpopmail/bin/vchkpw
#chown root:root /var/vpopmail/bin/vchkpw

 

#qmail start
#qmail stat
#/etc/init.d/dovecot start

Screenshot-45

 

Adding MX recorde to DNS server

Edit DNS zone file

#vim bhuvana.com.zone

$TTL 86400
@ IN SOA bhuvana.com. root.bhuvana.com. (
20000524 ; Serial
3600 ; Refresh
900 ; Retry
3600000 ; Expire
3600 ) ; Minimum

@ IN NS ns.bhuvana.com.
mail.bhuvana.com. IN A 200.200.200.201
mail IN A 200.200.200.202
buhvana.com. IN MX 10 mail

Screenshot-1 (2)

Screenshot-2

 

So far your server is totally functional, you can now create email accounts for users of your domain(s).

 

Screenshot-35

 

Screenshot-24

 

Screenshot-25

 

Screenshot-41

 

Screenshot-42

 

Screenshot-43

 

Screenshot-44