<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>wd and cc &#187; qmail</title>
	<atom:link href="http://wdicc.com/tag/qmail/feed/" rel="self" type="application/rss+xml" />
	<link>http://wdicc.com</link>
	<description>Happy every day...</description>
	<lastBuildDate>Wed, 01 Feb 2012 03:27:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Howto Qmail with spamassassin</title>
		<link>http://wdicc.com/howto-qmail-with-spamassassin/</link>
		<comments>http://wdicc.com/howto-qmail-with-spamassassin/#comments</comments>
		<pubDate>Mon, 16 Jan 2006 15:14:23 +0000</pubDate>
		<dc:creator>wd</dc:creator>
				<category><![CDATA[Mail]]></category>
		<category><![CDATA[qmail]]></category>

		<guid isPermaLink="false">http://blog.wdicc.com/wordpress/howto-qmail-with-spamassassin/</guid>
		<description><![CDATA[http://sylvestre.ledru.info/howto/howto_qmail_spamassassin.php By Sylvestre Ledru June 2003 Version francaise Return to the linux page (02/04/2002), Bug fix : I just add a little bug fix for some OS which remove the +x on qmail-queue (the qmail-scanner is not concerned) (01/11/2003), Qmail-scanner : I had a new way of calling spamassassin client using qmail-scanner. (23/07/2003), Preferences : [...]]]></description>
			<content:encoded><![CDATA[<p>http://sylvestre.ledru.info/howto/howto_qmail_spamassassin.php</p>
<p>By Sylvestre Ledru June 2003<br />
Version francaise<br />
Return to the linux page</p>
<p>(02/04/2002), Bug fix :<br />
I just add a little bug fix for some OS which remove the +x on qmail-queue (the qmail-scanner is not concerned)<br />
(01/11/2003), Qmail-scanner :<br />
I had a new way of calling spamassassin client using qmail-scanner.<br />
(23/07/2003), Preferences :<br />
Matthew Francis sent me a quite good howto explaining how to get user preferences for spamassassin. It is available here.<br />
(08/06/2003), Localisation :<br />
If you want to change the language of the spam report (ie why the email has been tagged as a spam), just change the locales to your language (dpkg-reconfigure locales under debian) and install gettext (apt-get install gettext) and you will have the appropriate version (french for example)&#8230;<br />
(11/03/2005), Update :<br />
After almost two years without updates, my other howto about qmail is much more complet and uptodate, I clean this one :<br />
- first method deprecated<br />
- new version of spamassassin 3.0.X<br />
- use of netqmail instead of qmail<br />
- new version of qmail-scanner with the q-s-st patch (activation of Spamassassin just for a domain)</p>
<p>If you like this howto and you want to thank me for my work : here is my wishlist on Amazon &#8211; France or my Amazon US wishlist <img src='http://wdicc.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
If you are a corporation and you make some business thanks to my howto, we&#8217;ll love to have a present from you (or just tell me who is using my howto).<br />
Thank to Scott Kinkade for his cash donation. I really do appreciate.</p>
<p>If you want more informations about the intallation of qmail, I wrote a long howto about.<br />
I wrote this howto because there is a lack of documentation about qmail with spamassassin.</p>
<p>This howto has been designed for qmail with vpopmail but it should work without a lot of modifications with something else than vpopmail.</p>
<p>Spamassassin is a very powerfull program which checks if the receveid email is a spam or not. The analys is based on a list of mark. If the sum of all the mark exceed a specified amount (for example 5), the email will be tagged (****SPAM**** in the topic).<br />
With this, it is very easy to create a rule which will move all emails into a specific directory (i.e. trash:)</p>
<p>If you want to link Qmail with spamassassin, it is quite easy.<br />
First, install spamassassin and install razor and pyzor if you want to use it.<br />
Under debian :<br />
apt-get install spamassassin You should use the “debian unstable or testing” version of spamassassin which, most of the time, will find more spam.</p>
<p>Under other system (Redhat, Suse, Solaris &#8230;) : The latest version of spamassassin today is the version 3.0.2. The installation is almost the same, only a few directives changed.<br />
wget http://useast.spamassassin.org/released/Mail-SpamAssassin-2.55.tar.gz<br />
tar -zxvf Mail-SpamAssassin-2.55.tar.gz<br />
cd Mail-SpamAssassin-2.55<br />
perl Makefile.PL<br />
make<br />
make install<br />
cp spamd/debian-rc-script.sh /etc/init.d/spamassassin You can replace debian by redhat, solaris, netbsd, suse &#8230;<br />
chmod +x /etc/init.d/spamassassin</p>
<p>Then, edit /etc/spamassassin/local.cf<br />
Version 2.5X :<br />
required_hits 6.0<br />
rewrite_subject 1<br />
report_header 1<br />
use_terse_report 1<br />
defang_mime 1<br />
dns_available yes<br />
dcc_add_header 1<br />
use_pyzor 1 (Only if you have installed pyzor)<br />
use_razor2 (Only if you have installed razor2)<br />
use_dcc 1<br />
Version 3 :<br />
#Number of points to tag the spam required_hits 5.0 # Add the result in the header always_add_headers 1 # change the subject rewrite_subject 1 report_safe 1 use_terse_report 1 # dns checks (warning : increase the process length) dns_available yes dcc_add_header 0 # Don&#8217;t skip the relay black list skip_rbl_checks 0 use_dcc 1 dcc_timeout 10 # Remote verification use_pyzor 1 pyzor_timeout 10 pyzor_add_header 1 # Never from the previous results auto_learn 1 # use the bayes filter use_bayes 1 # Where spamassassin must store these informations : bayes_path /var/qmail/spamassassin/ # Where he stores the auto white list results : auto_whitelist_path /var/qmail/spamassassin/auto_whitelist<br />
If you want to have detailled information about spamassassin processing, add the line in the local.cf file : timelog_path /var/log/spamassassin, run the daemon with the -D option (so, specify it in the /etc/default/spamassassin file under debian), create the directory with appropriate rights (should be vpopmail). In the directory, you will have for each email a file which sum up the spamassassin process (it is a debug option !).</p>
<p>I use these rules. Feel free to change ! Documentation about this is available here : perldoc Mail::SpamAssassin::Conf</p>
<p>In /etc/default/spamassassin (if this file does not exist, create it)<br />
Change ENABLED to 1, then add these options : &#8211; “-m 10 -v &#8211;auto-whitelist” for the version 2.5X.<br />
- “-v -m 10 -u vpopmail &#8211;nouser-config” for the version 3<br />
With that stuff, you can launch spamd which is bascilly a spamassassin deamon (provide great performances).<br />
-m 10 =&gt; 10 childs<br />
-v =&gt; vpopmail config<br />
&#8211;auto-whitelist =&gt; Use auto whitelist (friend list)<br />
Instead of spamassassin, you have to use spamc in order to test email.<br />
There are some options “-c -u vpopmail” which enabled the creation of preferences for a domain or a user but it does not work very well for me.<br />
/etc/init.d/spamassassin start</p>
<p>Next, the modification of qmail in order to check emails.<br />
Basically, there are two kind of configuration for qmail :<br />
- the fastest/easiest way is to change the qmail-queue in order to “introduce” the spamasssin check.Deprecated<br />
- the cleanest way is to use qmail-scanner.<br />
Changing the qmail-queue program<br />
cp /var/qmail/bin/qmail-queue /var/qmail/bin/qmail-queue.orig<br />
chown qmailq:qmail qmail-queue<br />
chown qmailq:qmail qmail-queue.orig<br />
chmod u+s qmail-queue.orig<br />
chmod o+r,+x qmail-queue.orig qmail-queue Not fundamental but sometime it is necessary (depends the system)</p>
<p>mkdir /home/vpopmail/.spamassassin<br />
cd /home/vpopmail<br />
chmod 777 /home/vpopmail/.spamassassin</p>
<p>chown -R qmailq:qmail .spamassassin<br />
chmod u=rwx,g=rx,o= /home/vpopmail/.spamassassin<br />
Now, delete the content of the executable which manage the queue.<br />
echo -n &gt; /var/qmail/bin/qmail-queue<br />
Then, edit the qmail-queue file and add this inside :<br />
#!/bin/sh<br />
/usr/bin/spamc | /var/qmail/bin/qmail-queue.orig<br />
I agree that it is a quick/dirty method. It causes some issues with the injection of a bounce in the queue. (qmail-queue is not planned to work this way).<br />
With qmail-scanner &#8211; Visit http://sylvestre.ledru.info/howto/howto_qmail_vpopmail.php for more informations<br />
First, you have to patch qmail with the qmailqueue-patch or install netqmail which has already this plugin.<br />
Qmail with the patch :<br />
wget http://qmail.agarik.com/qmail-1.03.tar.gz<br />
tar -zxvf qmail-1.03.tar.gz<br />
cd qmail-1.03<br />
wget http://qmail.mirrored.ca/moni.csi.hu/pub/glibc-2.3.1/qmail-1.03.errno.patch<br />
wget http://sylvestre.ledru.info/howto/qmail/qmailqueue-patch<br />
patch -p1 &lt; qmail-1.03.errno.patch<br />
patch -p1 &lt; qmailqueue-patch<br />
With netqmail :<br />
wget http://qmail.agarik.com/netqmail-1.05.tar.gz<br />
tar -zxvf netqmail-1.05.tar.gz<br />
cd netqmail-1.05/<br />
./collate.sh<br />
cd netqmail-1.05<br />
Add the QMAILQUEUE parameter to the /etc/tcp.smtp file :<br />
127.0.0.1:allow,RELAYCLIENT=”",QMAILQUEUE=”/var/qmail/bin/qmail-scanner-queue.pl”<br />
198.168.1.:allow,RELAYCLIENT=”",QMAILQUEUE=”/var/qmail/bin/qmail-scanner-queue.pl”<br />
:allow,QMAILQUEUE=”/var/qmail/bin/qmail-scanner-queue.pl”<br />
Rehash tcpserver :<br />
/usr/local/bin/tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp &lt; /etc/tcp.smtp<br />
chmod 644 /etc/tcp.smtp.cdb<br />
And then, install qmail-scanner with qmail-scanner-st<br />
. qmail-scanner-st is a patched version a qmail-scanner which enabled great features like auto delete/reject/quarantine spam over a specified score but also to select which scanners will be used for a domain and even for a user, then, it is possible to configure the spamassassin / antivirus just for one domain/user.<br />
wget http://unc.dl.sourceforge.net/sourceforge/qmail-scanner/qmail-scanner-1.25.tgz wget http://xoomer.virgilio.it/j.toribio/qmail-scanner/download/q-s-1.25st-20050207.patch.gz<br />
gunzip q-s-1.25st-20050207.patch.gz<br />
tar -zxvf qmail-scanner-1.25.tgz<br />
cd qmail-scanner-1.25/<br />
patch -p1 &lt; ../q-s-1.25st-20050207.patch<br />
groupadd qscand<br />
useradd -c “Qmail-Scanner Account” -g qscand -s /bin/false qscand<br />
./configure &#8211;qs-user qscand &#8211;qs-group qscand &#8211;spooldir /var/spool/qmailscan &#8211;qmaildir /var/qmail &#8211;bindir /var/qmail/bin &#8211;qmail-queue-binary /var/qmail/bin/qmail-queue &#8211;admin-fromname “Mail admin” &#8211;admin postmaster &#8211;domain vladimir.avence.info &#8211;notify sender,admin,recips &#8211;local-domains `cat /var/qmail/control/rcpthosts | tr “\n” ” “` &#8211;silent-viruses auto &#8211;unzip 1 &#8211;add-dscr-hdrs 1 &#8211;archive 0 &#8211;redundant yes &#8211;log-crypto 0 &#8211;scanners “fast_spamassassin” &#8211;scanners-per-domain yes &#8211;sa-subject “*****SPAM*****” &#8211;sa-delete 5 &#8211;install 1<br />
After the installation, if you want to change your preferences, you have to edit the /var/qmail/bin/qmail-scanner-queue.pl file. In this file, you can also add option for the spamassassin client.<br />
If you want to enable/disable some scanners, edit the /var/spool/qmailscan/scanners_per_domain.txt<br />
To rehash the scanner per domain file : /var/qmail/bin/qmail-scanner-queue.pl -p<br />
To rehash the quarantine attachement file : /var/qmail/bin/qmail-scanner-queue.pl -g<br />
trunks.ecranbleu.org:sa,ps,clamdscan_scanner</p>
<p># sa = spamassassin<br />
# ps = perl scanner</p>
<p>This should be enough to use SpamAssassin on the whole system.<br />
I have to try to find how it can be linked with vpopmail in order to create preference for a specific domain or a specific user. (if someone knows : sylvestre@ecranbleu.org)</p>
<p>Problems :<br />
- link with vpopmail<br />
This howto is inspired and corrected from :</p>
<p>http://www.euronet.nl/users/erhnam/linux/qmail/qmail.htm.</p>
]]></content:encoded>
			<wfw:commentRss>http://wdicc.com/howto-qmail-with-spamassassin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>caphit qmail 配置</title>
		<link>http://wdicc.com/caphit-qmail-conf/</link>
		<comments>http://wdicc.com/caphit-qmail-conf/#comments</comments>
		<pubDate>Mon, 16 Jan 2006 15:09:38 +0000</pubDate>
		<dc:creator>wd</dc:creator>
				<category><![CDATA[Mail]]></category>
		<category><![CDATA[qmail]]></category>

		<guid isPermaLink="false">http://blog.wdicc.com/wordpress/caphit-qmail-conf/</guid>
		<description><![CDATA[参考网址 http://lifewithqmail.org(中文版http://lifewithqmail.org/LWQ-CN.html) http://qmail.te8.com/rpms/glibc-2.3.1/(patch下载地址) http://www.fehcom.de/qmail/qmail.html http://www.pipeline.com.au/staff/mbowe/isp/vpopmail-mysql.htm http://bbs.chinaunix.net/forum/viewtopic.php?t=254662 ucspi-tcp http://cr.yp.to/ucspi-tcp.html ucspi-tcp-0.88.a_record.patch，ucspi-tcp-0.88.errno.patch，ucspi-tcp-0.88.nodefaultrbl.patch （或者）ucspi-tcp-0.88.a_record.patch，ucspi-tcp-0.88.errno.patch，ucspi-tcp-0.88.nobase.patch patch -d ucspi-tcp.xxx -p1 &#60; ucspi-tcp-xxx.patch make&#38;&#38;make setup check daemontools http://cr.yp.to/daemontools.html daemontools-0.76.errno.patch package/install Adding svscanboot to inittab&#8230;init should start svscan now. cmd5checkpw http://www.fehcom.de/qmail/auth/cmd5checkpw-030_tgz.bin make&#38;&#38;make setup qmail 1.03 http://cr.yp.to/qmail.html http://www.fehcom.de/qmail/qmail.html http://www.fehcom.de/qmail/spamcontrol/spamcontrol-2311_tgz.bin tar zxvf spamcontrol-2311_tgz.bin 编辑conf-spamcontrol 建立用户组 groupadd nofiles useradd -g nofiles -d /var/qmail qmaild -s /sbin/nologin [...]]]></description>
			<content:encoded><![CDATA[<p>参考网址</p>
<p>http://lifewithqmail.org(中文版http://lifewithqmail.org/LWQ-CN.html)</p>
<p>http://qmail.te8.com/rpms/glibc-2.3.1/(patch下载地址)</p>
<p>http://www.fehcom.de/qmail/qmail.html</p>
<p>http://www.pipeline.com.au/staff/mbowe/isp/vpopmail-mysql.htm</p>
<p>http://bbs.chinaunix.net/forum/viewtopic.php?t=254662</p>
<p>ucspi-tcp</p>
<p>http://cr.yp.to/ucspi-tcp.html</p>
<p>ucspi-tcp-0.88.a_record.patch，ucspi-tcp-0.88.errno.patch，ucspi-tcp-0.88.nodefaultrbl.patch<br />
（或者）ucspi-tcp-0.88.a_record.patch，ucspi-tcp-0.88.errno.patch，ucspi-tcp-0.88.nobase.patch<br />
patch -d ucspi-tcp.xxx -p1 &lt; ucspi-tcp-xxx.patch<br />
make&amp;&amp;make setup check</p>
<p>daemontools</p>
<p>http://cr.yp.to/daemontools.html</p>
<p>daemontools-0.76.errno.patch<br />
package/install<br />
Adding svscanboot to inittab&#8230;init should start svscan now.</p>
<p>cmd5checkpw</p>
<p>http://www.fehcom.de/qmail/auth/cmd5checkpw-030_tgz.bin</p>
<p>make&amp;&amp;make setup</p>
<p>qmail 1.03</p>
<p>http://cr.yp.to/qmail.html</p>
<p>http://www.fehcom.de/qmail/qmail.html</p>
<p>http://www.fehcom.de/qmail/spamcontrol/spamcontrol-2311_tgz.bin</p>
<p>tar zxvf spamcontrol-2311_tgz.bin<br />
编辑conf-spamcontrol<br />
建立用户组<br />
groupadd nofiles<br />
useradd -g nofiles -d /var/qmail qmaild -s /sbin/nologin<br />
useradd -g nofiles -d /var/qmail qmaill -s /sbin/nologin<br />
useradd -g nofiles -d /var/qmail qmailp -s /sbin/nologin<br />
useradd -g nofiles -d /var/qmail/alias alias -s /sbin/nologin<br />
groupadd qmail<br />
useradd -g qmail -d /var/qmail qmailq -s /sbin/nologin<br />
useradd -g qmail -d /var/qmail qmailr -s /sbin/nologin<br />
useradd -g qmail -d /var/qmail qmails -s /sbin/nologin<br />
./install_spamcontrol.sh<br />
make setup check<br />
./config-fast xxxx.com</p>
<p>vpopmail</p>
<p>http://sourceforge.net/projects/vpopmail/</p>
<p>groupadd vchkpw;useradd vpopmail<br />
CREATE DATABASE vpopmail;<br />
GRANT select,insert,update,delete,create,drop ON vpopmail.* TO vpopmailuser@localhost IDENTIFIED BY &#8216;vpoppasswd&#8217;;<br />
配置(用igenus需要enable-many-domains)<br />
./configure   &#8211;enable-logging=p<br />
&#8211;enable-domain-quotas=y<br />
&#8211;enable-auth-module=mysql<br />
&#8211;enable-tcprules-prog=/usr/local/bin/tcprules<br />
&#8211;enable-tcpserver-file=/etc/tcp.smtp<br />
&#8211;disable-mysql-limits<br />
&#8211;enable-mysql-logging<br />
&#8211;enable-many-domains<br />
make&amp;&amp;make install-strip<br />
vi vpopmail.mysql<br />
vi vlimits.default<br />
echo “xxxx.com” &gt; /home/vpopmail/etc/defaultdomain<br />
vi /home/vpopmail/domains/.quotawarn.msg<br />
From: CAPH Postmaster</p>
<postmaster@xxx.com> Reply-To: postmaster@xxx.com<br />
To: SomeCompany User:;<br />
Subject: Mail quota warning<br />
Mime-Version: 1.0<br />
Content-Type: text/plain; charset=iso-8859-1<br />
Content-Transfer-Encoding: 7bit</postmaster@xxx.com>
<p>Your mailbox on the server is now more than 90% full.</p>
<p>So that you can continue to receive mail,<br />
you need to remove some messages from your mailbox.</p>
<p>If you require assistance with this,<br />
please contact our support department :</p>
<p>email : postmaster@xxx.com<br />
Tel   : 010 68372647<br />
echo “Message rejected. Not enough storage space in user&#8217;s mailbox to accept message.” &gt; /home/vpopmail/domains/.over-quota.msg</p>
<p>/var/qmail/rc<br />
vi /var/qmail/rc<br />
#!/bin/sh</p>
<p># Using stdout for logging<br />
# Using control/defaultdelivery from qmail-local to deliver messages by default</p>
<p>exec env &#8211; PATH=”/var/qmail/bin:$PATH”<br />
qmail-start “`cat /var/qmail/control/defaultdelivery`”</p>
<p>echo ./Maildir/ &gt;/var/qmail/control/defaultdelivery<br />
chmod 755 /var/qmail/rc<br />
mkdir /var/log/qmail</p>
<p>/var/qmail/bin/qmailctl</p>
<p>vi /var/qmail/bin/qmailctl<br />
#!/bin/sh</p>
<p># description: the qmail MTA</p>
<p>PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin<br />
export PATH<br />
LOG_AUTH=1<br />
export LOG_AUTH</p>
<p>QMAILDUID=`id -u qmaild`<br />
NOFILESGID=`id -g qmaild`</p>
<p>case “$1&#8243; in<br />
start)<br />
echo “Starting qmail”<br />
if svok /service/qmail-send ; then<br />
svc -u /service/qmail-send /service/qmail-send/log<br />
else<br />
echo “qmail-send supervise not running”<br />
fi<br />
if svok /service/qmail-smtpd ; then<br />
svc -u /service/qmail-smtpd /service/qmail-smtpd/log<br />
else<br />
echo “qmail-smtpd supervise not running”<br />
fi<br />
if svok /service/qmail-pop3d ; then<br />
svc -u /service/qmail-pop3d /service/qmail-pop3d/log<br />
else<br />
echo qmail-pop3d supervise not running<br />
fi<br />
if [ -d /var/lock/subsys ]; then<br />
touch /var/lock/subsys/qmail<br />
fi<br />
;;<br />
stop)<br />
echo “Stopping qmail&#8230;”<br />
echo ”  qmail-smtpd”<br />
svc -d /service/qmail-smtpd /service/qmail-smtpd/log<br />
echo ”  qmail-smtpd”<br />
svc -d /service/qmail-smtpd /service/qmail-smtpd/log<br />
echo ”  qmail-send”<br />
svc -d /service/qmail-send /service/qmail-send/log<br />
echo ”  qmail-pop3d”<br />
svc -d /service/qmail-pop3d /service/qmail-pop3d/log<br />
if [ -f /var/lock/subsys/qmail ]; then<br />
rm /var/lock/subsys/qmail<br />
fi<br />
;;<br />
stat)<br />
svstat /service/qmail-send<br />
svstat /service/qmail-send/log<br />
svstat /service/qmail-smtpd<br />
svstat /service/qmail-smtpd/log<br />
svstat /service/qmail-pop3d<br />
svstat /service/qmail-pop3d/log<br />
qmail-qstat<br />
;;<br />
doqueue|alrm|flush)<br />
echo “Flushing timeout table and sending ALRM signal to qmail-send.”<br />
/var/qmail/bin/qmail-tcpok<br />
svc -a /service/qmail-send<br />
;;<br />
queue)<br />
qmail-qstat<br />
qmail-qread<br />
;;<br />
reload|hup)<br />
echo “Sending HUP signal to qmail-send.”<br />
svc -h /service/qmail-send<br />
;;<br />
pause)<br />
echo “Pausing qmail-send”<br />
svc -p /service/qmail-send<br />
echo “Pausing qmail-smtpd”<br />
svc -p /service/qmail-smtpd<br />
echo “Pausing qmail-pop3d”<br />
svc -p /service/qmail-smtpd<br />
echo “Pausing qmail-pop3d”<br />
svc -p /service/qmail-pop3d<br />
;;<br />
cont)<br />
echo “Continuing qmail-send”<br />
svc -c /service/qmail-send<br />
echo “Continuing qmail-smtpd”<br />
svc -c /service/qmail-smtpd<br />
echo “Continuing qmail-pop3d”<br />
svc -c /service/qmail-pop3d<br />
;;<br />
restart)<br />
echo “Restarting qmail:”<br />
echo “* Stopping qmail-smtpd.”<br />
svc -d /service/qmail-smtpd /service/qmail-smtpd/log<br />
echo “* Sending qmail-send SIGTERM and restarting.”<br />
svc -t /service/qmail-send /service/qmail-send/log<br />
echo “* Restarting qmail-smtpd.”<br />
svc -u /service/qmail-smtpd /service/qmail-smtpd/log<br />
echo “* Restarting qmail-pop3d.”<br />
svc -t /service/qmail-pop3d /service/qmail-pop3d/log<br />
;;<br />
cdb)<br />
tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp &lt; /etc/tcp.smtp<br />
tcprules /etc/tcp.pop3.cdb /etc/tcp.pop3.tmp &lt; /etc/tcp.pop3<br />
chmod 644 /etc/tcp.smtp.cdb<br />
chmod 644 /etc/tcp.pop3.cdb<br />
echo “Reloaded /etc/tcp.smtp.”<br />
echo “Reloaded /etc/tcp.pop3.”<br />
;;<br />
help)<br />
cat &lt;   stop &#8212; stops mail service (smtp connections refused, nothing goes out)<br />
start &#8212; starts mail service (smtp connection accepted, mail can go out)<br />
pause &#8212; temporarily stops mail service (connections accepted, nothing leaves)<br />
cont &#8212; continues paused mail service<br />
stat &#8212; displays status of mail service<br />
cont &#8212; continues paused mail service<br />
stat &#8212; displays status of mail service<br />
cdb &#8212; rebuild the tcpserver cdb file for smtp<br />
restart &#8212; stops and restarts smtp, sends qmail-send a TERM &amp; restarts it<br />
doqueue &#8212; schedules queued messages for immediate delivery<br />
reload &#8212; sends qmail-send HUP, rereading locals and virtualdomains<br />
queue &#8212; shows status of queue<br />
alrm &#8212; same as doqueue<br />
flush &#8212; same as doqueue<br />
hup &#8212; same as reload<br />
HELP<br />
;;<br />
*)<br />
echo “Usage: $0 {start|stop|restart|doqueue|flush|reload|stat|pause|cont|cdb|queue|help}”<br />
exit 1<br />
;;<br />
esac</p>
<p>exit 0</p>
<p>chmod 755 /var/qmail/bin/qmailctl<br />
ln -s /var/qmail/bin/qmailctl /usr/bin<br />
echo 20 &gt; /var/qmail/control/concurrencyincoming<br />
chmod 644 /var/qmail/control/concurrencyincoming</p>
<p>supervise 脚本<br />
mkdir -p /var/qmail/supervise/qmail-send/log<br />
mkdir -p /var/qmail/supervise/qmail-smtpd/log<br />
mkdir -p /var/qmail/supervise/qmail-pop3d/log</p>
<p>qmail-send</p>
<p>/var/qmail/supervise/qmail-send/run</p>
<p>#!/bin/sh<br />
exec /var/qmail/rc</p>
<p>/var/qmail/supervise/qmail-send/log/run</p>
<p>#!/bin/sh<br />
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t /var/log/qmail</p>
<p>qmail-smtpd</p>
<p>/var/qmail/supervise/qmail-smtpd/run</p>
<p>#!/bin/sh</p>
<p>#QMAILDUID=`id -u qmaild`<br />
NOFILESGID=`id -g qmaild`<br />
QMAILDUID=`id -u vpopmail`<br />
QMAILDGID=`id -g vpopmail`</p>
<p>MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`<br />
LOCAL=`head -1 /var/qmail/control/me`<br />
if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z "$LOCAL" ]; then<br />
echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in<br />
echo /var/qmail/supervise/qmail-smtpd/run<br />
exit 1<br />
fi<br />
if [ ! -f /var/qmail/control/rcpthosts ]; then<br />
echo “No /var/qmail/control/rcpthosts!”<br />
echo “Refusing to start SMTP listener because it&#8217;ll create an open relay”<br />
exit 1<br />
fi<br />
exec /usr/local/bin/softlimit -m 30000000<br />
/usr/local/bin/tcpserver -v -H -R -l “$LOCAL” -x /etc/tcp.smtp.cdb -c “$MAXSMTPD”<br />
-u “$QMAILDUID” -g “$QMAILDGID” 0 smtp /usr/local/bin/rblsmtpd -r relays.ordb.org<br />
/var/qmail/bin/qmail-smtpd<br />
/home/vpopmail/bin/vchkpw /bin/true /bin/cmd5checkpw /bin/true 2&gt;&amp;1</p>
<p>/var/qmail/supervise/qmail-smtpd/log/run</p>
<p>#!/bin/sh<br />
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t<br />
/var/log/qmail/smtpd</p>
<p>qmail-pop3d</p>
<p>/var/qmail/supervise/qmail-pop3d/run</p>
<p>#!/bin/sh</p>
<p>LOCAL=`head -1 /var/qmail/control/me`</p>
<p>exec /usr/local/bin/softlimit -m 30000000<br />
/usr/local/bin/tcpserver -x /etc/tcp.pop3.cdb<br />
-H -l $LOCAL<br />
-v -c 20 -R 0 pop3<br />
/var/qmail/bin/qmail-popup $LOCAL<br />
/home/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir 2&gt;&amp;1</p>
<p>/var/qmail/supervise/qmail-pop3d/log/run</p>
<p>#!/bin/sh<br />
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t<br />
/var/log/qmail/pop3d</p>
<p>chmod 755 /var/qmail/supervise/qmail-send/run;chmod 755 /var/qmail/supervise/qmail-send/log/run<br />
chmod 755 /var/qmail/supervise/qmail-smtpd/run;chmod 755 /var/qmail/supervise/qmail-smtpd/log/run<br />
chmod 755 /var/qmail/supervise/qmail-pop3d/run;chmod 755 /var/qmail/supervise/qmail-pop3d/log/run<br />
mkdir -p /var/log/qmail/smtpd;chown qmaill /var/log/qmail /var/log/qmail/smtpd<br />
ln -s /var/qmail/supervise/qmail-send /var/qmail/supervise/qmail-smtpd /var/qmail/supervise/qmail-pop3d /service<br />
touch .qmail-root .qmail-postmaster<br />
ln -s .qmail-postmaster /var/qmail/alias/.qmail-mailer-daemon<br />
chmod 644 /var/qmail/alias/.qmail-root /var/qmail/alias/.qmail-postmaster</p>
<p>clamav</p>
<p>http://www.clamav.net/</p>
<p>groupadd clamav<br />
useradd -g clamav -s /sbin/nologin clamav -d /tmp<br />
./configure<br />
make check<br />
make install</p>
<p>maildrop</p>
<p>./configure<br />
make;make install-strip;make install-man</p>
<p>spamassassin</p>
<p>perl Makefile.PL<br />
make<br />
make install<br />
cp spamd/redhat-rc-script.sh /etc/init.d/spamd</p>
<p>qmail-scanner</p>
<p>groupadd qscand;useradd -g qscand -s /sbin/nologin qscand -d /tmp<br />
./configure &#8211;spooldir /var/qmailscan &#8211;qmaildir /var/qmail &#8211;bindir /var/qmail/bin &#8211;qmail-queue-binary<br />
/var/qmail/bin/qmail-queue  &#8211;admin postmaster &#8211;domain xxx.com &#8211;notify sender,admin &#8211;local-domains “xxx.com,xxx.com.cn,xxx.com.cn” &#8211;silent-viruses auto &#8211;debug yes &#8211;unzip 1<br />
&#8211;block-password-protected 0 &#8211;add-dscr-hdrs 0 &#8211;archive 0 &#8211;redundant yes &#8211;log-details syslog &#8211;log-crypto 0<br />
&#8211;fix-mime 2  &#8211;ignore-eol-check 0 &#8211;scanners “clamscan,fast_spamassassin”</p>
<p>cp qmail-scanner-queue.pl /var/qmail/bin<br />
chown qscand:qscand /var/qmail/bin/qmail-scanner-queue.pl<br />
chmod 4755 /var/qmail/bin/qmail-scanner-queue.pl<br />
vi /etc/tcp.smtp</p>
<p>127.:allow,RELAYCLIENT=”",MFDNSCHECK=”",BADMIMETYPE=”",RBLSMTPD=”",QMAILQUEUE=”/var/<br />
qmail/bin/qmail-scanner-queue.pl”</p>
<p>qmailctl cdb<br />
qmailctl restart<br />
contrib/test_installation.sh -doit测试</p>
]]></content:encoded>
			<wfw:commentRss>http://wdicc.com/caphit-qmail-conf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

