Koozali.org: home of the SME Server

qmail qmHandle problem

Offline stegonet

  • 3
  • +0/-0
qmail qmHandle problem
« on: July 09, 2014, 10:34:34 AM »
Hello,

I'm a little noob with SME server, and after i search and try different stuffs I don;t succed.

For SMTP I use qmail.

My problem it's like that:

If I send mails they remain on server more than 5-10 min. and after sometime I found on server 20-30 mails who don't live.

I try with qmHandle (qmHandle -l and after qmHandle -a) to force sending mails, but no results.

I try to install add'ons or other tools to force sending mails, but no results.

Can anybody help me? Even with some links.

Best regards and thank you for your understanding.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: qmail qmHandle problem
« Reply #1 on: July 09, 2014, 10:56:28 AM »
Hi, welcome here..

if you want help you should help us to help you..
are you trying to send emails to external recipient from your server without a smarthost?
how is your server connected to WAN?
please take a look into /var/log/qmail/current file, you should find some usefull info to debug your issue

Offline stegonet

  • 3
  • +0/-0
Re: qmail qmHandle problem
« Reply #2 on: July 09, 2014, 11:26:30 AM »
I try to send email to external (internal it's working). I don't know what you mean "your server without a smarthost?"
My server it's conected to WAN (DMZ with public ip address) as well with an internal NIC for internal LAN.

It's full visible on internet.

from log i have:

@4000000053bd09e7272a8704 status: local 1/20 remote 2/20
@4000000053bd09e7272a8aec end msg 30417626
@4000000053bd09e72cbc6e44 new msg 30417626
@4000000053bd09e72cbc79fc info msg 30417626: bytes 31120 from <user@domain.tld> qp 21684 uid 5012
@4000000053bd09e72d9b3584 starting delivery 781: msg 30417626 to local alias-localdelivery-user@domain.tld
@4000000053bd09e72d9b4524 status: local 2/20 remote 2/20
@4000000053bd09e72d9b4cf4 delivery 780: success: did_1+1+1/qp_21684/
@4000000053bd09e72d9b54c4 status: local 1/20 remote 2/20
@4000000053bd09e72da20b84 end msg 30413919
@4000000053bd09e72f966174 new msg 30413919
@4000000053bd09e72f97e42c info msg 30413919: bytes 31242 from <noreply@domain.tld> qp 21687 uid 400
@4000000053bd09e730441634 starting delivery 782: msg 30413919 to local user@www.domain.tld
@4000000053bd09e7304421ec status: local 2/20 remote 2/20
@4000000053bd09e7304673ac delivery 781: success: forward:_qp_21687/did_0+0+1/
@4000000053bd09e7304f7844 status: local 1/20 remote 2/20
@4000000053bd09e7305b7e64 end msg 30417626
@4000000053bd09e73373034c delivery 782: success: did_1+0+1/
@4000000053bd09e7337a276c status: local 0/20 remote 2/20
@4000000053bd09e7337c9c54 end msg 30413919
@4000000053bd0a0402a20ca4 starting delivery 783: msg 30417623 to remote user@domain.tld
@4000000053bd0a0402a25eac status: local 0/20 remote 3/20
@4000000053bd0a0402a26294 starting delivery 784: msg 30417627 to remote user@domain.tld
@4000000053bd0a0402a26a64 status: local 0/20 remote 4/20
@4000000053bd0a0402a27234 starting delivery 785: msg 30417570 to remote user@domain.tld
@4000000053bd0a0402a27a04 status: local 0/20 remote 5/20
@4000000053bd0a0402a27dec starting delivery 786: msg 30412848 to remote user@domain.tld
@4000000053bd0a0402a3d1c4 status: local 0/20 remote 6/20
@4000000053bd0a0402a3d994 starting delivery 787: msg 30417572 to remote user@domain.tld
@4000000053bd0a0402a3dd7c status: local 0/20 remote 7/20
@4000000053bd0a0402a3e54c starting delivery 788: msg 30417648 to remote user@domain.tld
@4000000053bd0a0402a3ed1c status: local 0/20 remote 8/20
@4000000053bd0a0402a3f104 starting delivery 789: msg 30413887 to remote user@domain.tld
@4000000053bd0a0402a45e64 status: local 0/20 remote 9/20
@4000000053bd0a0402a46634 starting delivery 790: msg 30417641 to remote user@domain.tld
@4000000053bd0a0402a46e04 status: local 0/20 remote 10/20
@4000000053bd0a0402a471ec starting delivery 791: msg 30417649 to remote user@domain.tld
@4000000053bd0a0402a4912c status: local 0/20 remote 11/20
@4000000053bd0a0403868104 delivery 784: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
@4000000053bd0a0403868cbc status: local 0/20 remote 10/20
@4000000053bd0a0605531344 delivery 790: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
@4000000053bd0a0605531efc status: local 0/20 remote 9/20
@4000000053bd0a0605620b4c delivery 791: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
@4000000053bd0a060566be6c status: local 0/20 remote 8/20
@4000000053bd0a0905c6a14c delivery 788: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
@4000000053bd0a0905c6ad04 status: local 0/20 remote 7/20
@4000000053bd0a0b229635bc delivery 786: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
@4000000053bd0a0b22964174 status: local 0/20 remote 6/20
@4000000053bd0a17058d6cc4 delivery 785: deferral: CNAME_lookup_failed_temporarily._(#4.4.3)/
@4000000053bd0a17058d7c64 status: local 0/20 remote 5/20
@4000000053bd0a170da49f54 delivery 783: success: 217.115.16.27_accepted_message./Remote_host_said:_250_2.6.0__<53BCED15.2090201@domain.tld>_Queued_mail_for_delivery/
@4000000053bd0a170da4b2dc status: local 0/20 remote 4/20
@4000000053bd0a170da4b6c4 end msg 30417623
@4000000053bd0a1802eb2b64 delivery 787: deferral: CNAME_lookup_failed_temporarily._(#4.4.3)/
@4000000053bd0a1802eb371c status: local 0/20 remote 3/20"


I replace real mails with "user@domain.tld"


Oh, i forget, after few hours all nameservers from resolv.conf disapear, and for that I must write again nameservers in resolv.conf

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: qmail qmHandle problem
« Reply #3 on: July 09, 2014, 11:40:41 AM »
Quote
I try to send email to external (internal it's working). I don't know what you mean "your server without a smarthost?"

if you are trying to setup a mail server you should at least read the documentation.. the direct to mx approach (i.e. you send your emails form your server to the recipient mail server) might not work if you have a dynamic/residential public IP
sending emails via a Smarthost means that your server use an external SMTP (usually your ISP one) to send the emails..

Quote
@4000000053bd0a0403868104 delivery 784: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
@4000000053bd0a0403868cbc status: local 0/20 remote 10/20
@4000000053bd0a0605531344 delivery 790: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
@4000000053bd0a0605531efc status: local 0/20 remote 9/20
@4000000053bd0a0605620b4c delivery 791: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
@4000000053bd0a060566be6c status: local 0/20 remote 8/20
@4000000053bd0a0905c6a14c delivery 788: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
@4000000053bd0a0905c6ad04 status: local 0/20 remote 7/20
@4000000053bd0a0b229635bc delivery 786: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
@4000000053bd0a0b22964174 status: local 0/20 remote 6/20
@4000000053bd0a17058d6cc4 delivery 785: deferral: CNAME_lookup_failed_temporarily._(#4.4.3)/

how did you configure your server? in server only mode you said.. can SME use DNS port (i.e. can SME reach root DNS servers) or is it firewalled?

Quote
Oh, i forget, after few hours all nameservers from resolv.conf disapear, and for that I must write again nameservers in resolv.conf

please, take some time to read at least twice the documentation.. and, of course, the header of resolv.conf file.. you should see something like "don't edit this file".. that claim has a reason..


Offline stegonet

  • 3
  • +0/-0
Re: qmail qmHandle problem
« Reply #4 on: July 09, 2014, 12:05:51 PM »
Review some setting:

I have 2 ISP from bouth I have 6 public IP address, and just from ISP1 I use that range of IP.
Gateway it's on Dual-WAN box with load balancing and other options.
On that box, I put IP range on DMZ (becouse all 6 public IP address are need).

Email server it's in DMZ. He has an static IP address (public offcourse).

From this moment we use afraid.org for ns-servers. (in few day i will create my own NS-servers).

SME server was configured from another guy who left all servers in bad shape and low security. I think when I start to grow security level something was happening just on main SME email server, other servers don't have trouble.

Another mail server it's working, but this server it's just for internal actions. Difference for them it's resolv.conf (on main server resolv.conf remain empty, and on secondary mail server has nameserver).
 
In past i work on Domix servers and that server have an option to push mails stuck on server. On SME server I don't discovered yet how to do that.

That was my reason to open this topic.




Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: qmail qmHandle problem
« Reply #5 on: July 09, 2014, 12:16:29 PM »
IIUC, all was ok untill you start to "grow security".. only you know what you did.. and only you can go backward to find what broke your server..

don't touch conf file as they are automagically regenerated.. and check logfiles, they will tell you way your emails aren't going out..