You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Yves Vindevogel <yv...@implements.be> on 2006/03/20 15:33:39 UTC
Can't get sendmail to work
Hi,
I can't get the sendmail generator to work.
I've created a very simple test
<?xml version="1.0" encoding="UTF-8"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
<map:pipelines>
<map:pipeline>
<map:match pattern="mail.xsp">
<map:generate src="mail.xsp" type="serverpages"/>
<map:serialize type="html"/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsp:page language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:sendmail="http://apache.org/cocoon/sendmail/1.0">
<html>
<body>
<xsp:logic>
StringBuffer body = new StringBuffer();
body.append("\n");
body.append("--- Test mail ---\n\n");
</xsp:logic>
<sendmail:send-mail>
<sendmail:from>yves.vindevogel@telenet.be</sendmail:from>
<sendmail:to>yves.vindevogel@implements.be</sendmail:to>
<sendmail:subject>Test</sendmail:subject>
<sendmail:smtphost>195.130.137.75</sendmail:smtphost>
<sendmail:body><xsp:expr>body.toString()</xsp:expr></sendmail:body>
<sendmail:on-success>
<p>Success</p>
</sendmail:on-success>
<sendmail:on-error>
<p>Error: <sendmail:error-message/></p>
</sendmail:on-error>
</sendmail:send-mail>
</body>
</html>
</xsp:page>
When I run the page, I do get a "success", but no mail arrives.
I have put the mail.jar and activation.jar (together with smtp.jar and
others from sun javamail) in /lib/local, in WEB-INF/lib, somewhere
everywhere possible.
I have recompiled Cocoon and I've looked into the config file, the entry
for sendmail xsp is there.
So, I don't know what's the matter with it ...
Any help ?
Yves
Re: Can't get sendmail to work
Posted by Yves Vindevogel <yv...@implements.be>.
I could not get ngrep to work on my winxp, basically because I don't
know how my interface is named.
I tried eth0 (like in unix), "Wireless Network Connection", any, ....
Nothing worked
I then downloaded "ethereal for Windows". It has the same
functionality, I think.
But there you can simply specify the interface from a list. And you can
filter the port.
It works like a charm.
Unfortunately, it did not solve my problem, but in the meantime, Antonio
solved the problem for me.
Thanks for the help and I hope my answer helps you out one day on a
windows machine
Bertrand Delacretaz wrote:
> Le 20 mars 06 à 17:41, Yves Vindevogel a écrit :
>
>> When I do ngrep port 25 (or port 80 for that matter), nothing shows
>> up on ngrep.
>> I am using a wireless connection (10.32.1.0/24) and a normal wired
>> one (10.32.2.0/24)...
>
>
> ngrep dumps the traffic of a single interface, you might have to
> specify which one you want to dump.
>
> Not sure how this works under windows - on a unixish system you'd use
> ifconfig to see what interfaces you have, and specify one with the -d
> option of ngrep.
>
> If your mail server is on the same host, you need to dump the traffic
> of the loopback interface. Again I don't know how this translates to
> a windows system.
>
> Hope this helps,
> -Bertrand
>
Re: Can't get sendmail to work
Posted by Bertrand Delacretaz <bd...@apache.org>.
Le 20 mars 06 à 17:41, Yves Vindevogel a écrit :
> When I do ngrep port 25 (or port 80 for that matter), nothing shows
> up on ngrep.
> I am using a wireless connection (10.32.1.0/24) and a normal wired
> one (10.32.2.0/24)...
ngrep dumps the traffic of a single interface, you might have to
specify which one you want to dump.
Not sure how this works under windows - on a unixish system you'd use
ifconfig to see what interfaces you have, and specify one with the -d
option of ngrep.
If your mail server is on the same host, you need to dump the traffic
of the loopback interface. Again I don't know how this translates to
a windows system.
Hope this helps,
-Bertrand
Re: Can't get sendmail to work
Posted by Yves Vindevogel <yv...@implements.be>.
When I do ngrep port 25 (or port 80 for that matter), nothing shows up
on ngrep.
I am using a wireless connection (10.32.1.0/24) and a normal wired one
(10.32.2.0/24)
Also, I have VMWare installed (not running at the moment). They make
virtual network adapters too.
I'm running on Windows XP for the moment.
I can mail (receive and send), but I can't get ngrep to report something.
Bertrand Delacretaz wrote:
> Le 20 mars 06 à 15:33, Yves Vindevogel a écrit :
>
> ...
>
>> <sendmail:smtphost>195.130.137.75</
>> sendmail:smtphost>
>
> ...
>
>> When I run the page, I do get a "success", but no mail arrives.
>
> ...
>
> The best way (IMHO) to debug such problems is to use a network
> monitoring tool like ngrep (http://ngrep.sourceforge.net/) or
> ethereal to see exactly what happens between your app and the
> 195.130.137.75, port 25 if you're using a standard smtp config.
>
> With ngrep it's as simple as
>
> ngrep -d yourNetworkInterface host 195.130.137.75 port 25
>
> to see a real-time dump of the SMTP traffic.
>
> This should allow you to narrow down your problem.
>
> -Bertrand
>
Re: Can't get sendmail to work
Posted by Bertrand Delacretaz <bd...@apache.org>.
Le 20 mars 06 à 15:33, Yves Vindevogel a écrit :
...
> <sendmail:smtphost>195.130.137.75</
> sendmail:smtphost>
...
> When I run the page, I do get a "success", but no mail arrives.
...
The best way (IMHO) to debug such problems is to use a network
monitoring tool like ngrep (http://ngrep.sourceforge.net/) or
ethereal to see exactly what happens between your app and the
195.130.137.75, port 25 if you're using a standard smtp config.
With ngrep it's as simple as
ngrep -d yourNetworkInterface host 195.130.137.75 port 25
to see a real-time dump of the SMTP traffic.
This should allow you to narrow down your problem.
-Bertrand
Re: Can't get sendmail to work
Posted by Yves Vindevogel <yv...@implements.be>.
Yep, that was it. I removed them and my page works.
Thanks a lot !!!
Antonio Gallardo wrote:
> Hi Yves,
>
> Remove geronimo-spec-activation-1.0.2-rc4.jar and
> geronimo-spec-javamail-1.3.1-rc5.jar from the WEB-INF/lib
>
> Best Regards,
>
> Antonio Gallardo
>
>
> Yves Vindevogel wrote:
>
>> Hi,
>>
>> I can't get the sendmail generator to work.
>> I've created a very simple test
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
>> <map:pipelines>
>> <map:pipeline>
>> <map:match pattern="mail.xsp">
>> <map:generate src="mail.xsp" type="serverpages"/>
>> <map:serialize type="html"/>
>> </map:match>
>> </map:pipeline>
>> </map:pipelines>
>> </map:sitemap>
>>
>>
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>> <xsp:page language="java"
>> xmlns:xsp="http://apache.org/xsp"
>> xmlns:sendmail="http://apache.org/cocoon/sendmail/1.0">
>>
>>
>>
>> <html>
>> <body>
>> <xsp:logic>
>> StringBuffer body = new StringBuffer();
>> body.append("\n");
>> body.append("--- Test mail ---\n\n");
>> </xsp:logic>
>>
>> <sendmail:send-mail>
>>
>> <sendmail:from>yves.vindevogel@telenet.be</sendmail:from>
>>
>> <sendmail:to>yves.vindevogel@implements.be</sendmail:to>
>> <sendmail:subject>Test</sendmail:subject>
>>
>> <sendmail:smtphost>195.130.137.75</sendmail:smtphost>
>>
>> <sendmail:body><xsp:expr>body.toString()</xsp:expr></sendmail:body>
>>
>> <sendmail:on-success>
>> <p>Success</p>
>> </sendmail:on-success>
>>
>> <sendmail:on-error>
>> <p>Error: <sendmail:error-message/></p>
>> </sendmail:on-error>
>> </sendmail:send-mail>
>> </body>
>> </html>
>>
>> </xsp:page>
>>
>> When I run the page, I do get a "success", but no mail arrives.
>> I have put the mail.jar and activation.jar (together with smtp.jar
>> and others from sun javamail) in /lib/local, in WEB-INF/lib,
>> somewhere everywhere possible.
>> I have recompiled Cocoon and I've looked into the config file, the
>> entry for sendmail xsp is there.
>>
>> So, I don't know what's the matter with it ...
>> Any help ?
>>
>> Yves
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
Re: Can't get sendmail to work
Posted by Antonio Gallardo <ag...@agssa.net>.
Hi Yves,
Remove geronimo-spec-activation-1.0.2-rc4.jar and
geronimo-spec-javamail-1.3.1-rc5.jar from the WEB-INF/lib
Best Regards,
Antonio Gallardo
Yves Vindevogel wrote:
> Hi,
>
> I can't get the sendmail generator to work.
> I've created a very simple test
>
> <?xml version="1.0" encoding="UTF-8"?>
> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
> <map:pipelines>
> <map:pipeline>
> <map:match pattern="mail.xsp">
> <map:generate src="mail.xsp" type="serverpages"/>
> <map:serialize type="html"/>
> </map:match>
> </map:pipeline>
> </map:pipelines>
> </map:sitemap>
>
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xsp:page language="java"
> xmlns:xsp="http://apache.org/xsp"
> xmlns:sendmail="http://apache.org/cocoon/sendmail/1.0">
>
>
>
> <html>
> <body>
> <xsp:logic>
> StringBuffer body = new StringBuffer();
> body.append("\n");
> body.append("--- Test mail ---\n\n");
> </xsp:logic>
>
> <sendmail:send-mail>
>
> <sendmail:from>yves.vindevogel@telenet.be</sendmail:from>
>
> <sendmail:to>yves.vindevogel@implements.be</sendmail:to>
> <sendmail:subject>Test</sendmail:subject>
>
> <sendmail:smtphost>195.130.137.75</sendmail:smtphost>
>
> <sendmail:body><xsp:expr>body.toString()</xsp:expr></sendmail:body>
>
> <sendmail:on-success>
> <p>Success</p>
> </sendmail:on-success>
>
> <sendmail:on-error>
> <p>Error: <sendmail:error-message/></p>
> </sendmail:on-error>
> </sendmail:send-mail>
> </body>
> </html>
>
> </xsp:page>
>
> When I run the page, I do get a "success", but no mail arrives.
> I have put the mail.jar and activation.jar (together with smtp.jar and
> others from sun javamail) in /lib/local, in WEB-INF/lib, somewhere
> everywhere possible.
> I have recompiled Cocoon and I've looked into the config file, the
> entry for sendmail xsp is there.
>
> So, I don't know what's the matter with it ...
> Any help ?
>
> Yves
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org