<?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>TECH.kulish.com &#187; smtp</title>
	<atom:link href="http://tech.kulish.com/category/daemons/smtp/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech.kulish.com</link>
	<description>Technical Goulash</description>
	<lastBuildDate>Thu, 01 Dec 2011 00:39:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Email Cleanup</title>
		<link>http://tech.kulish.com/2011/02/19/email-cleanup/</link>
		<comments>http://tech.kulish.com/2011/02/19/email-cleanup/#comments</comments>
		<pubDate>Sat, 19 Feb 2011 14:08:17 +0000</pubDate>
		<dc:creator>Null</dc:creator>
				<category><![CDATA[Daemons]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[dovecot]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[postfix]]></category>

		<guid isPermaLink="false">http://tech.kulish.com/?p=259</guid>
		<description><![CDATA[Our email server directories will be cleaned out February 28th. What this means&#8230; All ham and spam folders will be completely wiped cleaned. If you have email in either folder on your account, move it to your inbox or create a new folder to store it. Thanks. The Administration]]></description>
			<content:encoded><![CDATA[<p>Our email server directories will be cleaned out February 28th.</p>
<p>What this means&#8230;</p>
<p>All ham and spam folders will be completely wiped cleaned.<br />
If you have email in either folder on your account, move it to your inbox or create a new folder to store it.</p>
<p>Thanks.<br />
The Administration</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.kulish.com/2011/02/19/email-cleanup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Email Greylisting</title>
		<link>http://tech.kulish.com/2010/11/27/email-greylisting/</link>
		<comments>http://tech.kulish.com/2010/11/27/email-greylisting/#comments</comments>
		<pubDate>Sat, 27 Nov 2010 18:35:15 +0000</pubDate>
		<dc:creator>Null</dc:creator>
				<category><![CDATA[Daemons]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[SMTP]]></category>
		<category><![CDATA[SPAM]]></category>

		<guid isPermaLink="false">http://tech.kulish.com/?p=206</guid>
		<description><![CDATA[First, for the un-initiated, click here to learn about email greylisting. When email admins talk about greylisting, one of the benefits they normally point to is load on the actual email server but fail to mention supporting systems. I did notice a decrease in mail processing load there as well as my database server. Keep [...]]]></description>
			<content:encoded><![CDATA[<p>First, for the un-initiated, click <a href="http://www.greylisting.org/">here</a> to learn about email greylisting.</p>
<p>When email admins talk about greylisting, one of the benefits they normally point to is load on the actual email server but fail to mention supporting systems. I did notice a decrease in mail processing load there as well as my database server.</p>
<p>Keep in mind this is NOT a busy email server. It&#8217;s only hosting a couple TLDs.</p>
<p>I noticed an immediate improvement after restarting mail services (I did not reboot the server).</p>
<p>Email processing by amavisd was greatly reduced since the SMTP server rejected all new connections initially.<br />
The &#8220;orange&#8221; is spam detected by amavis:<br />
<a href="http://gallery.kulish.com/main.php?g2_itemId=4214"><img src="http://gallery.kulish.com/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4215&#038;g2_serialNumber=2" title="Email Greylisting" alt=" Email Greylisting" /></a></p>
<p>Below is the MariaDB database server.<br />
Notice the drop in &#8220;pink&#8221; (ignore the spikes, those are backups) since the email server is rejecting before it has to query the database:<br />
<a href="http://gallery.kulish.com/main.php?g2_itemId=4216"><img src="http://gallery.kulish.com/main.php?g2_view=core.DownloadItem&#038;g2_itemId=4217&#038;g2_serialNumber=2" title="Email Greylisting" alt=" Email Greylisting" /></a></p>
<p>All things considered, SPAM and processing load has been greatly reduced.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.kulish.com/2010/11/27/email-greylisting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a MySQL Capable Postfix RPM</title>
		<link>http://tech.kulish.com/2009/10/18/building-a-mysql-capable-postfix-rpm/</link>
		<comments>http://tech.kulish.com/2009/10/18/building-a-mysql-capable-postfix-rpm/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 15:19:59 +0000</pubDate>
		<dc:creator>Null</dc:creator>
				<category><![CDATA[Daemons]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[dovecot]]></category>
		<category><![CDATA[PGSQL]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[RPM]]></category>
		<category><![CDATA[RPMS]]></category>

		<guid isPermaLink="false">http://tech.lan.side/?p=45</guid>
		<description><![CDATA[Build Environment: CentOS 5 x86_64 Postfix 2.3.3 Sources gcc version 4.1.2 20080704 (Red Hat 4.1.2-44) 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux # Get the src 1) wget http://mirror.centos.org/centos/5.3/centosplus/SRPMS/postfix-2.3.3-2.1.centos.mysql_pgsql.src.rpm # Install the src RPM 2) rpm -i postfix-2.3.3-2.1.centos.mysql_pgsql.src.rpm # Install some dependencies I didn&#8217;t have 3.1) yum install pcre-devel [...]]]></description>
			<content:encoded><![CDATA[<p>Build Environment:<br />
CentOS 5 x86_64<br />
Postfix 2.3.3 Sources<br />
gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)</p>
<p>2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux</p>
<p># Get the src<br />
1) wget http://mirror.centos.org/centos/5.3/centosplus/SRPMS/postfix-2.3.3-2.1.centos.mysql_pgsql.src.rpm</p>
<p># Install the src RPM<br />
2) rpm -i postfix-2.3.3-2.1.centos.mysql_pgsql.src.rpm</p>
<p># Install some dependencies I didn&#8217;t have<br />
3.1) yum install pcre-devel<br />
3.2) yum install rpm-build<br />
3.3) yum install mysql-devel.x86_64 openldap-devel.x86_64 db4-devel.x86_64<br />
3.4) yum install gcc.x86_64</p>
<p># Edit SPECS; remove postgres support<br />
4.1) cd /usr/src/redhat/SPECS<br />
4.2) vi postfix.spec and change &#8220;%%define PGSQL 1&#8243; to &#8220;%define PGSQL 0&#8243;<br />
     # I didn&#8217;t want Postgres support<br />
4.3) &#8220;%define MYSQL 1&#8243; was already defined for me</p>
<p># Build the new rpm<br />
5) rpmbuild -ba postfix.spec # Ignore warnings</p>
<p># Install the new rpm<br />
6.1) cd /usr/src/redhat/RPMS<br />
6.2) rpm -i postfix-2.3.3-2.1.centos.mysql_pgsql.x86_64.rpm</p>
<p>Building an RPM build environment: <a href="http://wiki.centos.org/HowTos/SetupRpmBuildEnvironment">CentOS Wiki</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.kulish.com/2009/10/18/building-a-mysql-capable-postfix-rpm/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Spam Bashing</title>
		<link>http://tech.kulish.com/2006/03/07/spam-bashing/</link>
		<comments>http://tech.kulish.com/2006/03/07/spam-bashing/#comments</comments>
		<pubDate>Tue, 07 Mar 2006 23:55:06 +0000</pubDate>
		<dc:creator>Null</dc:creator>
				<category><![CDATA[Daemons]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[amavis]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[SMTP]]></category>
		<category><![CDATA[spamassassin]]></category>

		<guid isPermaLink="false">http://tech.lan.side/?p=107</guid>
		<description><![CDATA[We finally have our spam filtering back in place at kulish.com. We&#8217;ve set it to a semi-aggressive filter where pretty much every incoming email is marked with a spam score. We&#8217;re using the postfix+amavis+clamd+spamassassin setup. While we&#8217;ve been doing without it for a few months (using client side stuff until I found time), I still [...]]]></description>
			<content:encoded><![CDATA[<p>We finally have our spam filtering back in place at kulish.com. We&#8217;ve set it to a semi-aggressive filter where pretty much every incoming email is marked with a spam score.</p>
<p>We&#8217;re using the postfix+amavis+clamd+spamassassin setup.</p>
<p>While we&#8217;ve been doing without it for a few months (using client side stuff until I found time), I still don&#8217;t remember it working this well on the last server install.</p>
<p>Here&#8217;s a wopper of an email, just after the installation and testing were completed. The receiving parties and server names have been sanitized to protect the marginally innocent (**PROTECTED**).</p>
<p>From ***PRO@TECTED***.com Tue Feb 14 23:02:47 2006<br />
Return-Path:<br />
Delivered-To: spam-quarantine<br />
X-Envelope-From:<br />
X-Envelope-To: **PROTECTED**<br />
X-Quarantine-Id:<br />
Received: from lh (unknown [61.130.156.43])<br />
by **PROTECTED** (Postfix) with SMTP id D90164B92A;<br />
Tue, 14 Feb 2006 23:02:35 -0600 (CST)<br />
Received: from 61.130.156.43 (HELO localhost.localdomain) (61.130.156.43)<br />
by 61.130.156.43 with SMTP; Wed, 15 Feb 2006 07:06:05 +0200<br />
Message-Id:</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.kulish.com/2006/03/07/spam-bashing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Debian: Email Server Build</title>
		<link>http://tech.kulish.com/2005/03/04/debian-email-server-build/</link>
		<comments>http://tech.kulish.com/2005/03/04/debian-email-server-build/#comments</comments>
		<pubDate>Fri, 04 Mar 2005 05:00:28 +0000</pubDate>
		<dc:creator>Null</dc:creator>
				<category><![CDATA[Daemons]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[postfix]]></category>

		<guid isPermaLink="false">http://tech.lan.side/?p=111</guid>
		<description><![CDATA[Another semi-how-to for my old email server build. 1. Partition harddrive: /boot 150MB Primary hda1 bootable / 3000MB Logical hda5 /var 15000MB Logical hda6 /home 6000MB Logical hda7 swap 1024MB Primary hda3 end of drive /usr Balance Logical hda8 2. Activate swap partition 3. Initialize / first, then the rest (all partitions ext3) 4. Install [...]]]></description>
			<content:encoded><![CDATA[<p>Another semi-how-to for my old email server build.</p>
<p>1. Partition harddrive:<br />
/boot	 150MB	 Primary	hda1	bootable<br />
/	 3000MB	Logical	 hda5<br />
/var	 15000MB	Logical	 hda6<br />
/home	 6000MB	Logical	 hda7<br />
swap	 1024MB	Primary	hda3	end of drive<br />
/usr	 Balance	Logical	 hda8</p>
<p>2. Activate swap partition<br />
3. Initialize / first, then the rest (all partitions ext3)<br />
4. Install kernel<br />
5. Configure network<br />
6. Install base system via http<br />
7. Make system bootable<br />
a. Install lilo into the MBR<br />
b. Put all entries into menu<br />
8. Reboot system<br />
9. Remove pcmcia packages<br />
10. Cancel out of all package managers (tasksel and apt)<br />
11. No configuration of email system (exim)<br />
12. Edit /etc/apt/sources.list to run Sarge:<br />
deb http://debian.mirrors.pair.com sarge main non-free contrib<br />
deb http://ftp.uk.debian.org/debian-non-US sarge/non-US main non-free contrib<br />
deb http://security.debian.org/ sarge/updates main contrib non-free<br />
13. apt-get update<br />
14. apt-get dist-upgrade	 (may have to run multiple times)<br />
15. apt-get install dhcp3-server	 (use config in cvs)<br />
16. apt-get install bind9	 (use namedb files in cvs)<br />
17. apt-get install apache-common	 (use config in cvs)<br />
18. apt-get install postfix-tls postfix-mysql<br />
a. Internet with smarthost<br />
b. mail.mchsi.com	 (for relaying)<br />
c. noc@tekengine.net	 (added to aliases)<br />
19. Configure postfix main.cf<br />
a. useradd virtual (same uid/gid list in main.cf)<br />
b. mkdir /var/virtual	 (chmod 750, chown virtual)<br />
c. copy virtual dir to current server<br />
d. copy mysql* files to /etc/postfix	 (use files in cvs)<br />
e. /etc/init.d/postfix restart<br />
f. mailq to check queue status<br />
20. apt-get install libsasl2-modules libsasl2-modules-mysql<br />
a. configure main.cf	 (check cvs)<br />
b. copy smtpd.conf to /etc/postfix/sasl	(file in cvs)<br />
21. Test connectivity<br />
a. telnet mercury 25<br />
b. send email using client on LAN<br />
22. apt-get install amavisd-new clamav-daemon spamassassin<br />
a. accept defaults<br />
23. apt-get install courier-imap-ssl courier-authmysql courier-pop-ssl<br />
a. edit authdaemon<br />
b. edit authmysql<br />
c. /etc/init.d/courier-authdaemon<br />
24. Edit amavis conf file to desired thresholds<br />
25. Edit master.cf and main.cf to use amavisd</p>
<p>conf files:<br />
/etc/courier/authmysqlsrc<br />
/etc/postfix/mysql*<br />
/etc/postfix/sasl/smtpd.conf<br />
squirrelmail config</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.kulish.com/2005/03/04/debian-email-server-build/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SASL Screws Mail Admins (AGAIN)</title>
		<link>http://tech.kulish.com/2004/06/16/sasl-screws-mail-admins-again/</link>
		<comments>http://tech.kulish.com/2004/06/16/sasl-screws-mail-admins-again/#comments</comments>
		<pubDate>Wed, 16 Jun 2004 21:49:01 +0000</pubDate>
		<dc:creator>Null</dc:creator>
				<category><![CDATA[Daemons]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[sasl]]></category>
		<category><![CDATA[SMTP]]></category>

		<guid isPermaLink="false">http://tech.lan.side/?p=122</guid>
		<description><![CDATA[It seems that the SASL developers are still hard at work *censored*ing things up. Well, actually, I don&#8217;t think they have to work very hard at it. It seems to come natural to them. After upgrading the SASL libraries on my email server, SMTP authentication is refusing to work. I found a few tidbits of [...]]]></description>
			<content:encoded><![CDATA[<p>It seems that the SASL developers are still hard at work *censored*ing things up. Well, actually, I don&#8217;t think they have to work very hard at it. It seems to come natural to them.</p>
<p>After upgrading the SASL libraries on my email server, SMTP authentication is refusing to work.</p>
<p>I found a few tidbits of information, but no fixes.</p>
<p>I found this email that says I have to grab a cvs snapshot. They have GOT TO BE KIDDING! Sadly, they are not. Time to replace some project managers and developers here. They obviously haven&#8217;t a clue what they are doing.</p>
<p>Over here, I found another clue as to what is going on. A poor email server admin trying to un*censored* the SASL team&#8217;s problems.</p>
<p>But for now, we wait, watch, and hope a fix is forthcoming from these bozos.</p>
<p>UPDATE:</p>
<p>Here&#8217;s the smtpd.conf I used to get the lastest (2.1.18) SASL working!</p>
<p>pwcheck_method: auxprop<br />
#auxprop_plugin: mysql<br />
sql_engine: mysql<br />
sql_user: sqlusername<br />
sql_passwd: sqlpassword<br />
sql_hostnames: sqlserver<br />
sql_database: sqldatabase<br />
sql_statement: select password from mailbox where username = &#8216;%u@%r&#8217;<br />
sql_verbose: true<br />
mech_list: plain login</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.kulish.com/2004/06/16/sasl-screws-mail-admins-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>qmail Toaster Recovery</title>
		<link>http://tech.kulish.com/2003/08/14/qmail-toaster-recovery/</link>
		<comments>http://tech.kulish.com/2003/08/14/qmail-toaster-recovery/#comments</comments>
		<pubDate>Thu, 14 Aug 2003 21:36:30 +0000</pubDate>
		<dc:creator>Null</dc:creator>
				<category><![CDATA[Daemons]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[OS]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[ports]]></category>
		<category><![CDATA[qmail]]></category>
		<category><![CDATA[restore]]></category>

		<guid isPermaLink="false">http://tech.lan.side/?p=136</guid>
		<description><![CDATA[Ok, here is another one that was specifically geared to my setup, but I thought it may help someone else out in a pinch. I lost the motherboard for my web/email server due to that &#8220;capacitor problem&#8221;. What follows is how I got everything back up and functional. The server consisted of Apache and qmail, [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, here is another one that was specifically geared to my setup, but I thought it may help someone else out in a pinch. I lost the motherboard for my web/email server due to that &#8220;capacitor problem&#8221;. What follows is how I got everything back up and functional. The server consisted of Apache and qmail, plus various other odds and ends. Another item to note is that this is a FreeBSD 5.1-RELEASE system, linux admins change settings accordingly.</p>
<p>First, I get the basics on there so I have network connectivity and the tools I use to make everything go smoothly, not to mention there are some security issues involved.</p>
<p>1. install cvsup-without-gui</p>
<p>2. create /usr/src/sup-ports<br />
*default host=cvsup8.FreeBSD.org<br />
*default base=/usr<br />
*default prefix=/usr<br />
*default release=cvs tag=.<br />
# date=2003.03.25.23.00.00<br />
*default delete use-rel-suffix<br />
*default compress<br />
ports-all</p>
<p>3. cvsup ports</p>
<p>4. install portsupgrade</p>
<p>5. install apache2</p>
<p>6. install mod_php4 (sockets and bcmath)</p>
<p>7. install bind9</p>
<p>8. configure DHCPd<br />
isc-dhcp3 port</p>
<p>Did I forget to mention that this server was also my DHCPd server for the LAN?</p>
<p>9. install irssi</p>
<p>10. install lynx</p>
<p>11. install ntp</p>
<p>12. install openssl (overwrite_base)</p>
<p>13. install opensshportable (point rc.conf to new binary)</p>
<p>14. install screen</p>
<p>15. install mget</p>
<p>16. install zsh (it&#8217;s just my preference, thanks stibnite)</p>
<p>Now, we&#8217;ll get into the qmail (and vpopmail) install so I can start spooling email locally instead of letting my secondary take care of all the work. As I mentioned before, I use qmail&#8230; again, thanks stib. Some of the following items were taken verbatim from Flattie&#8217;s qmail toaster howto. I could provide a link, but thats why you have google bookmarked.</p>
<p>1. create users and groups for qmail and vpopmail (this may not be required when using the freebsd port but I did it before hand anyway)</p>
<p>mkdir /var/qmail<br />
pw groupadd -n vchkpw -g 98<br />
pw useradd -n vpopmail -u 98 -g 98 -c Vpopmail-Master -d /home/vpopmail -s /nonexistent (all on one line)<br />
pw groupadd -n nofiles -g 91<br />
pw groupadd -n qmail -g 92<br />
pw useradd -n alias -u 91 -g 91 -d /var/qmail/alias -s /nonexistent<br />
pw useradd -n qmaild -u 92 -g 91 -d /var/qmail -s /nonexistent<br />
pw useradd -n qmaill -u 93 -g 91 -d /var/qmail -s /nonexistent<br />
pw useradd -n qmailp -u 94 -g 91 -d /var/qmail -s /nonexistent<br />
pw useradd -n qmailq -u 95 -g 92 -d /var/qmail -s /nonexistent<br />
pw useradd -n qmailr -u 96 -g 92 -d /var/qmail -s /nonexistent<br />
pw useradd -n qmails -u 97 -g 92 -d /var/qmail -s /nonexistent</p>
<p>2. make directories</p>
<p>mkdir /var/log/qmail<br />
mkdir /var/log/qmail/qmail-send<br />
mkdir /var/log/qmail/qmail-smtpd<br />
mkdir /var/log/qmail/qmail-pop3d<br />
chown -R qmaill.wheel /var/log/qmail<br />
chmod -R 750 /var/log/qmail</p>
<p>3. cd /usr/ports/mail/qmail</p>
<p>make fetch<br />
make patch<br />
download eric johnstons smtpd-auth patch<br />
patch according to the included INSTALL document<br />
vi ./work/qmail*/conf-split change 23 > 199<br />
vi ./work/qmail*/conf-spawn change 120 > 255<br />
make install clean<br />
echo 255 > /var/qmail/control/concurrencyremote<br />
chmod 644 /var/qmail/control/concurrencyremote</p>
<p>4. cd /usr/ports/sysutils/daemontools<br />
make install clean</p>
<p>5. cd /usr/ports/sysutils/ucspi-tcp<br />
make install clean</p>
<p>6. vi /etc/tcp.smtp</p>
<p>127.0.0.1:allow,RELAYCLIENT=&#8221;"<br />
10.1.1.1-252:allow,RELAYCLIENT=&#8221;"<br />
:allow</p>
<p>/usr/local/bin/tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp &#038;1 > /dev/null</p>
<p>11. cd /usr/ports/mail/autorespond<br />
make install clean</p>
<p>12. install gdbm /usr/ports/databases/gdbm<br />
make install clean</p>
<p>13. check for files in /var/qmail/control<br />
(restore rcpthosts, virtualdomains, /home/vpopmail/domains and users dir)<br />
(remember to re-chmod if necessary)<br />
If you are actually using this document to help you do a restore and didn&#8217;t do a backup, yer fooked.</p>
<p>14. edit rc.conf<br />
sendmail_enable=&#8221;NONE&#8221;</p>
<p>15. edit /etc/mail/mailer.conf<br />
sendmail /var/qmail/bin/sendmail<br />
send-mail /var/qmail/bin/sendmail</p>
<p>Create the file structure for daemontools to run its qmail scripts:</p>
<p>mkdir /service<br />
chmod 755 /service<br />
mkdir /var/qmail/supervise<br />
chmod 755 /var/qmail/supervise</p>
<p>mkdir /var/qmail/supervise/qmail-smtpd<br />
mkdir /var/qmail/supervise/qmail-smtpd/log<br />
chmod +t /var/qmail/supervise/qmail-smtpd</p>
<p>mkdir /var/qmail/supervise/qmail-send<br />
mkdir /var/qmail/supervise/qmail-send/log<br />
chmod +t /var/qmail/supervise/qmail-send</p>
<p>mkdir /var/qmail/supervise/qmail-pop3d<br />
mkdir /var/qmail/supervise/qmail-pop3d/log<br />
chmod +t /var/qmail/supervise/qmail-pop3d</p>
<p>ln -s /var/qmail/supervise/* /service/</p>
<p>ls -la /service/</p>
<p>OUTPUT:<br />
lrwx&#8212;&#8212; 1 root wheel 32 Jan 01 00:00 qmail-pop3d@ -> /var/qmail/supervise/qmail-pop3d<br />
lrwx&#8212;&#8212; 1 root wheel 31 Sep 01 00:00 qmail-send@ -> /var/qmail/supervise/qmail-send<br />
lrwx&#8212;&#8212; 1 root wheel 32 Sep 01 00:00 qmail-smtpd@ -> /var/qmail/supervise/qmail-smtpd</p>
<p>SUPERVISION SCRIPTS</p>
<p>Create the supervision scripts that keep everything from dying.</p>
<p>1. vi /var/qmail/rc</p>
<p>#!/bin/sh<br />
env env &#8211; PATH=&#8221;/var/qmail/bin:/usr/local/bin&#8221; \<br />
qmail-start ./Maildir/</p>
<p>chmod 700 /var/qmail/rc</p>
<p>2. vi /var/qmail/supervise/qmail-pop3d/run</p>
<p>#!/bin/sh<br />
exec /usr/local/bin/tcpserver -H -R -v -c100 0 110 /var/qmail/bin/qmail-popup mail-host1.domain.org \<br />
/home/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir 2>&#038;1</p>
<p>chmod 755 /var/qmail/supervise/qmail-pop3d/run</p>
<p>3. vi /var/qmail/supervise/qmail-pop3d/log/run</p>
<p>#!/bin/sh<br />
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t s100000 n20 /var/log/qmail/qmail-pop3d 2>&#038;1</p>
<p>chmod 755 /var/qmail/supervise/qmail-pop3d/log<br />
chmod 755 /var/qmail/supervise/qmail-pop3d/log/run</p>
<p>4. vi /var/qmail/supervise/qmail-smtpd/run</p>
<p>#!/bin/sh<br />
exec /usr/local/bin/tcpserver -p -R -x /etc/tcp.smtp.cdb -u92 -g91 -v -c100 0 smtp rblsmtpd /var/qmail/bin/qmail-smtpd 2>&#038;1</p>
<p>chmod 755 /var/qmail/supervise/qmail-smtpd/run</p>
<p>5. vi /var/qmail/supervise/qmail-smtpd/log/run</p>
<p>#!/bin/sh<br />
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t s100000 n20 /var/log/qmail/qmail-smtpd 2>&#038;1</p>
<p>chmod 755 /var/qmail/supervise/qmail-smtpd/log<br />
chmod 755 /var/qmail/supervise/qmail-smtpd/log/run</p>
<p>6. vi /var/qmail/supervise/qmail-send/run</p>
<p>#!/bin/sh<br />
exec /var/qmail/rc</p>
<p>chmod 755 /var/qmail/supervise/qmail-send/run</p>
<p>7. vi /var/qmail/supervise/qmail-send/log/run</p>
<p>#!/bin/sh<br />
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t s100000 n20 /var/log/qmail/qmail-send 2>&#038;1</p>
<p>chmod 755 /var/qmail/supervise/qmail-send/log<br />
chmod 755 /var/qmail/supervise/qmail-send/log/run</p>
<p>QMAIL RC SCRIPT</p>
<p>Create the qmail rc script if its not already present due to the port install</p>
<p>1. vi /usr/local/etc/rc.d/qmail</p>
<p>#!/bin/sh<br />
case &#8220;$1&#8243; in<br />
start)<br />
echo -n &#8220;Starting qmail: svscan&#8221;<br />
if cd /var/qmail/supervise; then<br />
env &#8211; PATH=&#8221;/var/qmail/bin:/usr/local/bin:/usr/bin:/bin&#8221; svscan &#038;<br />
echo $! > /var/run/svscan.pid<br />
fi<br />
echo &#8220;.&#8221;<br />
;;<br />
stop)<br />
echo -n &#8220;Stopping qmail: svscan&#8221;<br />
kill `cat /var/run/svscan.pid`<br />
echo -n &#8221; qmail&#8221;<br />
svc -dx /var/qmail/supervise/*<br />
echo -n &#8221; logging&#8221;<br />
svc -dx /var/qmail/supervise/*/log<br />
echo &#8220;.&#8221;<br />
;;<br />
stat)<br />
cd /var/qmail/supervise<br />
svstat * */log<br />
;;<br />
doqueue|alrm)<br />
echo &#8220;Sending ALRM signal to qmail-send.&#8221;<br />
svc -a /var/qmail/supervise/qmail-send<br />
;;<br />
queue)<br />
qmail-qstat<br />
qmail-qread<br />
;;<br />
reload|hup)<br />
echo &#8220;Sending HUP signal to qmail-send.&#8221;<br />
svc -h /var/qmail/supervise/qmail-send<br />
echo &#8220;Sending HUP signal to qmail-pop3d.&#8221;<br />
svc -h /var/qmail/supervise/qmail-pop3d<br />
;;<br />
pause)<br />
echo &#8220;Pausing qmail-send&#8221;<br />
svc -p /var/qmail/supervise/qmail-send<br />
echo &#8220;Pausing qmail-smtpd&#8221;<br />
svc -p /var/qmail/supervise/qmail-smtpd<br />
echo &#8220;Pausing qmail-pop3d&#8221;<br />
svc -p /var/qmail/supervise/qmail-pop3d<br />
;;<br />
cont)<br />
echo &#8220;Continuing qmail-send&#8221;<br />
svc -c /var/qmail/supervise/qmail-send<br />
echo &#8220;Continuing qmail-smtpd&#8221;<br />
svc -c /var/qmail/supervise/qmail-smtpd<br />
echo &#8220;Continuing qmail-pop3d&#8221;<br />
svc -c /var/qmail/supervise/qmail-pop3d<br />
;;<br />
restart)<br />
echo &#8220;Restarting qmail:&#8221;<br />
echo &#8220;* Stopping qmail-smtpd.&#8221;<br />
svc -d /var/qmail/supervise/qmail-smtpd<br />
echo &#8220;* Sending qmail-send SIGTERM and restarting.&#8221;<br />
svc -t /var/qmail/supervise/qmail-send<br />
echo &#8220;* Restarting qmail-smtpd.&#8221;<br />
svc -u /var/qmail/supervise/qmail-smtpd<br />
echo &#8220;* Sending qmail-pop3d SIGTERM and restarting.&#8221;<br />
svc -t /var/qmail/supervise/qmail-pop3d<br />
;;<br />
cdb)<br />
tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp &#038;1 > /dev/null</p>
<p>That should do it.</p>
<p>I&#8217;m sure I missed a few steps or software installs in there somewhere. If I did, don&#8217;t come crying to me, that&#8217;s what your mamma is for. After you&#8217;re done crying, feel free to drop me a line and tell me what I missed, thanks.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.kulish.com/2003/08/14/qmail-toaster-recovery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: kulish.com @ 2012-02-07 18:53:53 by W3 Total Cache -->
