Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-03-29, 07:13:51

Author Topic: spamdyke working properly KloxoMR 201401****  (Read 24351 times)

0 Members and 1 Guest are viewing this topic.

Offline chrisf

  • Senior Master
  • **
  • Posts: 883
  • Karma: +11/-1
  • Gender: Male
  • Be the change that you wish to see in the world.
    • View Profile
    • Conviction's Hosting
spamdyke working properly KloxoMR 201401****
« on: 2014-01-15, 09:05:25 »
Spamdyke has not worked with KloxoMR for a while.  The reason is Mustafa added rblstmpd blacklist and it conflicts with spamdyke's ability to use auth.  Also, spamdyke must be enabled for smtps and the server pem file must be configured.

I rewrote the spamdyke section of the neccessary files below.  If you disable spamdyke, rblsmptd blacklist will automaticalky start working again automatically.  Since spamdyke can manage blacklists, there is no reason for both anyhow.

/var/qmail/supervise/smtp/run
Code: [Select]
#!/bin/sh

QMAILDUID=$(id -u qmaild)
NOFILESGID=$(id -g qmaild)
MAXSMTPD=$(cat /var/qmail/control/concurrencyincoming)
SMTPD="/var/qmail/bin/qmail-smtpd"
TCP_CDB="/etc/tcprules.d/tcp.smtp.cdb"
HOSTNAME=$(hostname)
VCHKPW="/home/vpopmail/bin/vchkpw"
#RECORDIO="/usr/bin/recordio"
RECORDIO=""

RBLSMTPD=""
BLACKLIST=""

if [ -f /var/qmail/control/spamdyke ] ; then
        SPAMDYKE=$(cat /var/qmail/control/spamdyke)" --log-level=info"
else
        SPAMDYKE=""
           if [ -f /var/qmail/control/rblsmtpd ] ; then
            RBLSMTPD=$(cat /var/qmail/control/rblsmtpd)
            BLACKLIST=$(cat /var/qmail/control/blacklists)
           fi
fi

### MR -- incresing SOFTLIMITVAR if not enough (example: because 'login fail')
if [ `uname -m` = 'x86_64' ] ; then
        SOFTLIMITVAR="72000000"
else
        SOFTLIMITVAR="18000000"
fi

IP=0
PORT=25

### MR -- SSL must using SMTPS=1 and SSL=1 but non-SSL only SSL=0 (without SMTPS=0)
export SMTPAUTH="!" \
        SSL=0 \
        REQUIRE_AUTH=0 \
        FORCE_TLS=0 \
        DENY_TLS=0 \
        AUTH=1 \
        REQUIRE_AUTH=0 \
        ALLOW_INSECURE_AUTH=1

### MR -- spamhaus.org recommended for not using $RBLSMTPD $BLACKLIST entry before $SMTPD
exec /usr/bin/softlimit -m $SOFTLIMITVAR \
        /usr/bin/tcpserver -v -R -H -l $HOSTNAME -x $TCP_CDB -c "$MAXSMTPD" \
        -u "$QMAILDUID" -g "$NOFILESGID" $IP $PORT $RECORDIO \
        $SPAMDYKE $RBLSMTPD $SMTPD $VCHKPW /bin/true 2>&1

/var/qmail/supervise/smtp-ssl/run
Code: [Select]
#!/bin/sh

QMAILDUID=$(id -u qmaild)
NOFILESGID=$(id -g qmaild)
MAXSMTPD=$(cat /var/qmail/control/concurrencyincoming)
SMTPD="/var/qmail/bin/qmail-smtpd"
TCP_CDB="/etc/tcprules.d/tcp.smtp.cdb"
HOSTNAME=$(hostname)
VCHKPW="/home/vpopmail/bin/vchkpw"
#RECORDIO="/usr/bin/recordio"
RECORDIO=""

RBLSMTPD=""
BLACKLIST=""

if [ -f /var/qmail/control/spamdyke ] ; then
        SPAMDYKE=$(cat /var/qmail/control/spamdyke)" --log-level=info --tls-level smtps --tls-certificate-file /var/qmail/control/servercert.pem"
else
        SPAMDYKE=""
           if [ -f /var/qmail/control/rblsmtpd ] ; then
            RBLSMTPD=$(cat /var/qmail/control/rblsmtpd)
            BLACKLIST=$(cat /var/qmail/control/blacklists)
           fi
fi

### MR -- incresing SOFTLIMITVAR if not enough (example: because 'login fail')
if [ `uname -m` = 'x86_64' ] ; then
        SOFTLIMITVAR="72000000"
else
        SOFTLIMITVAR="18000000"
fi

IP=0
PORT=465

### MR -- SSL must using SMTPS=1 and SSL=1 but non-SSL only SSL=0 (without SMTPS=0)
export SMTPAUTH="!" \
        SMTPS=1 \
        SSL=1 \
        REQUIRE_AUTH=0 \
        FORCE_TLS=0 \
        DENY_TLS=0 \
        AUTH=1 \
        REQUIRE_AUTH=0 \
        ALLOW_INSECURE_AUTH=0

### MR -- spamhaus.org recommended for not using $RBLSMTPD $BLACKLIST entry before $SMTPD
exec /usr/bin/softlimit -m $SOFTLIMITVAR \
        /usr/bin/tcpserver -v -R -H -l $HOSTNAME -x $TCP_CDB -c "$MAXSMTPD" \
        -u "$QMAILDUID" -g "$NOFILESGID" $IP $PORT $RECORDIO \
        $SPAMDYKE $RBLSMTPD $SMTPD $VCHKPW /bin/true 2>&1

/var/qmail/supervise/submission/run
Code: [Select]
#!/bin/sh

QMAILDUID=$(id -u qmaild)
NOFILESGID=$(id -g qmaild)
MAXSMTPD=$(cat /var/qmail/control/concurrencyincoming)
SMTPD="/var/qmail/bin/qmail-smtpd"
TCP_CDB="/etc/tcprules.d/tcp.smtp.cdb"
HOSTNAME=$(hostname)
VCHKPW="/home/vpopmail/bin/vchkpw"
#RECORDIO="/usr/bin/recordio"
RECORDIO=""

RBLSMTPD=""
BLACKLIST=""

if [ -f /var/qmail/control/spamdyke ] ; then
        SPAMDYKE=$(cat /var/qmail/control/spamdyke)" --log-level=info"
else
        SPAMDYKE=""
           if [ -f /var/qmail/control/rblsmtpd ] ; then
            RBLSMTPD=$(cat /var/qmail/control/rblsmtpd)
            BLACKLIST=$(cat /var/qmail/control/blacklists)
           fi
fi

### MR -- incresing SOFTLIMITVAR if not enough (example: because 'login fail')
if [ `uname -m` = 'x86_64' ] ; then
        SOFTLIMITVAR="64000000"
else
        SOFTLIMITVAR="16000000"
fi

IP=0
PORT=587

### MR -- SSL must using SMTPS=1 and SSL=1 but non-SSL only SSL=0 (without SMTPS=0)
export SMTPAUTH="!" \
        SSL=0 \
        REQUIRE_AUTH=0 \
        FORCE_TLS=1 \
        DENY_TLS=0 \
        AUTH=1 \
        REQUIRE_AUTH=0 \
        ALLOW_INSECURE_AUTH=0

### MR -- spamhaus.org recommended for not using $RBLSMTPD $BLACKLIST entry before $SMTPD
exec /usr/bin/softlimit -m $SOFTLIMITVAR \
        /usr/bin/tcpserver -v -R -H -l $HOSTNAME -x $TCP_CDB -c "$MAXSMTPD" \
        -u "$QMAILDUID" -g "$NOFILESGID" $IP $PORT $RECORDIO \
        $SPAMDYKE $RBLSMTPD $SMTPD $VCHKPW /bin/true 2>&1

Replace those three files, then:
Goto KloxoMR panel -> Admin -> Mail Server Settings -> Enable spamdyke.

Command line:
qmailctl stop
qmailctl start

look at the bottom of /var/log/maillog and you will see it working  ;)

Christopher

Knowledge in: PHP, Perl, MySQL, Javascript, Actionscript, FLASH, HTML, CSS
Server Administrator / Developer: https://convictionshosting.com

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: spamdyke working properly KloxoMR 201401****
« Reply #1 on: 2014-01-17, 00:36:30 »
Do I have to disable Spamdyke before updating these files ?

Offline chrisf

  • Senior Master
  • **
  • Posts: 883
  • Karma: +11/-1
  • Gender: Male
  • Be the change that you wish to see in the world.
    • View Profile
    • Conviction's Hosting
Re: spamdyke working properly KloxoMR 201401****
« Reply #2 on: 2014-01-17, 00:40:00 »
Nope, just after updating them do the:

qmailctl stop
qmailctl start

;)
Christopher

Knowledge in: PHP, Perl, MySQL, Javascript, Actionscript, FLASH, HTML, CSS
Server Administrator / Developer: https://convictionshosting.com

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: spamdyke working properly KloxoMR 201401****
« Reply #3 on: 2014-01-17, 05:59:26 »
Latest version of qmail is already as the same as chrisf propose.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline chrisf

  • Senior Master
  • **
  • Posts: 883
  • Karma: +11/-1
  • Gender: Male
  • Be the change that you wish to see in the world.
    • View Profile
    • Conviction's Hosting
Re: spamdyke working properly KloxoMR 201401****
« Reply #4 on: 2014-01-17, 06:31:57 »
Mustafa, please check your rpm then, as I stated here:
http://forum.mratwork.com/kloxo-mr-technical-helps/update-breaks-spamdyke-smtp-ssl/

After the update, smtp-ssl again stopped working.  You did not use my code completely,  just the 'idea' of it.  Please look at the spamdyke section more closely.  Also my findings when researching recordio, it is too resource intensive for production servers, it should be disabled by default.

My code above takes care of it.  ;)
Christopher

Knowledge in: PHP, Perl, MySQL, Javascript, Actionscript, FLASH, HTML, CSS
Server Administrator / Developer: https://convictionshosting.com

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: spamdyke working properly KloxoMR 201401****
« Reply #5 on: 2014-01-17, 06:40:47 »
I didn't found issue related to RECORDIO. So, that why RECORDIO still exist.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline chrisf

  • Senior Master
  • **
  • Posts: 883
  • Karma: +11/-1
  • Gender: Male
  • Be the change that you wish to see in the world.
    • View Profile
    • Conviction's Hosting
Re: spamdyke working properly KloxoMR 201401****
« Reply #6 on: 2014-01-17, 07:01:39 »
what about smtps code?

I have had no issue with recordio either,  however, in research found that it is resource intensive if running production server with a lot of mail being processed.

the code for smtps IS needed.
Christopher

Knowledge in: PHP, Perl, MySQL, Javascript, Actionscript, FLASH, HTML, CSS
Server Administrator / Developer: https://convictionshosting.com

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: spamdyke working properly KloxoMR 201401****
« Reply #7 on: 2014-01-18, 19:18:43 »
Yes, chrisf is right, Mustafa you are wrong. These codes works perfectly, and after Mustafa update SMTP-SSL stopped working so please check these codes again !

Offline chrisf

  • Senior Master
  • **
  • Posts: 883
  • Karma: +11/-1
  • Gender: Male
  • Be the change that you wish to see in the world.
    • View Profile
    • Conviction's Hosting
Re: spamdyke working properly KloxoMR 201401****
« Reply #8 on: 2014-01-19, 19:14:37 »
MUSTAFA update broke smtp-ssl AGAIN!

The recordio disable is nice addition but YOU MUST ADD THIS TO
/var/qmail/supervise/smtp-ssl/run
Code: [Select]
SPAMDYKE=$(cat /var/qmail/control/spamdyke)" --log-level=info --tls-level smtps --tls-certificate-file /var/qmail/control/servercert.pem"
else
        SPAMDYKE=""

Do you see the addition needed?  THIS IS A MUST FOR SPAMDYKE SMTPS-SSL!

Also DKIM support was removed if you added it.  Making a script to fix this crap!
« Last Edit: 2014-01-19, 19:23:11 by chrisf »
Christopher

Knowledge in: PHP, Perl, MySQL, Javascript, Actionscript, FLASH, HTML, CSS
Server Administrator / Developer: https://convictionshosting.com

Offline chrisf

  • Senior Master
  • **
  • Posts: 883
  • Karma: +11/-1
  • Gender: Male
  • Be the change that you wish to see in the world.
    • View Profile
    • Conviction's Hosting
Re: spamdyke working properly KloxoMR 201401****
« Reply #9 on: 2014-01-19, 19:21:39 »
For recordio disable I just need to 'touch' that file?  Or are you adding option to KloxoMR panel?
Christopher

Knowledge in: PHP, Perl, MySQL, Javascript, Actionscript, FLASH, HTML, CSS
Server Administrator / Developer: https://convictionshosting.com

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: spamdyke working properly KloxoMR 201401****
« Reply #10 on: 2014-01-22, 18:18:29 »
I use this file:

Quote
#!/bin/sh

QMAILDUID=$(id -u qmaild)
NOFILESGID=$(id -g qmaild)
MAXSMTPD=$(cat /var/qmail/control/concurrencyincoming)
SMTPD="/var/qmail/bin/qmail-smtpd"
TCP_CDB="/etc/tcprules.d/tcp.smtp.cdb"
HOSTNAME=$(hostname)
VCHKPW="/home/vpopmail/bin/vchkpw"
#RECORDIO="/usr/bin/recordio"
RECORDIO=""

RBLSMTPD=""
BLACKLIST=""

if [ -f /var/qmail/control/spamdyke ] ; then
        SPAMDYKE=$(cat /var/qmail/control/spamdyke)" --log-level=info --tls-level smtps --tls-certificate-file /var/qmail/control/servercert.pem"
else
        SPAMDYKE=""
           if [ -f /var/qmail/control/rblsmtpd ] ; then
            RBLSMTPD=$(cat /var/qmail/control/rblsmtpd)
            BLACKLIST=$(cat /var/qmail/control/blacklists)
           fi
fi

### MR -- incresing SOFTLIMITVAR if not enough (example: because 'login fail')
if [ `uname -m` = 'x86_64' ] ; then
        SOFTLIMITVAR="72000000"
else
        SOFTLIMITVAR="18000000"
fi

IP=0
PORT=465

### MR -- SSL must using SMTPS=1 and SSL=1 but non-SSL only SSL=0 (without SMTPS=0)
export SMTPAUTH="!" \
        SMTPS=1 \
        SSL=1 \
        REQUIRE_AUTH=0 \
        FORCE_TLS=0 \
        DENY_TLS=0 \
        AUTH=1 \
        REQUIRE_AUTH=0 \
        ALLOW_INSECURE_AUTH=0

### MR -- spamhaus.org recommended for not using $RBLSMTPD $BLACKLIST entry before $SMTPD
exec /usr/bin/softlimit -m $SOFTLIMITVAR \
        /usr/bin/tcpserver -v -R -H -l $HOSTNAME -x $TCP_CDB -c "$MAXSMTPD" \
        -u "$QMAILDUID" -g "$NOFILESGID" $IP $PORT $RECORDIO \
        $SPAMDYKE $RBLSMTPD $SMTPD $VCHKPW /bin/true 2>&1

Offline chrisf

  • Senior Master
  • **
  • Posts: 883
  • Karma: +11/-1
  • Gender: Male
  • Be the change that you wish to see in the world.
    • View Profile
    • Conviction's Hosting
Re: spamdyke working properly KloxoMR 201401****
« Reply #11 on: 2014-01-22, 22:07:20 »
Mustafa, DKIM installed properly on latest update. :)

BUT, smtp-ssl broke again.  You MUST change your rpm file!
/var/qmail/supervise/smtp-ssl/run
YOUR LINE:
Code: [Select]
SPAMDYKE=$(cat /var/qmail/control/spamdyke)

MUST BE CHANGED TO
Code: [Select]
SPAMDYKE=$(cat /var/qmail/control/spamdyke)" --log-level=info --tls-level smtps --tls-certificate-file /var/qmail/control/servercert.pem"

Spamdyke REQUIRES this to operate smtps.  PLEASE make this change.
Christopher

Knowledge in: PHP, Perl, MySQL, Javascript, Actionscript, FLASH, HTML, CSS
Server Administrator / Developer: https://convictionshosting.com

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: spamdyke working properly KloxoMR 201401****
« Reply #12 on: 2014-01-23, 06:19:40 »
Try modified content of /var/qmail/control/spamdyke with '/usr/bin/spamdyke -f /etc/spamdyke.conf --log-level=info --tls-level smtps --tls-certificate-file /var/qmail/control/servercert.pem'

As alternative, with '/usr/bin/spamdyke -f /etc/spamdyke.conf --log-level=info --tls-level=smtps --tls-certificate-file=/var/qmail/control/servercert.pem'
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline chrisf

  • Senior Master
  • **
  • Posts: 883
  • Karma: +11/-1
  • Gender: Male
  • Be the change that you wish to see in the world.
    • View Profile
    • Conviction's Hosting
Re: spamdyke working properly KloxoMR 201401****
« Reply #13 on: 2014-01-23, 06:58:48 »
Doesn't work.  If you place it anywhere but in the smtp-ssl run file, it will allow smtp-ssl but will block non-ssl connections.  Just change it as I have suggested and spamdyke will work with KloxoMR properly.

;)
Christopher

Knowledge in: PHP, Perl, MySQL, Javascript, Actionscript, FLASH, HTML, CSS
Server Administrator / Developer: https://convictionshosting.com

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: spamdyke working properly KloxoMR 201401****
« Reply #14 on: 2014-01-23, 12:31:04 »
1. What's about  ' --log-level=info --tls-level=smtps --tls-certificate-file=/var/qmail/control/servercert.pem' ?. Work or not?.

2. What's about submission?. Also using additional code like smtp-ssl or not?.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

 


MRatWork Affiliates:    BIGRAF(R) Inc.    House of LMAR    EFARgrafix
Click Here

Page created in 0.031 seconds with 18 queries.

web stats analysis