OOPS -- I should have pointed out that I use QMail flags to control this behavior too...

I have made corrected notations below...

If I had my druthers, a stock QMT would come with SpamDyke pre-installed... not so much so that I could block a great deal of SPAM, but because the SpamDyke control of the qmail-smtp is so easy.

So, here is how *I* do it:
1) Port 25 (SMTP) is for receiving mail INTO my server ONLY (that is, inbound mail TO my users):
 - There are is NO AUTH on this port... PERIOD!
- There is no relaying on this port either (unless I have an smtproutes entry)
 - While I do allow TLS, I do not require it.
Here is my EHLO reply on port 25:

   250-mail.myserver.com - Welcome
   250-STARTTLS
   250-PIPELINING
   250-8BITMIME
   250-SIZE 67108864
   250 X-NOTHING

I accomplish this by setting the *SPAMDYKEFLAGS *entry in the file _*/var/qmail/control/smtp/run*_ to show a DIFFERENT config file. The other special settings are shown too:

   SPAMDYKE="/usr/local/bin/spamdyke"
   SPAMDYKEFLAGS="-f /etc/spamdyke/smtp.conf"
   export SMTPAUTH=0
   export REQURE_AUTH=0
   export SMTPS=0

Then, in the _*spamdyke/*__*smtp.conf*_ file, I create an entry:

   smtp-auth-level=none


2) Port 587 (SUBMISSION) is for outbound mail ONLY (that is, outbound mail FROM my users):
 - AUTH is required on this port
- On some servers, I REQUIRE TLS, but on most it is allowed but not required.
Here is my EHLO reply on port 587:

   250-mail.myserver.com - Welcome
   250-STARTTLS
   250-PIPELINING
   250-8BITMIME
   250-SIZE 67108864
   250 AUTH LOGIN PLAIN CRAM-MD5

I accomplish this by setting the *SPAMDYKEFLAGS *entry in the file _*/var/qmail/control/submission/run*_ to show a DIFFERENT config file. The other special settings are shown too:

   SPAMDYKE="/usr/local/bin/spamdyke"
   SPAMDYKEFLAGS="-f /etc/spamdyke/submission.conf"
   export SMTPAUTH=1
   export REQUIRE_AUTH=1
   export SMTPS=0  (or =1 if you want to force SSL/TLS)

Then, in the _*spamdyke/submission*__*.conf*_ file, I make sure the smtp-auth-level is NOT SET:

   #smtp-auth-level=none

NOTE: This tells spamdyke to allow qmail to authenticate

3) On systems that have valid SSL certificates, I have a port 465 (SMTP-SSL) port open as well
 - AUTH is required on this port
 - I REQUIRE TLS or SSL
I cannot show you the EHLO reply, as I don't have a tool to do the TLS decryption for me :)

Still, I accomplish this by setting the *SPAMDYKEFLAGS *entry in the file _*/var/qmail/control/smtp-ssl/run*_ to show a DIFFERENT config file:

   SPAMDYKE="/usr/local/bin/spamdyke"
   SPAMDYKEFLAGS="-f /etc/spamdyke/smtp-ssl.conf"
   export SMTPAUTH=1
   export REQUIRE_AUTH=1
   export SMTPS=1

Then, in the _*spamdyke/smtp-ssl*__*.conf*_ file, I make sure the smtp-auth-level is NOT SET:

   #smtp-auth-level=none

NOTE: This tells spamdyke to allow qmail to authenticate

====
So the point is that you can configure SpamDyke to behave totally differently on all 3 SMTP ports (25, 587, & if you want, 465) simply by setting the config file to be unique in the supervise/run script for each port, and changing some of the environment variables in the supervise/run script.

I hope this helps others...

Dan McAllister

--
IT4SOHO, LLC
33 - 4th Street N, Suite 211
St. Petersburg, FL 33701-3806

CALL TOLL FREE:
  877-IT4SOHO

877-484-7646 Phone
727-647-7646 Local
727-490-4394 Fax

We have support plans for QMail!

Reply via email to