<?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>PHP FormMail Maker General Help</title>
	<atom:link href="http://www.formmail-maker.com/wordpress/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.formmail-maker.com/wordpress</link>
	<description>A place to make php web form simply works</description>
	<lastBuildDate>Fri, 11 Jun 2010 04:11:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to customize email message in the field level?</title>
		<link>http://www.formmail-maker.com/wordpress/?p=56</link>
		<comments>http://www.formmail-maker.com/wordpress/?p=56#comments</comments>
		<pubDate>Wed, 19 May 2010 17:07:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.formmail-maker.com/wordpress/?p=56</guid>
		<description><![CDATA[The field name in the form is field_N. The N starts from 0. For example, you have 3 fields in the form,  the field names in the form will be field_0, field_1, field_2. If you want to control every field value in the email message, you can use %field_N% format. please click the &#8220;Customize email [...]]]></description>
			<content:encoded><![CDATA[<p>The field name in the form is <strong>field_N</strong>. The N starts from 0. For example, you have 3 fields in the form,  the field names in the form will be field_0, field_1, field_2. If you want to control every field value in the email message, you can use <strong>%field_N%</strong> format.</p>
<p>please click the &#8220;Customize email &amp; auto-response message&#8221; link, then put your customized message to the text box. Here is an example:</p>
<pre class="brush:php">Customizing email message for EVERY field:

Sender's Email : %field_0%
Full Name: %field_1%
Comments:
%field_2%

Cheers,
Web Administrator

IP: %IP%
Date: %Date%
Time: %Time%
</pre>
<p>As you can see, you can also use  %IP% for sender&#8217;s IP, %Date% for date of server , and %Time% for time of server.</p>
<p>If you want  <strong>html format email</strong>, please use standard html tags in the template. Using style block and javascript code block in the email template might not work as you expect, because they might be blocked or removed when you receive.</p>
<p>See below screen shot for details:</p>
<p><a href="http://www.formmail-maker.com/wordpress/wp-content/uploads/2010/05/customize-email-template-with-fields.jpg"><img class="alignnone size-full wp-image-54" title="customize-email-template-with-fields" src="http://www.formmail-maker.com/wordpress/wp-content/uploads/2010/05/customize-email-template-with-fields.jpg" alt="" width="649" height="423" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.formmail-maker.com/wordpress/?feed=rss2&amp;p=56</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using Plesk Qmail Server as Spam Bot for 6 Years &#8211; Spamdyke Is the Solution to Fix It</title>
		<link>http://www.formmail-maker.com/wordpress/?p=19</link>
		<comments>http://www.formmail-maker.com/wordpress/?p=19#comments</comments>
		<pubDate>Fri, 07 May 2010 03:30:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Email Problem]]></category>
		<category><![CDATA[Cronjob]]></category>
		<category><![CDATA[Email Server]]></category>
		<category><![CDATA[Plesk]]></category>
		<category><![CDATA[QMail]]></category>
		<category><![CDATA[Spam Bot]]></category>
		<category><![CDATA[Spamdyke]]></category>

		<guid isPermaLink="false">http://www.formmail-maker.com/wordpress/?p=19</guid>
		<description><![CDATA[The Problem – Qmail server being used as Spam Bot for a long time, 6 years actually One client of mine told me that his email server was very slow sometime. I found the reason that because his email server was being used by spammers as a spam bot for a long time – 6 [...]]]></description>
			<content:encoded><![CDATA[<h2>The Problem – Qmail server being used as Spam Bot for a long time, 6 years actually</h2>
<p>One client of mine told me that his email server was very slow sometime. I found the reason that because his email server was being used by spammers as a spam bot for a long time – 6 years actually. There were tons of spam messages being sent out in every minute during the last 6 years (from 2004 to 2010). The server is a dedicated server rented from an ISP in Vancouver, Canada. The server is using Plesk control panel (7.1.1 RedHat 7.3 71040727.08) and Qmail server.</p>
<p>If you happened to know such Plesk Qmail server like my client&#8217;s one, you can setup your Outlook or Thunderbird email client. Then use that machine as spam machine as easy as 123:</p>
<ul>
<li>Step 1 : setup a fake email account as sender, like <span class="mh-plaintext">what<a href='http://mailhide.recaptcha.net/d?k=016zKo2dKyzRjkKDj3xMHsNg==&amp;c=HBHfqwqYpPo8aqeMBQhSibXc2JMejzLls-3o8bAzFCrcfn2DYa2A4bGQuU5_K_d_' onclick="window.open('http://mailhide.recaptcha.net/d?k=016zKo2dKyzRjkKDj3xMHsNg==&amp;c=HBHfqwqYpPo8aqeMBQhSibXc2JMejzLls-3o8bAzFCrcfn2DYa2A4bGQuU5_K_d_', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;" title="Reveal this e-mail address">...</a>@domain-in-that-machine.com</span></li>
<li>Step 2 : setup a faker email account as receiver, like <span class="mh-plaintext">no-s<a href='http://mailhide.recaptcha.net/d?k=016zKo2dKyzRjkKDj3xMHsNg==&amp;c=PaQHcDWQ2uEmjn0DNEJRO8jAE9O_IiM3X-c6ezMA4kJwk1upxh_0MCnwIFbNFQu8' onclick="window.open('http://mailhide.recaptcha.net/d?k=016zKo2dKyzRjkKDj3xMHsNg==&amp;c=PaQHcDWQ2uEmjn0DNEJRO8jAE9O_IiM3X-c6ezMA4kJwk1upxh_0MCnwIFbNFQu8', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;" title="Reveal this e-mail address">...</a>@domain-in-that-machine.com</span></li>
<li>Step 3 : CC or BCC email addresses for spamming</li>
</ul>
<p>The trick is to use any valid domains in that email server.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-1583366589365847";
/* 300x250, created 6/10/10 */
google_ad_slot = "5015582822";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h2>The Solution – Use Spamdyke to Stop Spamming Relay</h2>
<p>The Spamdyke is a brilliant idea. As spamdyke.org said it&#8217;s a drop-in connection-time spam filter for qmail AND no need to re-compile the qmail server. After suffering some pains on the configuration of spamdyke, the Spamdyke and qmail work amazingly good togther.</p>
<p>Mainly, I use two methods of spamdyke to fight with spammers:</p>
<ol>
<li> smtp authentication &#8211; only allows authorized users to send out emails. This will stop spammers to use email address like <span class="mh-plaintext">m<a href='http://mailhide.recaptcha.net/d?k=016zKo2dKyzRjkKDj3xMHsNg==&amp;c=i2ycC6Vvblbl9gQlaJLvaA==' onclick="window.open('http://mailhide.recaptcha.net/d?k=016zKo2dKyzRjkKDj3xMHsNg==&amp;c=i2ycC6Vvblbl9gQlaJLvaA==', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;" title="Reveal this e-mail address">...</a>@mydomain.com</span> as a sender to send out spam messages through the qmail server. However, use smtp authentication method ALONE is not enough. If we use it alone, we can&#8217;t receive any emails from outside (Yahoo, Gmail, etc&#8230;). That&#8217;s reason the method 2) is used.</li>
<li> the recipients whitelist &#8211; only receive emails for accounts in the white list. This will allow all email accounts within qmail server receiving emails from outside. Because the email accounts is constantly updated by the Plesk admin panel. I have to write a script as a cronjob to update this recipients whitelist based on Plesk&#8217;s email accounts.</li>
</ol>
<p><strong>Here is the spamdyke configuration file:</strong></p>
<pre class="brush:bash">
filter-level=require-auth
smtp-auth-level=ondemand-encrypted
smtp-auth-command=/var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
log-level=verbose
#full-log-dir=/usr/local/psa/var/log/spamdyke
local-domains-file=/var/qmail/control/rcpthosts
max-recipients=20
idle-timeout-secs=60
graylist-level=only
graylist-dir=/var/qmail/spamdyke/greylist
graylist-min-secs=300
graylist-max-secs=1814400
sender-blacklist-file=/var/qmail/spamdyke/blacklist_senders
recipient-blacklist-file=/var/qmail/spamdyke/blacklist_recipients
recipient-whitelist-file=/var/qmail/spamdyke/whitelist_recipients
ip-blacklist-file=/var/qmail/spamdyke/blacklist_ip
rdns-whitelist-file=/var/qmail/spamdyke/whitelist_rdns
ip-whitelist-file=/var/qmail/spamdyke/whitelist_ip
reject-empty-rdns
reject-unresolvable-rdns
greeting-delay-secs=2
reject-missing-sender-mx

tls-level=smtp
tls-certificate-file=/var/qmail/control/servercert.pem
local-domains-file=/var/qmail/control/rcpthosts
</pre>
<p><strong>Here is the Plesk qmail service for xinetd. Drop in spamdyke before the qmail_smtpd</strong>:</p>
<pre class="brush:bash">
service smtp
{
        socket_type     = stream
        protocol        = tcp
        wait            = no
        disable         = no
        #user            = root
        user            = qmaild
        instances       = UNLIMITED
        server          = /var/qmail/bin/tcp-env
        #server_args     = /usr/sbin/rblsmtpd  -r sbl.spamhaus.org /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bi
n/cmd5checkpw /var/qmail/bin/true
        server_args     = -Rt0 /usr/local/bin/spamdyke -f /etc/spamdyke.conf  /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /v
ar/qmail/bin/cmd5checkpw /var/qmail/bin/true
}
</pre>
<p><strong>Here is the php cronjob script to update the spamdyke recipients whitelist:</strong></p>
<pre class="brush:php">
&lt;?php
/**
 * May 5, 2010
 *
 * email: phpfmg
 *  ^.^ at ^.^
 * gmail.com
 *
 * Spamdyke will use filter-level=require-auth to force smtp authentication.
 * However, use it ALONE will stop us receiving emails from 3rd party email servers, like Yahoo, Gmail, etc...
 * The idea is to use whitelist_recipients in Spamdyke (even it said it's BAD idea).
 * Combining  whitelist_recipients and filter-level=require-auth is to stop spamming (sending and receiveing)
 * email addresses with random name. For example, <span class="mh-plaintext">notE<a href='http://mailhide.recaptcha.net/d?k=016zKo2dKyzRjkKDj3xMHsNg==&amp;c=2BJ5puddN-y_6LHJFHU-ol2t9w1iSLJ2g7TiFPP0G08=' onclick="window.open('http://mailhide.recaptcha.net/d?k=016zKo2dKyzRjkKDj3xMHsNg==&amp;c=2BJ5puddN-y_6LHJFHU-ol2t9w1iSLJ2g7TiFPP0G08=', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;" title="Reveal this e-mail address">...</a>@yourdomain.com</span>.
 *
 * Create whitelist_recipients for Spamdyke.
 *
 *  */

$GLOBALS['qmail_mailnames_dir'] = '/var/qmail/mailnames';
$GLOBALS['spamdyke_whitelist_file'] = '/var/qmail/spamdyke/whitelist_recipients';

update_whitelist();

function update_whitelist(){
    $dir = $GLOBALS['qmail_mailnames_dir'];
    if( !is_dir($dir) )
        return ;

    $list = array();
    if ($dh = opendir($dir)) {
        while (($file = readdir($dh)) !== false) {
            $fullpath = $dir . "/" . $file;
            if( $file == '.' || $file == '..' || !is_dir($fullpath) )
                continue; 

            $s = get_email_accounts($fullpath);
            if( !empty($s) ) $list[] = $s ;
        };
        closedir($dh);
    };

    return strToFile( join("\n",$list), $GLOBALS['spamdyke_whitelist_file'] );
}

function get_email_accounts( $domain_path ){
    $dir = $domain_path;
    $domain = trim(basename($dir));
    $accounts = array();
    if ($dh = opendir($dir)) {
        while (($file = readdir($dh)) !== false) {
            $fullpath = $dir . "/" . $file;
            if( $file == '.' || $file == '..' || !is_dir($fullpath) )
                continue; 

            $accounts[] = trim($file) . "@" . $domain;
        };
        closedir($dh);
    };

    return join("\n",$accounts);
}

function strToFile( $str = '', $file, $mode='w' )
{
	$h = fopen( $file, $mode ) ;
	if( $h ){
		fwrite($h, $str);
        fclose($h);
		return true ;
	};
	return false;
}

?&gt;
</pre>
<p>The story is end here.</p>
<p>If you want to know more about the spamkdy, please continue reading.</p>
<h2>The problems and the fixed when installing Spamdyke for Plesk Qmail</h2>
<p>The Configuration Tests is a very good tool to scan its configuration and look for common configuration mistakes. The command I used is following:</p>
<pre class="brush:bash">
/usr/local/bin/spamdyke -f /etc/spamdyke.conf \
--config-test \
--config-test-smtpauth-username myusername \
--config-test-smtpauth-password xxxxxxxx \
--access-file /etc/tcp.smtp \
/var/qmail/bin/relaylock \
/var/qmail/bin/qmail-smtpd
</pre>
<p>The output with Error detected:</p>
<pre class="brush:bash">
05/03/2010 13:40:33 LOG OUTPUT
Testing configuration...
WARNING: Running tests as superuser root(0), group root(0). These test results may not be valid if the mail server runs as another user.
SUCCESS: spamdyke binary (/usr/sbin/spamdyke) is not owned by root and/or is not marked setuid.
INFO: Running command to test capabilities: /var/qmail/bin/relaylock
DEBUG(exec_command_argv()@exec.c:480): executing command: /var/qmail/bin/relaylock
SUCCESS: /var/qmail/bin/relaylock appears to offer TLS support but spamdyke will intercept and decrypt the TLS traffic so all of its filters can operate.
SUCCESS: /var/qmail/bin/relaylock appears to offer SMTP AUTH support. spamdyke will observe any authentication and trust its response. spamdyke will offer authentication if /var/qmail/bin/relaylock does not.
INFO(access-file): Testing file read: /etc/tcp.smtp
SUCCESS(access-file): Opened for reading: /etc/tcp.smtp
INFO(config-file): Testing file read: /etc/spamdyke.conf
SUCCESS(config-file): Opened for reading: /etc/spamdyke.conf
INFO(full-log-dir): Testing directory for writing: /usr/local/psa/var/log/spamdyke
SUCCESS(full-log-dir): Created and deleted file in directory: /usr/local/psa/var/log/spamdyke/spamdyke-test_1272919233_30663
INFO(ip-blacklist-file): Testing file read: /var/qmail/spamdyke/blacklist_ip
SUCCESS(ip-blacklist-file): Opened for reading: /var/qmail/spamdyke/blacklist_ip
INFO(ip-whitelist-file): Testing file read: /var/qmail/spamdyke/whitelist_ip
SUCCESS(ip-whitelist-file): Opened for reading: /var/qmail/spamdyke/whitelist_ip
INFO(local-domains-file): Testing file read: /var/qmail/control/rcpthosts
SUCCESS(local-domains-file): Opened for reading: /var/qmail/control/rcpthosts
INFO(rdns-whitelist-file): Testing file read: /var/qmail/spamdyke/whitelist_rdns
SUCCESS(rdns-whitelist-file): Opened for reading: /var/qmail/spamdyke/whitelist_rdns
INFO(recipient-blacklist-file): Testing file read: /var/qmail/spamdyke/blacklist_recipients
SUCCESS(recipient-blacklist-file): Opened for reading: /var/qmail/spamdyke/blacklist_recipients
INFO(sender-blacklist-file): Testing file read: /var/qmail/spamdyke/blacklist_senders
SUCCESS(sender-blacklist-file): Opened for reading: /var/qmail/spamdyke/blacklist_senders
INFO(sender-whitelist-file): Testing file read: /var/qmail/spamdyke/whitelist_senders
SUCCESS(sender-whitelist-file): Opened for reading: /var/qmail/spamdyke/whitelist_senders
INFO(smtp-auth-level): Examining authentication command: /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
SUCCESS(smtp-auth-level): File is executable: /var/qmail/bin/smtp_auth
INFO(smtp-auth-level): Running authentication command with unencrypted input: /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
DEBUG(exec_checkpassword_argv()@exec.c:108): executing SMTP AUTH command /var/qmail/bin/smtp_auth for user: myusername
ERROR: authentication misuse (no input given or no additional command path given, e.g. /bin/true): myusername
ERROR(smtp-auth-level): Authentication failed with unencrypted input: /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
INFO(smtp-auth-level): Running authentication command with encrypted input: /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
DEBUG(exec_checkpassword_argv()@exec.c:108): executing SMTP AUTH command /var/qmail/bin/smtp_auth for user: myusername
ERROR: authentication misuse (no input given or no additional command path given, e.g. /bin/true): myusername
ERROR(smtp-auth-level): Authentication failed with encrypted input: /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
INFO: No authentication commands support encrypted input; change the value of "smtp-auth-level" to "ondemand" or "always" instead of "ondemand-encrypted"
INFO(tls-certificate-file): Testing TLS by initializing SSL/TLS library with certificate and key
SUCCESS(tls-certificate-file): Opened for reading: /var/qmail/control/servercert.pem
SUCCESS(tls-certificate-file): Certificate and key loaded; SSL/TLS library successfully initialized
ERROR: Tests complete. Errors detected.
</pre>
<p>Then I found I have to add the &#8211;run-as-user qmaild parameter :</p>
<pre class="brush:bash">
/usr/local/bin/spamdyke -f /etc/spamdyke.conf \
--config-test \
--config-test-smtpauth-username raymond \
--config-test-smtpauth-password spiderman2 \
--access-file /etc/tcp.smtp \
--run-as-user qmaild \
/var/qmail/bin/relaylock \
/var/qmail/bin/qmail-smtpd
</pre>
<p>This time has no Error detected:</p>
<pre class="brush:bash">
05/03/2010 13:45:27 LOG OUTPUT
Testing configuration...
SUCCESS: Running tests as user qmaild(2020), group root(0).
SUCCESS: spamdyke binary (/usr/sbin/spamdyke) is not owned by root and/or is not marked setuid.
INFO: Running command to test capabilities: /var/qmail/bin/relaylock
DEBUG(exec_command_argv()@exec.c:480): executing command: /var/qmail/bin/relaylock
SUCCESS: /var/qmail/bin/relaylock does not appear to offer TLS support. spamdyke will offer, intercept and decrypt TLS traffic.
SUCCESS: /var/qmail/bin/relaylock does not appear to offer SMTP AUTH support. spamdyke will offer and process authentication.
INFO(access-file): Testing file read: /etc/tcp.smtp
SUCCESS(access-file): Opened for reading: /etc/tcp.smtp
INFO(config-file): Testing file read: /etc/spamdyke.conf
SUCCESS(config-file): Opened for reading: /etc/spamdyke.conf
INFO(full-log-dir): Testing directory for writing: /usr/local/psa/var/log/spamdyke
SUCCESS(full-log-dir): Created and deleted file in directory: /usr/local/psa/var/log/spamdyke/spamdyke-test_1272919527_31221
INFO(ip-blacklist-file): Testing file read: /var/qmail/spamdyke/blacklist_ip
SUCCESS(ip-blacklist-file): Opened for reading: /var/qmail/spamdyke/blacklist_ip
INFO(ip-whitelist-file): Testing file read: /var/qmail/spamdyke/whitelist_ip
SUCCESS(ip-whitelist-file): Opened for reading: /var/qmail/spamdyke/whitelist_ip
INFO(local-domains-file): Testing file read: /var/qmail/control/rcpthosts
SUCCESS(local-domains-file): Opened for reading: /var/qmail/control/rcpthosts
INFO(rdns-whitelist-file): Testing file read: /var/qmail/spamdyke/whitelist_rdns
SUCCESS(rdns-whitelist-file): Opened for reading: /var/qmail/spamdyke/whitelist_rdns
INFO(recipient-blacklist-file): Testing file read: /var/qmail/spamdyke/blacklist_recipients
SUCCESS(recipient-blacklist-file): Opened for reading: /var/qmail/spamdyke/blacklist_recipients
INFO(sender-blacklist-file): Testing file read: /var/qmail/spamdyke/blacklist_senders
SUCCESS(sender-blacklist-file): Opened for reading: /var/qmail/spamdyke/blacklist_senders
INFO(sender-whitelist-file): Testing file read: /var/qmail/spamdyke/whitelist_senders
SUCCESS(sender-whitelist-file): Opened for reading: /var/qmail/spamdyke/whitelist_senders
INFO(smtp-auth-level): Examining authentication command: /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
SUCCESS(smtp-auth-level): File is executable: /var/qmail/bin/smtp_auth
INFO(smtp-auth-level): Running authentication command with unencrypted input: /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
DEBUG(exec_checkpassword_argv()@exec.c:108): executing SMTP AUTH command /var/qmail/bin/smtp_auth for user: myusername
DEBUG(exec_checkpassword_argv()@exec.c:201): authentication successful: myusername
SUCCESS(smtp-auth-level): Authentication succeeded with unencrypted input: /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
INFO(smtp-auth-level): Running authentication command with encrypted input: /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
DEBUG(exec_checkpassword_argv()@exec.c:108): executing SMTP AUTH command /var/qmail/bin/smtp_auth for user: myusername
ERROR: authentication failure (bad username/password, vchkpw uses this to indicate SMTP access is not allowed): myusername
ERROR(smtp-auth-level): Authentication failed with encrypted input: /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true
INFO: No authentication commands support encrypted input; change the value of "smtp-auth-level" to "ondemand" or "always" instead of "ondemand-encrypted"
INFO(tls-certificate-file): Testing TLS by initializing SSL/TLS library with certificate and key
SUCCESS(tls-certificate-file): Opened for reading: /var/qmail/control/servercert.pem
SUCCESS(tls-certificate-file): Certificate and key loaded; SSL/TLS library successfully initialized
SUCCESS: Tests complete. No errors detected.
</pre>
<p>I was happy about the test result. No errors detected. Good. So I restarted xinetd with following command:</p>
<pre class="brush:bash">
Killall –HUP xinetd
</pre>
<p>And then test the spamdyke with Outlook. However, I got error &#8220;Authentication failed: myusername&#8221;.</p>
<pre class="brush:bash">
DEBUG(exec_checkpassword_argv()@exec.c:108): executing SMTP AUTH command /var/qmail/bin/smtp_auth for user: myusername
ERROR: authentication misuse (no input given or no additional command path given, e.g. /bin/true): myusername

05/04/2010 11:30:01 - Authentication failed: myusername

05/04/2010 11:30:01 FROM SPAMDYKE TO REMOTE: 37 bytes
535 Refused. Authentication failed.

05/04/2010 11:30:01 CLOSED
</pre>
<p>I tried telnet to do smtp commands manually without any problems. I used base64 to encode my username and password. Then use the following telnet commands:</p>
<pre class="brush:bash">
> telnet mymailserver.com 25
auth login
334 VXNlcm5hbWU6
bXl1c2VybmFtZQ==
334 UGFzc3dvcmQ6
bXlwYXNzd29yZA==
235 go ahead
</pre>
<p>As you can see, I passed the Spamdyke SMTP authentication. Why my outlook failed with the same username and password? Finally, I found the problem can be solved on the xinetd smtp script. I have to change the user from root to qmaild. I don’t know why, but it works. If you can explain to me, I will appreciate your input.</p>
<p>Here is final /etc/xinetd/smtp_psa script:</p>
<pre class="brush:bash">
service smtp
{
        socket_type     = stream
        protocol        = tcp
        wait            = no
        disable         = no
        #user            = root
        user            = qmaild
        instances       = UNLIMITED
        server          = /var/qmail/bin/tcp-env
        #server_args     = /usr/sbin/rblsmtpd  -r sbl.spamhaus.org /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bi
n/cmd5checkpw /var/qmail/bin/true
        server_args     = -Rt0 /usr/local/bin/spamdyke -f /etc/spamdyke.conf  /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /v
ar/qmail/bin/cmd5checkpw /var/qmail/bin/true
}
</pre>
<p>From the maillog file, there were 15585 DENIED_AUTH_REQUIRED message were logged in one day. Each DENIED_AUTH_REQUIRED message means one spamming message attempted. So in the last six years, there were over 34 millions (15585 * 6 * 365 = 34,131,150) spam messages had been sent out by this email server.  </p>
<p><strong>Thankfully, the happy ending is the Qmail server is no longer be used as spam bot. </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.formmail-maker.com/wordpress/?feed=rss2&amp;p=19</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Web Form with Unlimited Levels of Dependent Dropdowns</title>
		<link>http://www.formmail-maker.com/wordpress/?p=1</link>
		<comments>http://www.formmail-maker.com/wordpress/?p=1#comments</comments>
		<pubDate>Sun, 02 May 2010 23:58:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Dependent Dropdowns]]></category>

		<guid isPermaLink="false">http://www.formmail-maker.com/wordpress/?p=1</guid>
		<description><![CDATA[A lots of users asking whether the form maker can implement  dependent dropdrowns  easily.  After a few days hard work, the answer is YES. Now you can make unlimited levels of dependent dropdown list. Four Predefined Dependent Dropdowns in One Form Demo 2 levels (State/Province of USA and Canada) 3 levels (Full country, city and [...]]]></description>
			<content:encoded><![CDATA[<p>A lots of users asking whether the form maker can implement  dependent dropdrowns  easily.  After a few days hard work, the answer is YES. Now you can make unlimited levels of dependent dropdown list.</p>
<h2><a href="http://www.formmail-maker.com/wordpress/var/demo/dependent-dropdowns/form.php">Four Predefined Dependent Dropdowns in One Form Demo</a></h2>
<ol>
<li>2 levels (State/Province of USA and Canada)</li>
<li>3 levels (Full country, city and State/Province of USA and Canada only)</li>
<li>3 levels (All cities of USA and Canada)</li>
<li>3 levels (All cities of the world)</li>
</ol>
<p>The world&#8217;s city data is from mysql.com <a href="http://downloads.mysql.com/docs/world.sql.zip">world.sql.zip</a>. The sample data used in the <code>world</code> database  is     Copyright Statistics Finland,     <a href="http://www.stat.fi/worldinfigures" target="_top">http://www.stat.fi/worldinfigures</a>.</p>
<p>The original data is ANSI format. I have counverted it to utf-8 format.  I don&#8217;t know how update the data is.</p>
<p><span style="text-decoration: underline;"><a title="Dependent dropdowns of USA State and Canada Province" href="http://www.formmail-maker.com/wordpress/var/demo/dependent-dropdowns/form.php" target="_blank">Check Out the Demo</a></span> or <span style="text-decoration: underline;"><a title="Video tour for implementing dependent selection boxes" href="http://www.formmail-maker.com/dependent-dropdown-how-to.html">Watch How-To Video</a></span></p>
<p><a href="http://www.formmail-maker.com/wordpress/wp-content/uploads/2010/04/dependent-dropdown-special-rows.png"><img class="alignnone size-medium wp-image-8" title="dependent-dropdown-special-rows" src="http://www.formmail-maker.com/wordpress/wp-content/uploads/2010/04/dependent-dropdown-special-rows-300x225.png" alt="" width="300" height="225" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.formmail-maker.com/wordpress/?feed=rss2&amp;p=1</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

