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-28, 15:36:24

Author Topic: DKIM signing in KloxoMR  (Read 37744 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
DKIM signing in KloxoMR
« on: 2013-09-08, 00:46:35 »
ATTENTION:  if you are using any version of KloxoMR with 2014 in the revision date, DKIM is available and this does not need to be done.

DKIM signing is not available in KloxoMR.  It is not KloxoMR problem, it is a qmail-toaster problem.  This solution has been around for a while, however I perfected it to work with KloxoMR with minimal changes needed.

First login to ssh on your server.

Code: [Select]
cd /tmp
yum install perl-Mail-DKIM
wget http://cc-server1.us/dkimsign.pl
wget http://cc-server1.us/qmail-remote.new
cp dkimsign.pl /usr/bin/
chmod 755 /usr/bin/dkimsign.pl
qmailctl stop
mv /var/qmail/bin/qmail-remote /var/qmail/bin/qmail-remote.orig
cp qmail-remote.new /var/qmail/bin/qmail-remote
chown root:qmail /var/qmail/bin/qmail-remote
chmod 755 /var/qmail/bin/qmail-remote
rm /var/qmail/bin/qmail-queue
mv /var/qmail/bin/qmail-queue.orig /var/qmail/bin/qmail-queue
qmailctl start

That will enable DKIM signature of mail sent using qmail-toaster remote.  I have found that if you use standard php sendmail function it will not get signed, I suggest piping your php applications through smtp.

You can see that DKIM is working by clicking the "view original" link in Gmail.  It will say DKIM: passed.

This will help a lot of your problems. <!-- s:) -->:)<!-- s:) -->
« Last Edit: 2014-02-01, 17:37:16 by chrisf »
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: DKIM signing in KloxoMR
« Reply #1 on: 2013-09-08, 01:01:42 »
Can you make diff file for different between qmail-remote.orig and qmail-remote.new
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: 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: DKIM signing in KloxoMR
« Reply #2 on: 2013-09-08, 01:15:12 »
Mustafa, qmail-remote.new is a script you can view with text editor.

What it does is - use KloxoMR private dkim key to sign out going mail through perl script, then pipes it to the original qmail-remote.

Works great.

Look at the script for details.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
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: DKIM signing in KloxoMR
« Reply #3 on: 2013-09-08, 01:39:12 »
in term of rpm, better make diff file and then this diff file as patch to original file.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: 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: DKIM signing in KloxoMR
« Reply #4 on: 2013-09-08, 01:44:54 »
It is not a patch.  I have tried patches and numerous other ways of trying to get qmail-toaster to use Domain Keys and DKIM signing.... This is the only way I could get it working properly.

Code: [Select]
chattr +i /var/qmail/bin/qmail-remote

Will stop any updates from changing the script.  It has been working under stress with decent load avg - could be better but perl is to blame.

My mail goes to inbox.  My domains mail goes to inbox.

I am happy.

If you know of a better way please explain all steps.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
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: DKIM signing in KloxoMR
« Reply #5 on: 2013-09-09, 21:08:31 »
The problem is how to know (with simple way) if admin disable domainkeys?. Because your code work with assumption domainkeys always enabled.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: 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: DKIM signing in KloxoMR
« Reply #6 on: 2013-09-09, 21:27:19 »
This is true.  DKIM is a MUST now.  It is a standard.  Domainkeys is nearly obsolete - DKIM signing is the newer version? -- but without DKIM signing almost ALL major mail services will spam you - and in the case of hotmail and aol - they will black hole you.

So in my opinion - option to turn on and off is nusaince.  MUST be on if you plan to send mail to major email providers.

Same with SPF.  KloxoMR needs new SPF record.  NOT TXT spf, but new standard is a SPF dns record.  It is supported by bind.  Hotmail requires it now.

KloxoMR is behind in the email game.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
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: DKIM signing in KloxoMR
« Reply #7 on: 2013-09-09, 23:37:12 »
In term of domainkey, DKIM is the same as domainkeys except little different text in "TEXT record' in dns.

So, I mean 'domainkeys' in Kloxo-MR panel where we can enable or disable. Say it, someone need/want disable 'domainkeys' for dns setting and then how we know user select as 'disable' for 'domainkeys'.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline kuldeep verma

  • Junior Member
  • *
  • Posts: 29
  • Karma: +0/-0
    • View Profile
    • http://www.zodichost.com
Re: DKIM signing in KloxoMR
« Reply #8 on: 2013-09-10, 01:57:28 »
Great !! Exactly what i was looking for.. i hope this will solve my issue..
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Cheapest VPS provider With Managed Services
Zodichost.com - A Division of Extreme iTech Pvt. Ltd.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: DKIM signing in KloxoMR
« Reply #9 on: 2013-09-15, 18:09:50 »
Please add DKIM to Kloxo !
« Last Edit: 1970-01-01, 01:00:00 by Guest »

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: DKIM signing in KloxoMR
« Reply #10 on: 2013-09-16, 00:06:17 »
I just did :)  my method works without a problem.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Christopher

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

Offline crossing

  • Senior Member
  • *
  • Posts: 336
  • Karma: +0/-0
    • View Profile
Re: DKIM signing in KloxoMR
« Reply #11 on: 2013-09-23, 14:18:18 »
Hello Chrisf,

I don't know why but DKIM dont work anymore, now I get reply message 'Unable to run qmail-remote.' when try send mails. As soon as I do 'yum reinstall *-toaster' and then 'sh /script/fixmail-all' and then
Code: [Select]
yum clean all
yum update
sh /script/cleanup
sh /script/restart-all
mail start to work but DKIM is gone. If I follow your tutorial after that, the problem comes back  'Unable to run qmail-remote.'

I did 'chmod 755' for 'qmail-remote'.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Kloxo-MR -> Great Panel ->  Great person behind it ->  Mustafa

Offline crossing

  • Senior Member
  • *
  • Posts: 336
  • Karma: +0/-0
    • View Profile
Re: DKIM signing in KloxoMR
« Reply #12 on: 2013-09-23, 14:52:08 »
Ihave tried to use this tutorial too http://wiki.qmailtoaster.com/index.php/ ... il_Toaster but I get the same error after it even with qmail-remote chmod 777
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Kloxo-MR -> Great Panel ->  Great person behind it ->  Mustafa

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: DKIM signing in KloxoMR
« Reply #13 on: 2013-09-24, 19:48:53 »
My friend, you are quick to say something doesn't work when usually we find the problem to be something you have done.

I just checked on my 4 servers.  All mail is sending fine.  All mail is DKIM signed.  I am about to add it to server 5 here is a few moments.

Are you renaming qmail-remote properly?  The script should work no matter what qmail is doing - I say this because we are not modifing qmail at all - this script simply takes an outgoing mail, signs it, then pipes it to the original qmail-remote.

I will install on server 5 now and report.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
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: DKIM signing in KloxoMR
« Reply #14 on: 2013-09-24, 21:10:08 »
Installed - verified - signing.  No problems.

I ran yum update prior to, therefore I am running latest KloxoMR 6.5.0f stable.

I checked using check-auth@verifier.port25.com using webmail @ the server and it worked without a problem.

I did notice one thing, when running qmailctl stop, KloxoMR watchdog restarts qmail.  I realized this when I ran qmailctl start and was advised it was running.

I did (qmailctl stop) and (qmailctl start) again before testing.

This solution works perfect for KloxoMR 6.5.0f.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Christopher

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

 


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine
Click Here

Page created in 0.052 seconds with 19 queries.

web stats analysis