You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Sandeep Giri <sa...@gmail.com> on 2008/12/16 11:28:38 UTC

Relayings

Hi,I am trying to setup James such that it recieves all the mails to
james.mydomain.com and should be able to send outgoing mails through server
X.

James is able to successfully recieve mail but is not sending outgoing mail
because it is trying to lookup mydomain.com first and if it is not able to
find the MX records of mydomain.com it is failing to deliver rather than
trying to deliever throught the server X which I have mentioned <gateway>
tag.

Any ideas?

Regards,
Sandeep Giri

Re: Relayings

Posted by Stefano Bagnara <ap...@bago.org>.
Sandeep Giri ha scritto:
> Hi,I am trying to setup James such that it recieves all the mails to
> james.mydomain.com and should be able to send outgoing mails through server
> X.
> 
> James is able to successfully recieve mail but is not sending outgoing mail
> because it is trying to lookup mydomain.com first and if it is not able to
> find the MX records of mydomain.com it is failing to deliver rather than
> trying to deliever throught the server X which I have mentioned <gateway>
> tag.
> 
> Any ideas?

AFAIK James won't lookup for an MX server when a gateway is specified.
How can you be sure that this is happening? Have you some logs for this?

>From RemoteDelivery source code it seems clear that the MX hosts are
looked up only when gateway is null.

Stefano

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


Re: Relayings

Posted by Josip Almasi <jo...@vrspace.org>.
Sandeep Giri wrote:
> Hi,I am trying to setup James such that it recieves all the mails to
> james.mydomain.com and should be able to send outgoing mails through server
> X.
> 
> James is able to successfully recieve mail but is not sending outgoing mail
> because it is trying to lookup mydomain.com first and if it is not able to
> find the MX records of mydomain.com it is failing to deliver rather than
> trying to deliever throught the server X which I have mentioned <gateway>
> tag.
> 
> Any ideas?

Well this seems like correct behaviour to me.

Why would you want to send from fake domain anyway?

Maybe you can try checkValidSenderDomain in james-smtphandlerchain.xml 
but I doubt that's it.

Regards...


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


RE: Relayings

Posted by "david.moss" <da...@sunnybar.dynip.com>.

-----Original Message-----
From: Sandeep Giri [mailto:sandeepgiri@gmail.com] 
Sent: Tuesday, 16 December 2008 8:29 PM
To: James Users List
Subject: Relayings

Hi,I am trying to setup James such that it recieves all the mails to
james.mydomain.com and should be able to send outgoing mails through server
X.

James is able to successfully recieve mail but is not sending outgoing mail
because it is trying to lookup mydomain.com first and if it is not able to
find the MX records of mydomain.com it is failing to deliver rather than
trying to deliever throught the server X which I have mentioned <gateway>
tag.

Any ideas?
----

If James can't find mydomain.com why would server X have any better luck?

Here is a message I posted to the list earlier this year on the gateway
topic:

After half a day trying to get James to forward outgoing mail to the
Internet I was at my wits end. Everything seemed to be configured correctly,
James was accepting the message but it disappeared into a black hole.
Incoming mail worked fine. My existing mail account with the ISP worked
fine. It is always tempting to blame the new software in this situation, but
it wasn't the case.

My ISP, Telstra Bigpond, blocks port 25 for all but its own smtp server.
Apparently this is an anti-spam measure that you only find out about when
you try to run your own mail server. Most customers never encounter
limitation. Old discussion forums indicate that blocking port 25 for all but
the ISPs own service is quite common in the industry.

I've posted this article in the hope it may help save others the same
anxiety I felt when James failed to send outgoing e-mail.

The solution was to configure James to use the ISP's nntp server as a
gateway.  The James config file has a template that makes it easy:

<!-- A single mail server to deliver all outgoing messages. -->

            <!-- This is useful if this server is a backup or failover
machine, -->

            <!-- or if you want all messages to be routed through a
particular mail server, -->

            <!-- regardless of the email addresses specified in the message
-->

            <!-- -->

            <!-- The gateway element specifies the gateway SMTP server name.
-->

            <!-- If your gateway mail server is listening on a port other
than 25, -->

            <!-- you can set James to connect to it on that port using the
gatewayPort -->

            <!-- element. -->

            <!-- Although normally multiple addresses are implemented
through proper -->

            <!-- DNS configuration, the RemoteDelivery mail does allow
specifying -->

            <!-- multiple gateway elements, each of which may also have a
port -->

            <!-- e.g., mygateway:2525 -->

            <!-- the gatewayPort element is used as a default -->

            

            <gateway>mail.bigpond.com</gateway>

            <gatewayPort>25</gatewayPort>

         

            <!-- If the gateway requires smtp authentication the following
directives -->

            <!-- (gatewayusername/gatewayPassword) can be used. -->

            

            <gatewayusername>your_username</gatewayusername>

            <gatewayPassword>your_password</gatewayPassword>




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