Unable to send email through swa

Discuss the Scalix web client

Moderators: ScalixSupport, admin

duca
Posts: 11
Joined: Mon Mar 16, 2009 6:01 pm

Unable to send email through swa

Postby duca » Mon Mar 16, 2009 6:10 pm

Hi!

I have a small setup with scalix 11.4.3, everything seems to work, the only thing that i can't get to work is that my users cannot send email through swa.

Here is the output from scalix-swa.log:
2009-03-16 23:00:21,300 ERROR [SoapMail.send:1848] Failed to connect to the SMTP server.
com.sun.mail.iap.ConnectionException: Due to a failure to establish a connection, the message could not be sent.
Please try again later. A copy of the message has been placed into your 'Drafts' folder.
at com.oddpost.server.module.SoapMail.sendMessage(SoapMail.java:2527)
at com.oddpost.server.module.SoapMail.send(SoapMail.java:1845)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.oddpost.soap.SoapModule.invokeMethod(SoapModule.java:219)
at com.oddpost.soap.SoapRequestImpl.execute(SoapRequestImpl.java:145)
at com.oddpost.server.HttpRequestHandler.handleRequest(HttpRequestHandler.java:216)
at com.oddpost.server.SoapServlet.doPost(SoapServlet.java:44)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.oddpost.server.filter.HttpConfFilter.doFilter(HttpConfFilter.java:181)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.springframework.web.filter.AbstractRequestLoggingFilter.doFilterInternal(AbstractRequestLoggingFilter.java:133)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Unknown Source)

I have search this forum, but the only thread close to mine seems to be this one: viewtopic.php?p=55887 - and that didnt help... could anyone please point me in the direction where to start debugging this error.

/regards

Christoffer

babytux
Posts: 40
Joined: Wed Sep 26, 2007 2:30 am
Location: India

Postby babytux » Tue Mar 17, 2009 4:23 am

Execute following set of commands and check if you are able to access your mailserver at all

telnet <ipaddress> 143

. <space> login <space> <username> <space> <password>
Babytux

schmoe90
Scalix
Scalix
Posts: 900
Joined: Mon May 07, 2007 11:51 am

Postby schmoe90 » Tue Mar 17, 2009 12:32 pm

Sending is done via SMTP, so check that something answers on port 25 for "localhost" and your server's name / IP.

duca
Posts: 11
Joined: Mon Mar 16, 2009 6:01 pm

Postby duca » Tue Mar 17, 2009 4:11 pm

Hi !

Thanks for your feedback!

I know that I wasn't detailed enough in my first post - my apologies!

I have modified my Scalix installation to implement spamassassin, here is my /var/opt/scalix/ml/s/sys/smtpd.cfg :
EXTENSIONS=AUTH,DSN,8BITMIME
SMTP=OFF
SUBMIT=ON
SMTPFILTER=TRUE
AUTH_SUCCESS accept ALL
ANONYMOUS discard
RELAY accept 172.16.0.3
RELAY accept 127.0.0.1
RELAY accept mail.mydomain.dk
RELAY accept .mydomain.dk
RELAY Log_Reject ALL

# extra rules added to prevent open relay usage
RECIPIENT Log_Reject *@*@*
RECIPIENT Log_Reject *%*
RECIPIENT Log_Reject *!*
RECIPIENT Log_Reject *#*@*
[SUBMIT]
LISTEN=localhost:587,mail.mydomain.dk:587
# Reject all anonymous connections
ANONYMOUS Log_Reject ALL

[LMTP]
LISTEN=localhost:24


here is some of my /var/opt/scalix/ml/webmail/swa.properties:
swa.email.domain=mydomain.dk
swa.email.imapServer=mail.mydomain.dk
swa.email.smtpServer=localhost:25
swa.email.userNameIncludesDomain=false


Here is what happens if i do a telnet to smtp:
[root@mail ~]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 mail.mydomain.dk ESMTP Sendmail 8.13.8/8.13.8; Tue, 17 Mar 2009 20:54:02 +0100
ehlo domain.dk
250-mail.mydomain.dk Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
mail from:me@mydomain.dk
250 2.1.0 me@mydomain.dk... Sender ok
rcpt to:you@anotherdomain.dk
250 2.1.5 you@anotherdomain... Recipient ok
data
354 Enter mail, end with "." on a line by itself
Hi there!
.
250 2.0.0 n2HJs2iP001105 Message accepted for delivery

Here is what happens if a do a telnet to scalix
[root@mail ~]# telnet localhost 587
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 mail.mydomain.dk ESMTP 11.4.3.12339; Tue, 17 Mar 2009 20:57:44 +0100 (CET)
ehlo domain.dk
250-mail.mydomain.dk Hello localhost.localdomain [127.0.0.1], pleased to meet you
250-AUTH DIGEST-MD5 PLAIN CRAM-MD5 LOGIN GSSAPI
250-AUTH=LOGIN
250-DSN
250 8BITMIME
mail from:me@mydomain.dk
530 Authentication required


So I cant figure out why I get the following error in swa when try to send emails:
2009-03-16 23:16:55,031 ERROR [SoapMail.send:1848] Failed to connect to the SMTP server.
com.sun.mail.iap.ConnectionException: Due to a failure to establish a connection, the message could not be sent.
Please try again later. A copy of the message has been placed into your 'Drafts' folder.


Can anyone please point me in the right direction - please :o)

Regards

Christoffer

babytux
Posts: 40
Joined: Wed Sep 26, 2007 2:30 am
Location: India

Postby babytux » Wed Mar 18, 2009 3:58 am

you have executed telnet localhost 25, do u get same response when u execute telnet <ipaddres> 25. I mean to say ip on which scalix is installed.
Babytux

duca
Posts: 11
Joined: Mon Mar 16, 2009 6:01 pm

Postby duca » Wed Mar 18, 2009 10:17 am

yes :

[root@mail ~]# telnet 172.16.0.3 25
Trying 172.16.0.3...
Connected to mail.mydomain.dk (172.16.0.3).
Escape character is '^]'.
220 mail.mydomain.dk ESMTP Sendmail 8.13.8/8.13.8; Wed, 18 Mar 2009 15:16:42 +0100
ehlo domain.dk
250-mail.mydomain.dk Hello mail.mydomain.dk [172.16.0.3], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
mail from:duca@mydomain.dk
250 2.1.0 duca@mydomain.dk... Sender ok
rcpt to:you@anotherdomain.dk
250 2.1.5 you@anotherdomain.dk... Recipient ok
data
354 Enter mail, end with "." on a line by itself
Hi! you got mail
.
250 2.0.0 n2IEGgUc010304 Message accepted for delivery



[root@mail ~]# lsof -i:25
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
sendmail 3923 root 4u IPv4 9893 TCP *:smtp (LISTEN)
telnet 10108 root 3u IPv4 324408 TCP localhost.localdomain:58972->localhost.localdomain:smtp (ESTABLISHED)
sendmail 10109 root 1u IPv4 324409 TCP localhost.localdomain:smtp->localhost.localdomain:58972 (ESTABLISHED)
sendmail 10109 root 4u IPv4 324409 TCP localhost.localdomain:smtp->localhost.localdomain:58972 (ESTABLISHED)
sendmail 10109 root 6u IPv4 324409 TCP localhost.localdomain:smtp->localhost.localdomain:58972 (ESTABLISHED)

schmoe90
Scalix
Scalix
Posts: 900
Joined: Mon May 07, 2007 11:51 am

Postby schmoe90 » Wed Mar 18, 2009 12:30 pm

I'd expect:

Code: Select all

# lsof -i:25
COMMAND   PID USER   FD   TYPE DEVICE SIZE NODE NAME
sendmail 9417 root    4u  IPv4  15186       TCP localhost.localdomain:smtp (LISTEN)
omsmtpd  9657 root    4u  IPv4  15696       TCP <fqdn>:smtp (LISTEN)
omsmtpd  9657 root    5u  IPv4  15697       TCP <fqdn>:smtp (LISTEN)
omsmtpd  9657 root    6u  IPv4  15698       TCP <IP>:smtp (LISTEN)
omsmtpd  9657 root    7u  IPv4  15699       TCP <IP>:smtp (LISTEN)


What does

Code: Select all

omstat -a
show for the SMTP Relay?
Last edited by schmoe90 on Wed Mar 18, 2009 4:01 pm, edited 1 time in total.

duca
Posts: 11
Joined: Mon Mar 16, 2009 6:01 pm

Postby duca » Wed Mar 18, 2009 3:53 pm

Hi all!

First i'll like to thank you all for taking the time to help me!!!

Here is the output from omstat:
[root@mail ~]# omstat -a
PC Monitor Started NON-STOP 0
Directory Relay Server Started 03.17.09
Notification Server Started 03.17.09 0
Shared memory daemon Started NON-STOP
Notification Monitor Started NON-STOP
Session Monitor Started NON-STOP
Indexer Started NON-STOP
Stats Daemon Started NON-STOP
Container Access Monitor Started NON-STOP
Item Structure Server Stopped
Database Monitor Started 03.17.09
Licence Monitor Daemon Started NON-STOP
LDAP Daemon Started 03.17.09
Queue Manager Started NON-STOP
Item Delete Daemon Started NON-STOP
IMAP Server Daemon Started 03.17.09
SMTP Relay Started 03.17.09
Mime Browser Controller Started 03.17.09
Event Server Started 03.17.09

schmoe90
Scalix
Scalix
Posts: 900
Joined: Mon May 07, 2007 11:51 am

Postby schmoe90 » Wed Mar 18, 2009 4:02 pm

Try running

Code: Select all

omsendin

duca
Posts: 11
Joined: Mon Mar 16, 2009 6:01 pm

Postby duca » Thu Mar 19, 2009 7:41 am

Hi!


[root@mail ~]# omsendin
NOTE: /etc/mail/sendmail.cf unchanged. Scalix lines already active.

babytux
Posts: 40
Joined: Wed Sep 26, 2007 2:30 am
Location: India

Postby babytux » Thu Mar 19, 2009 9:08 am

Is there any firewall?
Babytux

schmoe90
Scalix
Scalix
Posts: 900
Joined: Mon May 07, 2007 11:51 am

Postby schmoe90 » Thu Mar 19, 2009 1:05 pm

sendmail shouldn't be listening on port 25, so I'd restart it (and smtpd).

duca
Posts: 11
Joined: Mon Mar 16, 2009 6:01 pm

Postby duca » Thu Mar 19, 2009 4:33 pm

babytux: No, there is no firewall

schmoe90: If sendmail shouldn't listening on port 25, what/who should then?

sg
Posts: 45
Joined: Thu Feb 21, 2008 5:16 am
Location: Marl, Germany

Postby sg » Thu Mar 19, 2009 4:38 pm

sendmail should listen on localhost:25
scalix smtp relay should listen on <interface ip>:25

but i'm wondering, why the smtp relay is started, when it isn't listening... It shouldn't run and there should be a log entry either in omshowlog or in fatal log, that the smtp relay could bind to port 25

duca
Posts: 11
Joined: Mon Mar 16, 2009 6:01 pm

Postby duca » Thu Mar 19, 2009 6:42 pm

Hi all!


First i'll like to thank you all for taking the time to help me!!!

I don't know why or how, but i solved my issue by:
#omoff smtpd
#service sendmail restart
#omon smtpd

and suddenly I was able to send email through swa again!?!

Once again, i really appreciate all you help!

Regards

Christoffer


Return to “Scalix Web Access”



Who is online

Users browsing this forum: No registered users and 3 guests