ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Lévy-Lambert <anto...@antbuild.com>
Subject AW: Mail Error in Ant 1.5.2
Date Tue, 18 Nov 2003 08:41:29 GMT
Hi Luis,

relaying denied is a message from your SMTP server, which refuses to handle
the email you are attempting to send.

you are using plain mail.

In MailMessage.java, there is this snippet of code :

void sendHelo() throws IOException {
    String local = InetAddress.getLocalHost().getHostName();
    int[] ok = {OK_HELO};
    send("HELO " + local, ok);
  }
try to find out whether what comes out of
InetAddress.getLocalHost().getHostName() can be reverse looked up on the Sun
server holding the SMTP gateway.

You can also install the mail.jar and activation.jar in your $ANT_HOME/lib
directory and remove the encoding="plain" attribute from your build file.
Then ant will use automatically JavaMail, which maybe behaves better for
this problem.

Otherwise :

On this link there is a description of this type of problems.
http://www.fogcreek.com/FogBUGZ/KB/trouble/EmailNotificationProblems.html
and this one
http://www.sendmail.org/faq/section3.html#3.27

Cheers,

Antoine

-----Urspr√ľngliche Nachricht-----
Von: Conelly, Luis (EM, DDEMESIS) [mailto:Luis.Conelly@ge.com]
Gesendet: Dienstag, 18. November 2003 00:07
An: Ant Users List (E-mail)
Betreff: Mail Error in Ant 1.5.2


Hi all

    I am trying to send a mail throughout a standard Unix (Sparc SunOS 5.8)
from my current workstation (Win2K). This is the snippet of the code

    <target name="NotifyUpdate" description="Notifies about an update to QA
Bridge">
        <mail mailhost="${mail.host}" mailport="${mail.port}"
              encoding="plain" subject="Ready to update QA"
              from="${mail.sender}" tolist="${list.UpdateQA}">
            <message src="${mail.text.src.QA}"/>
        </mail>
    </target>

    When I execute this target from my command line, I got this message:




NotifyUpdate:
     [mail] Using plain mail
     [mail] Sending email: Ready to update QA
     [mail] From edocsBuilder
     [mail] To [luis.conelly@ge.com]
     [mail] Cc []
     [mail] Bcc []
     [mail] Failed to send email

BUILD FAILED
file:C:/Projects/GNF/eDocs/QA.xml:272: IO error sending mail
        at
org.apache.tools.ant.taskdefs.email.PlainMailer.send(PlainMailer.java:121)
        at
org.apache.tools.ant.taskdefs.email.EmailTask.execute(EmailTask.java:510)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.Main.runBuild(Main.java:609)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)
--- Nested Exception ---
java.io.IOException: Unexpected reply to command: RCPT TO:
<luis.conelly@ge.com>: 550 5.7.1 <luis.conelly@ge.com>... Relaying denied.
IP name lookup failed [my.workstation.ip.address]
        at org.apache.tools.mail.MailMessage.send(MailMessage.java:431)
        at org.apache.tools.mail.MailMessage.sendRcpt(MailMessage.java:405)
        at org.apache.tools.mail.MailMessage.to(MailMessage.java:228)
        at
org.apache.tools.ant.taskdefs.email.PlainMailer.send(PlainMailer.java:88)
        at
org.apache.tools.ant.taskdefs.email.EmailTask.execute(EmailTask.java:510)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.Main.runBuild(Main.java:609)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)

Total time: 13 seconds



    Now, I am pretty sure that the mail host is working fine, since my
current application is sending mails by using this server. Furthermore, I
have telnet the host to the port I am using (default port 25) and I got a
satisfactory answer:, as you can see below:

220 my.development.server.com ESMTP Sendmail 8.11.7p1+Sun/8.11.7; Mon, 17
Nov 2003 14:21:08 -0800 (PST)

    I have been looking through the code for
org.apache.tools.ant.taskdefs.email.EmailTask, but it seems I can't find why
this behavior is bringing up. I do not know if this is involved in some way,
but my IP address is resolved via DHCP, instead having a fixed IP address.

    Any guideline, direction will be welcome

Regards
______________________
Luis G. Conelly
Contractor

Global Nuclear Fuel
A join venture of GE, Toshiba & Hitachi
Ph. (+52) 449-910-7800 ext. 7308
Mobile (+52) 449-123-8749
DialComm. *879-7308
Fax (+52)449-910-7801
e-mail Luis.Conelly@GE.com
"The information contained in this transmission is non-public, is the
confidential, proprietary information of GE Ddemesis Servicios, S.A. de C.V.
and / or GE Nuclear Energy and / or Global Nuclear Fuel and / or any of its
subsidiaries. In addition to any other restrictions that may be imposed by
Confidentiality or Non-Disclosure Agreements between GE Ddemesis Servicios,
S.A. de C.V and / or GE Nuclear Energy and / or Global Nuclear Fuel and the
recipient, may not be disclosed, copied or used for other than its intended
purpose without written permission from GE Ddemesis Servicios, S.A. de C.
and / or GE Nuclear Energy and / or Global Nuclear

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message