Koozali.org: home of the SME Server

Problems sending mail

Offline smeerbartje

  • *
  • 71
  • +0/-0
Re: Problems sending mail
« Reply #15 on: August 06, 2008, 07:19:07 PM »
You are not trying to use the e-mail address as the user name by chance?

You should for sure be able to login as admin on that screen with your admin/root password.

Can you login to the server-manager panel and see for sure what your valid user names are?
I cannot login as username "admin" and the corresponding password.

Offline arne

  • *****
  • 1,116
  • +0/-4
Re: Problems sending mail
« Reply #16 on: August 06, 2008, 07:26:54 PM »
If I remember it right using web mail will require to use another loginname (acount) than root or admin. 

Correction: Last message was uncorrect. I just did a remote logon on the webmail as admin and it worked.

I just tried to do a test using iptraf to monitor the treffic. I could see the connection at port 25, but it was not as detailed as I expected.

When I testing my mail server I just use to send a mail from my webmail to my gmail acount, and then an answer back.

By the way, near 100 % of the errors I hava had on the SME server since the first versions of e-smith have been due to my own modifications or incorrect use. I can not remember one serious problem that has ben due to the server itself, or occouring on an unmodified server.

(Thats the reason I run a near unmodified server today, and it has bee zero problems over time.)
« Last Edit: August 06, 2008, 07:49:52 PM by arne »
......

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: Problems sending mail
« Reply #17 on: August 06, 2008, 07:33:21 PM »
Hmmm....

admin works fine on my servers. (root doesn't work)

Can you login to server-manager with admin?

He is getting a message that qmail is stopped but would that stop him from logging into webmail?

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: Problems sending mail
« Reply #18 on: August 06, 2008, 08:09:28 PM »
Quote
He is getting a message that qmail is stopped but would that stop him from logging into webmail?

I just did a test by stopping qmail on my test server. I was still able to log into webmail as admin.

Offline arne

  • *****
  • 1,116
  • +0/-4
Re: Problems sending mail
« Reply #19 on: August 06, 2008, 10:13:46 PM »
I just tested out a slightly bether method (than ip traf) to see the ip packet traffic between the two mail servers.

From shell, type: ' tcpdump port 25 '  (tcpdump, a standard function on a sme server.)

This lists all packets to and from port 25, the mail server.

Using this command I could see a listing of all 28 packets needed to send a two word message to my gmail acount.

Iptraf might work bether when the connection does not work, then you can se the 'hanging connection'. When things work like they should the traffic passes so quicly so that iptraf will not be able to detect all of it. ' tcpdump port 25 ' on the other hand lists each of the individual packets on port 25.

Or slightely bether:  tcpdump -i eth0 tcp port 25  (and -v or -vv can also be used to obtain more information.)

Or the clearest and most easy to read picture might be this one:  tcpdump -i eth0 -n tcp port 25

http://www.tcpdump.org/tcpdump_man.html
« Last Edit: August 06, 2008, 11:22:34 PM by arne »
......

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Problems sending mail
« Reply #20 on: August 06, 2008, 10:54:39 PM »
"Is there a way to check if the server is able te send mails?"

The iptraf utility can be used to see if your own server is trying to send mail and if the remote server gives the proper answer.

You don't need such an additional tool. The qmail log file will show all successful and unsuccessful attempts to send mail.


Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Problems sending mail
« Reply #21 on: August 06, 2008, 11:00:52 PM »
Problem is that the mail is NOT delivered by the smtp server to the address. Strange isn't it?

Perhaps not so strange. The test message you sent is not a valid email message, as it does not have a To: or Date: header.

If you send a test message which has a valid format, and that is accepted by your ISP's smtp server, but not delivered to the recipient, then you will have to talk to your ISP. Nobody here can help you determine what they are doing with your email.

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: Problems sending mail
« Reply #22 on: August 06, 2008, 11:29:50 PM »
Can we summarize this set of problems?

We start here:
Quote
my server is NOT able to send emails
and advance to here:
Quote
I installed the "E-Mail queue management"-RPM which creates the ability to manage the mailing queue in the server manager. When I use the "Try to send the queued messages now"-function, it says "Cannot send mails, qmail is not running". I did not shut down qmail or something... how can I start qmail?
and here is another thing:
Quote
I cannot log on to webmail. When I go to server-address/webmail, the Horde application is showed, but no user can login. (Message: Login failed). I'm sure I use the correct user/pass combination.

It seems to me that we have multiple things broken here.

some questions>
1. What is the server version and history?
2. What contribs are installed?
3. What is the "E-Mail queue management"-RPM and where did it come from?
4. When did this problem start and what was installed just prior to the onset?
5. Can you send mail from the SME to local users on the SME inside the Lan? (user1@SME.Domain.com > User2@SME.Domain.com)

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Problems sending mail
« Reply #23 on: August 06, 2008, 11:46:40 PM »
Can we summarize this set of problems?


I think it's time to raise a bug

Offline arne

  • *****
  • 1,116
  • +0/-4
Re: Problems sending mail
« Reply #24 on: August 07, 2008, 07:26:12 AM »
You don't need such an additional tool. The qmail log file will show all successful and unsuccessful attempts to send mail.



Well I think that when the server does not do wat it is intended to do, it can have basically two reasons:

1. Reason one - a networking problem.

2. Reason two - a server problem.


When it comes to the alternative one, the case is that in allmost all cases you can troubleshoot the networking part of the problem with a 100 persent degree of presission using only a few simple tools. (iptraf, tcpdump, ping, traceroute, ifconfig and namap as I can remember them at the moment, and only nmap and iptraf will have to be installed via simple yum commands. The other is standard already built in Linux commands.)

If all network problems were trobleshooted with a presition level were all network related problems were solved and were all information about the networking traffic were known, then I think some of the treads in this forum would have been shorter and simpler.

My personal opininon is this: When there is a server problem, use first two-tree-five minutes on the network related problems. Get 100 persent ansvers for these questions. Then use the required time for the server rlelated questions.

I think that the server logs says what hapens and when it hapends, but it does not allways answer into detail why things does not work, and how it does not work. This is often very easy to find out about using the network tools, and this aditional info might also lead to a more simple trobleshooting of the server itself ??!!

During the years from the earliest revisions of the e-smith, 100 persent of the problems I have had with the SME server has been related to data communication or the improper modifications I have made myself. During the years I can not remember one serious problem, that has been traced down to be due to the basic unmodified server itself. (But other people might have other experiences.)

Anyhow I think it is not a drawback to allways have a 100 persent picture of the network related problems, and it is actually and usually quite easy to have.

......

Offline smeerbartje

  • *
  • 71
  • +0/-0
Re: Problems sending mail
« Reply #25 on: August 07, 2008, 09:42:35 AM »
After restarting the server, I was able to logon to horde. I used tcpdump (tcpdump -i eth0 -n tcp port 25) and monitored the smtp port while I tried to send a message to my emailaddress. This is the output of tcpdump:
Code: [Select]
09:23:22.739173 IP 195.169.214.146.41244 > 131.174.66.167.smtp: S 1872787004:1872787004(0) win 5840 <mss 1460,sackOK,timestamp 297011964 0,nop,wscale 2>
09:23:22.739510 IP 131.174.66.167.smtp > 195.169.214.146.41244: S 3456365655:3456365655(0) ack 1872787005 win 5792 <mss 1460,sackOK,timestamp 2314402756 297011964,nop,wscale 2>
09:23:22.739584 IP 195.169.214.146.41244 > 131.174.66.167.smtp: . ack 1 win 1460 <nop,nop,timestamp 297011965 2314402756>
09:23:22.740999 IP 131.174.66.167.smtp > 195.169.214.146.41244: P 1:31(30) ack 1 win 1448 <nop,nop,timestamp 2314402757 297011965>
09:23:22.741067 IP 195.169.214.146.41244 > 131.174.66.167.smtp: . ack 31 win 1460 <nop,nop,timestamp 297011966 2314402757>
09:23:22.741229 IP 195.169.214.146.41244 > 131.174.66.167.smtp: P 1:21(20) ack 31 win 1460 <nop,nop,timestamp 297011966 2314402757>
09:23:22.741472 IP 131.174.66.167.smtp > 195.169.214.146.41244: . ack 21 win 1448 <nop,nop,timestamp 2314402757 297011966>
09:23:22.741519 IP 131.174.66.167.smtp > 195.169.214.146.41244: P 31:47(16) ack 21 win 1448 <nop,nop,timestamp 2314402757 297011966>
09:23:22.741675 IP 195.169.214.146.41244 > 131.174.66.167.smtp: P 21:54(33) ack 47 win 1460 <nop,nop,timestamp 297011967 2314402757>
09:23:22.742176 IP 131.174.66.167.smtp > 195.169.214.146.41244: P 47:61(14) ack 54 win 1448 <nop,nop,timestamp 2314402757 297011967>
09:23:22.742382 IP 195.169.214.146.41244 > 131.174.66.167.smtp: P 54:92(38) ack 61 win 1460 <nop,nop,timestamp 297011968 2314402757>
09:23:22.784105 IP 131.174.66.167.smtp > 195.169.214.146.41244: . ack 92 win 1448 <nop,nop,timestamp 2314402767 297011968>

And the corresponding lines in the "sendmail style log"
Code: [Select]
1218094233.766218500 qp 9758: to=remote.rogier.lommers@philips.com, uid=453, ddelay=431.036773, xdelay=30.006169, stat=Deferred (131.174.66.167_does_not_like_recipient./Remote_host_said:_450_4.1.8_<admin@lommers.local>:_Sender_address_rejected:_Domain_not_found/Giving_up_on_131.174.66.167./)
1218094243.771040500 warning: trouble opening remote/21/624517; will try again later
1218094269.763614500 warning: trouble opening remote/5/624041; will try again later
1218094281.762461500 warning: trouble opening remote/1/624796; will try again later
1218094283.762344500 warning: trouble opening remote/8/624803; will try again later
1218094283.762350500 warning: trouble opening remote/5/624800; will try again later
1218094283.762354500 warning: trouble opening remote/11/624806; will try again later
1218094283.762358500 warning: trouble opening remote/2/624797; will try again later
1218094298.760831500 warning: trouble opening remote/15/624488; will try again later
1218094310.759679500 warning: trouble opening remote/17/624490; will try again later
1218094323.765368500 warning: trouble opening remote/4/624500; will try again later
1218094345.758316500 warning: trouble opening remote/7/624480; will try again later
1218094355.757370500 warning: trouble opening remote/4/624546; will try again later
1218094367.756218500 warning: trouble opening remote/21/624517; will try again later
1218094393.753709500 warning: trouble opening remote/5/624041; will try again later
1218094405.752565500 warning: trouble opening remote/1/624796; will try again later
1218094407.752450500 warning: trouble opening remote/2/624797; will try again later
1218094407.752456500 warning: trouble opening remote/11/624806; will try again later
1218094407.752460500 warning: trouble opening remote/5/624800; will try again later
1218094407.752465500 warning: trouble opening remote/8/624803; will try again later
1218094422.750935500 warning: trouble opening remote/15/624488; will try again later
1218094434.749792500 warning: trouble opening remote/17/624490; will try again later
1218094447.748535500 warning: trouble opening remote/4/624500; will try again later
1218094469.746438500 warning: trouble opening remote/7/624480; will try again later
1218094479.745468500 warning: trouble opening remote/4/624546; will try again later
1218094491.744318500 warning: trouble opening remote/21/624517; will try again later
1218094517.741824500 warning: trouble opening remote/5/624041; will try again later
1218094529.740675500 warning: trouble opening remote/1/624796; will try again later
1218094531.740547500 warning: trouble opening remote/5/624800; will try again later
1218094531.740553500 warning: trouble opening remote/8/624803; will try again later
1218094531.740558500 warning: trouble opening remote/11/624806; will try again later
1218094531.740562500 warning: trouble opening remote/2/624797; will try again later
1218094546.739043500 warning: trouble opening remote/15/624488; will try again later
1218094558.737889500 warning: trouble opening remote/17/624490; will try again later
1218094571.736643500 warning: trouble opening remote/4/624500; will try again later
1218094593.734534500 warning: trouble opening remote/7/624480; will try again later
1218094603.733571500 warning: trouble opening remote/4/624546; will try again later
1218094615.732423500 warning: trouble opening remote/21/624517; will try again later
1218094641.729930500 warning: trouble opening remote/5/624041; will try again later
1218094653.728781500 warning: trouble opening remote/1/624796; will try again later
1218094655.728654500 warning: trouble opening remote/2/624797; will try again later
1218094655.728660500 warning: trouble opening remote/11/624806; will try again later
1218094655.728665500 warning: trouble opening remote/8/624803; will try again later
1218094655.728669500 warning: trouble opening remote/5/624800; will try again later
1218094670.727150500 warning: trouble opening remote/15/624488; will try again later
1218094682.725998500 warning: trouble opening remote/17/624490; will try again later
1218094695.724752500 warning: trouble opening remote/4/624500; will try again later
1218094717.722640500 warning: trouble opening remote/7/624480; will try again later
1218094726.740722500 warning: trouble opening remote/4/624546; will try again later
1218094739.734533500 warning: trouble opening remote/21/624517; will try again later
1218094756.771076500 qp 29934: to=remote.rogier@lommers.org, uid=102, ddelay=40031.467533, xdelay=30.030365, stat=Deferred (131.174.66.167_does_not_like_recipient./Remote_host_said:_450_4.1.8_<anonymous@lommers.local>:_Sender_address_rejected:_Domain_not_found/Giving_up_on_131.174.66.167./)
1218094765.770032500 warning: trouble opening remote/5/624041; will try again later
1218094777.768881500 warning: trouble opening remote/1/624796; will try again later
1218094779.768755500 warning: trouble opening remote/8/624803; will try again later
1218094779.768761500 warning: trouble opening remote/5/624800; will try again later
1218094779.768765500 warning: trouble opening remote/11/624806; will try again later
1218094779.768769500 warning: trouble opening remote/2/624797; will try again later
1218094794.767265500 warning: trouble opening remote/15/624488; will try again later
1218094806.766100500 warning: trouble opening remote/17/624490; will try again later
1218094819.764854500 warning: trouble opening remote/4/624500; will try again later
1218094841.762747500 warning: trouble opening remote/7/624480; will try again later
1218094850.761877500 warning: trouble opening remote/4/624546; will try again later
1218094863.760647500 warning: trouble opening remote/21/624517; will try again later
1218094889.758149500 warning: trouble opening remote/5/624041; will try again later
1218094901.756993500 warning: trouble opening remote/1/624796; will try again later
1218094903.756894500 warning: trouble opening remote/2/624797; will try again later
1218094903.756900500 warning: trouble opening remote/11/624806; will try again later
1218094903.756904500 warning: trouble opening remote/5/624800; will try again later
1218094903.756908500 warning: trouble opening remote/8/624803; will try again later

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Problems sending mail
« Reply #26 on: August 07, 2008, 03:57:46 PM »
And the corresponding lines in the "sendmail style log"
Code: [Select]
1218094233.766218500 qp 9758: to=remote.rogier.lommers@philips.com, uid=453, ddelay=431.036773, xdelay=30.006169, stat=Deferred (131.174.66.167_does_not_like_recipient./Remote_host_said:_450_4.1.8_<admin@lommers.local>:_Sender_address_rejected:_Domain_not_found/Giving_up_on_131.174.66.167./)

You have no problem connecting to your ISP's mail server, but you are attempting to send an email with an invalid domain address - lommers.local. Configure your SME server with a valid domain name and you won't see this problem.

Code: [Select]
1218094243.771040500 warning: trouble opening remote/21/624517; will try again later

You have broken your mail queue, probably by using tools that you shouldn't have used. Don't try to fix a problem until you understand what the problem is.

Offline smeerbartje

  • *
  • 71
  • +0/-0
Re: Problems sending mail
« Reply #27 on: August 07, 2008, 04:08:12 PM »
You have broken your mail queue, probably by using tools that you shouldn't have used. Don't try to fix a problem until you understand what the problem is.

How do you see that I have broken my queue? And by the way, I only used tools, originating from the contribs.org page.  :-?

Is it possible to repair the queue? Or just delete the whole queue and start all over? Please provide more information. Just mentionning that I have broken the queue does not help me any further. At least tell me how to fix it.

Offline mercyh

  • *
  • 824
  • +0/-0
    • http://mercyh.org
Re: Problems sending mail
« Reply #28 on: August 07, 2008, 04:23:24 PM »
http://forums.contribs.org/index.php?topic=41680.0

This link shows how to rebuild a mail queue. I personally have never used it and do not completely understand what each command does. You will have to figure out which part you need and will lose all current mail in the queue

Offline arne

  • *****
  • 1,116
  • +0/-4
Re: Problems sending mail
« Reply #29 on: August 07, 2008, 10:15:03 PM »
I installed the "E-Mail queue management"-RPM which creates the ability to manage the mailing queue in the server manager. When I use the "Try to send the queued messages now"-function, it says "Cannot send mails, qmail is not running". I did not shut down qmail or something... how can I start qmail?

I wonder if it does not look like CharlieBrady is right.

Isn't a improper configured server together with an extra new rpm the whole problem ?

By the way is this rpm a part of the SME server as it is intended to be used ? (I don't know, but I would not expect that any rpm tha can be downloaded or installed will work well.)

My personal opinion is that the first thing one should do before making any modifcations at all is to chek if the basic unmodified server does work. If it does not than it is time to check network connection and to solve those problems. Then it is time for doing modifications, after your basic setup has been verified and tested. One thing I think is important is to do things step by step, and to verify each step, before the next one.
......