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, 09:43:11

Author Topic: [TIP] How to setup Qmail on Kloxo-MR  (Read 90754 times)

0 Members and 1 Guest are viewing this topic.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
[TIP] How to setup Qmail on Kloxo-MR
« on: 2013-04-29, 20:06:45 »
This tips related to Qmail-toaster (mail server) on Kloxo-MR.

Warning: - update Kloxo to Kloxo-MR need running:
Code: [Select]
sh /script/convert-to-qmailtoaster

Prepare server:
1. Choose 1 of domains or subdomains as primary 'domain' (this domain must be access from public; example: 'mydomain.com')

2. Set server hostname as subdomain of primary 'domain' (example: 'subdom.mydomain.com') and add 'subdom' as 'A record' on dns setting

3. Add 'xxx.xxx.xxx.xxx subdom.mydomain.com subdom' on '/etc/host' (change xxx.xxx.xxx.xxx with primary ip)

4. Add/Change to 'HOSTNAME="subdom.mydomain.com"' in '/etc/sysconfig/network'

5. Reboot and then run 'hostname -f' and must be appear as 'subdom.mydomain.com'

Setup/Update qmail:
1. For update from Kloxo, need running 'sh /script/convert-to-qmailtoaster'
2. For to make sure, go to 'Mysql password reset' to change mysql root password
2. Running 'sh /script/fix-chownchmod; sh /script/fixmail-all'

Testing:
1. Run '/home/vpopmail/bin/vdominfo' and will be match with '/var/qmail/users/assign' content

2. If login to webmail failed, check the content of:
- '/var/qmail/supervise/imap4/run',
- '/var/qmail/supervise/imap4-ssl/run',
- '/var/qmail/supervise/pop3/run',
- '/var/qmail/supervise/pop3-ssl/run',
- '/var/qmail/supervise/smtp/run',
- '/var/qmail/supervise/submission/run'

and find out something like 'exec /usr/bin/softlimit -m 9000000 '.

Increase the value until 3-4 times but no more than 64000000. Original softlimit have a problem especially on Centos 64bit (version 5 and 6).

3. Run 'telnet localhost 25' for to make sure this port not blocked/inactive. Testing also on port 110, 143, 993, 995, 587 and 465

4. Find error on 'log manager' and 'mail queue'

--------------------
Additional info:

1. Sometimes, after Kloxo-MR update, qmail not work.

You can see in 'Log Manager' for IMAP error or SMTP error like '@400000005187cdc72b428044 tcpserver: fatal: unable to bind: address already used'.

For this situation, need reboot. Or running 'qmailctl stop; qmailctl start' (remember: 'qmailctl restart' not work).

It's ok if appear something like '@40000000518752e21fc74ac4 tcpserver: status: 0/40'

2. Repair qmail:
Code: [Select]
qmailctl stop
yum reinstall *-toaster -y
sh /script/fixmail-all
qmailctl stop
qmailctl start

3. If still not work, run :
Code: [Select]
chmod 4755 /home/vpopmail/bin/vchkpw
qmailctl stop
qmailctl start

==============

NOTE:
- This information not accurate for latest Kloxo-MR (6.5.0.f-2013031825)
- Only command needed:

Code: [Select]
# fix mail issue
sh /script/fixmail-all

# better stop and start instead restart
qmailctl stop
qmailctl start

==============
NOTE:
- Reinstall Qmail-toaster

Code: [Select]
# uninstall toaster
yum remove *-toaster

# remove bin and config
rm -rf /var/qmail/

# install again (including clamav and spamd) and also other applications as dependencies
yum install *-toaster webalizer cronie cronie-anacron crontabs

# run fix mail config (qmail-toaster config and webmail)
sh /script/fixmail-all

# restart (using stop and start better for this situation rather than restart)
# to make stopped and may appear error message
qmailctl stop
# start
qmailctl start

if still something wrong:
Code: [Select]
sh /script/cleanup
sh /script/fix-all
sh /script/restart-all

and check with 'qmailctl stat' and will be appear:
Code: [Select]
[root@viv ~]# qmailctl stat
authlib: up (pid 802838) 27 seconds
clamd: up (pid 802811) 27 seconds
imap4: up (pid 803967) 0 seconds
imap4-ssl: up (pid 803954) 0 seconds
pop3: up (pid 803931) 1 seconds
pop3-ssl: up (pid 803919) 1 seconds
send: up (pid 803949) 1 seconds
smtp: up (pid 803959) 0 seconds
smtp-ssl: up (pid 803932) 1 seconds
spamd: up (pid 802843) 27 seconds
submission: up (pid 803922) 1 seconds
authlib/log: up (pid 802839) 27 seconds
clamd/log: up (pid 802813) 27 seconds
imap4-ssl/log: up (pid 802833) 27 seconds
imap4/log: up (pid 802828) 27 seconds
pop3-ssl/log: up (pid 802840) 27 seconds
pop3/log: up (pid 802827) 27 seconds
send/log: up (pid 802832) 27 seconds
smtp-ssl/log: up (pid 802834) 27 seconds
smtp/log: up (pid 802837) 27 seconds
spamd/log: up (pid 802822) 27 seconds
submission/log: up (pid 802847) 27 seconds
[root@viv ~]#

==============
NOTE: - for to make sure, receipent (gmail, yahoomail and others) not thinking your email as 'spam'
- Activate 'Enable Domainkey' in 'Server Mail Settings'
- In every domain, active 'Enable SPF' in 'EMail Auth' (also active 'Enable DMARC' as optional)
- As to provider to setup 'reverse-dns' for your server IP(s)
- Set 'hostname' with FQDN format (use 'server1.youdomain.com' instead 'server1')
« Last Edit: 2016-08-09, 13:36:44 by MRatWork »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline insanity

  • Senior Member
  • *
  • Posts: 215
  • Karma: +0/-0
    • View Profile
Re: [TIP] How to setup Qmail on Kloxo-MR
« Reply #1 on: 2013-04-30, 04:16:53 »
Mustafa,
Qmail-SMTP not work with these settings.
Code: [Select]
#!/bin/sh
QMAILDUID=`id -u vpopmail`
NOFILESGID=`id -g vpopmail`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
BLACKLIST=`cat /var/qmail/control/blacklists`
SMTPD="/var/qmail/bin/qmail-smtpd"
TCP_CDB="/etc/tcprules.d/tcp.smtp.cdb"
RBLSMTPD="/usr/bin/rblsmtpd"
HOSTNAME=`hostname`
VCHKPW="/home/vpopmail/bin/vchkpw"
REQUIRE_AUTH=0

exec /usr/bin/softlimit -m 64000000
    /usr/bin/tcpserver -v -R -H -l $HOSTNAME -x $TCP_CDB -c "$MAXSMTPD"
    -u "$QMAILDUID" -g "$NOFILESGID" 0 smtp
    $SMTPD $VCHKPW /bin/true 2>&1

SMTP Error (535): Authentication failed.

@40000000517ee14314974f14 tcpserver: status: 0/500
@40000000517ee17b16a0bb74 tcpserver: status: 1/500
@40000000517ee17b16a3d46c tcpserver: pid 14423 from xx.xx.xx.xx
@40000000517ee17b16a58604 tcpserver: ok 14423 server....:xx.xx.xx.xx :xx.xx.xx.xx::40821
@40000000517ee180175b261c tcpserver: end 14423 status 0
@40000000517ee180175b31d4 tcpserver: status: 0/500

i saw Spacedust write a tip to change user to root, but then there is a new problem. When somebody add new email i need to run fixmail otherwise the new mail can't send too...
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: [TIP] How to setup Qmail on Kloxo-MR
« Reply #2 on: 2013-04-30, 17:42:59 »
Quote from: "insanity"
Mustafa,
Qmail-SMTP not work with these settings.
Code: [Select]
#!/bin/sh
QMAILDUID=`id -u vpopmail`
NOFILESGID=`id -g vpopmail`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
BLACKLIST=`cat /var/qmail/control/blacklists`
SMTPD="/var/qmail/bin/qmail-smtpd"
TCP_CDB="/etc/tcprules.d/tcp.smtp.cdb"
RBLSMTPD="/usr/bin/rblsmtpd"
HOSTNAME=`hostname`
VCHKPW="/home/vpopmail/bin/vchkpw"
REQUIRE_AUTH=0

exec /usr/bin/softlimit -m 64000000
    /usr/bin/tcpserver -v -R -H -l $HOSTNAME -x $TCP_CDB -c "$MAXSMTPD"
    -u "$QMAILDUID" -g "$NOFILESGID" 0 smtp
    $SMTPD $VCHKPW /bin/true 2>&1

SMTP Error (535): Authentication failed.

@40000000517ee14314974f14 tcpserver: status: 0/500
@40000000517ee17b16a0bb74 tcpserver: status: 1/500
@40000000517ee17b16a3d46c tcpserver: pid 14423 from xx.xx.xx.xx
@40000000517ee17b16a58604 tcpserver: ok 14423 server....:xx.xx.xx.xx :xx.xx.xx.xx::40821
@40000000517ee180175b261c tcpserver: end 14423 status 0
@40000000517ee180175b31d4 tcpserver: status: 0/500

i saw Spacedust write a tip to change user to root, but then there is a new problem. When somebody add new email i need to run fixmail otherwise the new mail can't send too...

I don't confirm this. It works perfectly for me with all the mods.

Make sure Spam Assassin works as admin, the rest as root.
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Viking

  • Senior Member
  • *
  • Posts: 315
  • Karma: +0/-0
    • View Profile
Re: [TIP] How to setup Qmail on Kloxo-MR
« Reply #3 on: 2013-05-01, 07:22:36 »
Spacedust using Centos 5.x Go to Centos 6.X and you'll see it does not work on that port.
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: [TIP] How to setup Qmail on Kloxo-MR
« Reply #4 on: 2013-05-01, 21:11:31 »
Quote from: "Viking"
Spacedust using Centos 5.x Go to Centos 6.X and you'll see it does not work on that port.

What about port 587 ? Do you use dynamic IP ?
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Viking

  • Senior Member
  • *
  • Posts: 315
  • Karma: +0/-0
    • View Profile
Re: [TIP] How to setup Qmail on Kloxo-MR
« Reply #5 on: 2013-05-02, 18:57:33 »
No fixed IP. Port 587 does not work on the server, and it should.
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: [TIP] How to setup Qmail on Kloxo-MR
« Reply #6 on: 2013-05-02, 19:34:18 »
Quote from: "Viking"
No fixed IP. Port 587 does not work on the server, and it should.

Traffic counting does not work me right now too :/
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline quacos

  • Junior Member
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: [TIP] How to setup Qmail on Kloxo-MR
« Reply #7 on: 2013-05-08, 18:54:09 »
I have same problem of insanity.

POP3 and IMAP work, SMTP fails.

Log entries of /var/log/kloxo/maillog are like this:
vchkpw-smtp: vpopmail user not found

I am not on a updated kloxo, this is a fresh installation of Kloxo MR

I have already changed softlimit and reinstalled *-toaster
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: [TIP] How to setup Qmail on Kloxo-MR
« Reply #8 on: 2013-05-08, 18:59:13 »
Quote from: "quacos"
I have same problem of insanity.

POP3 and IMAP work, SMTP fails.

Log entries of /var/log/kloxo/maillog are like this:
vchkpw-smtp: vpopmail user not found

I am not on a updated kloxo, this is a fresh installation of Kloxo MR

I have already changed softlimit and reinstalled *-toaster

ClamAV does not work with mail !
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline quacos

  • Junior Member
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: [TIP] How to setup Qmail on Kloxo-MR
« Reply #9 on: 2013-05-08, 19:54:35 »
OK, this is my situation

1) Current email accounts don't work on SMTP
2) mailaccount_add_failed when adding new accounts

BUT

if I do

/home/vpopmail/bin/vdeldomain
/home/vpopmail/bin/vadddomain

Everything is fine!
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline quacos

  • Junior Member
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: [TIP] How to setup Qmail on Kloxo-MR
« Reply #10 on: 2013-05-08, 20:08:47 »
Looking in the log:

./user_cmd:14:59 May/08/2013: () 7797 '/home/vpopmail/bin/vadduser' [...] sh: /home/vpopmail/bin/vadduser: Permission denied

But why? Permissions seem to be correct

-rwxr-x--x 1 vpopmail vchkpw 104896 Jan 22 15:25 /home/vpopmail/bin/vadduser
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline WISTFUL

  • Senior Member
  • *
  • Posts: 247
  • Karma: +0/-0
    • View Profile
Re: [TIP] How to setup Qmail on Kloxo-MR
« Reply #11 on: 2013-06-20, 20:42:12 »
Hello,

I still have not acted in accordance with these guidelines.

My current problem is that when I send email via webmail to gmail or emails with personal provider, It works perfectly but when I send email to yahoo provider, I reseive below failure notice
Code: [Select]
Hi. This is the qmail-send program at xxxx.domain.ltd.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<xxx@yahoo.com>:
Connected to 66.196.118.240 but greeting failed.
Remote host said: 421 4.7.1 [TS03] All messages from xxx.xxx.xxx.xx will be permanently deferred; Retrying will NOT succeed. See http://postmaster.yahoo.com/421-ts03.html
I'm not going to try again; this message has been in the queue too long.
Do you offer that I will act in accordance with these guidelines?
(In case of a disruption in the webmail system may lose my clients)
« Last Edit: 1970-01-01, 01:00:00 by Guest »
.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline WISTFUL

  • Senior Member
  • *
  • Posts: 247
  • Karma: +0/-0
    • View Profile
Re: [TIP] How to setup Qmail on Kloxo-MR
« Reply #13 on: 2013-06-21, 09:25:53 »
Quote from: "MRatWork"
@WISTFUL,

Have you read http://postmaster.yahoo.com/421-ts03.html and http://help.yahoo.com/kb/index?page=con ... sions=true ?
I am not familiar with mail system settings and I have above issue by kloxo webmail default configurations. Also all mails that will be sent automatically from my server to yahoo, facing with this failure notice error that I have not access to their settings.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: [TIP] How to setup Qmail on Kloxo-MR
« Reply #14 on: 2013-06-25, 23:53:11 »
Have you click 'Enable SPF' on 'Mail Auth' and ask to your provider for reverse-dns for your ip?.

Error:
Code: [Select]
Hi. This is the qmail-send program at xxxx.domain.ltd.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.
that mean your email target not exist and or their server not exist/active.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

 


Top 4 Global Search Engines:    Google    Bing    Baidu    Yahoo
Click Here

Page created in 0.056 seconds with 22 queries.

web stats analysis