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 elalley <el...@dhs.gov> on 2007/10/18 20:02:14 UTC

James dedicated relay

Hello,

I an a real newbie - this is my 4th day dealing with James (this is my
excuse). Could you please give me some pointers as to how to configure a
James mail relay that accepts email from a single IP and sends out to a
different single IP - a dedicated mail relay. I read a lot on your site and
apache site but cannot come up with a solution. The project has a VERY high
visibility and I am expected to complete it in 4 days. Sorry for the undue
sense of urgency.

Thank you
-- 
View this message in context: http://www.nabble.com/James-dedicated-relay-tf4648699.html#a13280174
Sent from the James - Users mailing list archive at Nabble.com.


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


Re: James dedicated relay

Posted by Norman Maurer <no...@apache.org>.
Hi,

first of all you need to add the ip you want to send the email from to
the <authorizedAddresses> config in the smtpserver block (config.xml). 
Second add the follow config lines to the RemoteDelivery mailet
(config.xml):
<gateway> iptosendemail</gateway>
<gatewayPort>25</gatewayPort>

Thats all.

bye
Norman

Am Donnerstag, den 18.10.2007, 11:02 -0700 schrieb elalley:
> Hello,
> 
> I an a real newbie - this is my 4th day dealing with James (this is my
> excuse). Could you please give me some pointers as to how to configure a
> James mail relay that accepts email from a single IP and sends out to a
> different single IP - a dedicated mail relay. I read a lot on your site and
> apache site but cannot come up with a solution. The project has a VERY high
> visibility and I am expected to complete it in 4 days. Sorry for the undue
> sense of urgency.
> 
> Thank you


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


Re: James dedicated relay

Posted by Stefano Bagnara <ap...@bago.org>.
elalley ha scritto:
> What is a valid message for James? I was doing test runs like this
> 
> data
> subject: host1 to host2
> skjdghks
> slgkhl
> .
> ... Message accepted ...
> telnet> quit

There is no header in that message.
You have to add an additional CRLF between the Subject: line and the
following line.

Stefano

> Stefano Bagnara-2 wrote:
>> elalley ha scritto:
>>> Don't have access to the James boxes now but Xmx must be 128m if my
>>> memory
>>> does not fail me.
>>> I think I caused the memory error by sending my two test boxes into the
>>> infinite loop with corresponding gateway settings. I removed the gateway
>>> from .117 and now don't get those errors any more. My next pain is that I
>>> still cannot send mail from .116 to .117 (a dedicated relay is my
>>> ultimate
>>> goal). Now the error is something like "cannot parse the message". The
>>> good
>>> news that I don't have my message dumped to relay-denied. Meanwhile I'll
>>> download the newer Java version.
>>>
>>> Thank you
>>>
>>> Elena
>> If the OOM was produced by a loop because of a misconfiguration you
>> don't need to upgrade the JVM.
>> The "cannot parse the message" error could be caused by a non rfc
>> compliant message. What are you sending to JAMES via SMTP? Just make
>> sure that you send valid messages and try again.
>>
>> Stefano
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
>>
> 



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


Re: James dedicated relay

Posted by elalley <el...@dhs.gov>.
What is a valid message for James? I was doing test runs like this

data
subject: host1 to host2
skjdghks
slgkhl
.
... Message accepted ...
telnet> quit




Stefano Bagnara-2 wrote:
> 
> elalley ha scritto:
>> Don't have access to the James boxes now but Xmx must be 128m if my
>> memory
>> does not fail me.
>> I think I caused the memory error by sending my two test boxes into the
>> infinite loop with corresponding gateway settings. I removed the gateway
>> from .117 and now don't get those errors any more. My next pain is that I
>> still cannot send mail from .116 to .117 (a dedicated relay is my
>> ultimate
>> goal). Now the error is something like "cannot parse the message". The
>> good
>> news that I don't have my message dumped to relay-denied. Meanwhile I'll
>> download the newer Java version.
>> 
>> Thank you
>> 
>> Elena
> 
> If the OOM was produced by a loop because of a misconfiguration you
> don't need to upgrade the JVM.
> The "cannot parse the message" error could be caused by a non rfc
> compliant message. What are you sending to JAMES via SMTP? Just make
> sure that you send valid messages and try again.
> 
> Stefano
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/James-dedicated-relay-tf4648699.html#a13346843
Sent from the James - Users mailing list archive at Nabble.com.


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


Re: James dedicated relay

Posted by Stefano Bagnara <ap...@bago.org>.
elalley ha scritto:
> Don't have access to the James boxes now but Xmx must be 128m if my memory
> does not fail me.
> I think I caused the memory error by sending my two test boxes into the
> infinite loop with corresponding gateway settings. I removed the gateway
> from .117 and now don't get those errors any more. My next pain is that I
> still cannot send mail from .116 to .117 (a dedicated relay is my ultimate
> goal). Now the error is something like "cannot parse the message". The good
> news that I don't have my message dumped to relay-denied. Meanwhile I'll
> download the newer Java version.
> 
> Thank you
> 
> Elena

If the OOM was produced by a loop because of a misconfiguration you
don't need to upgrade the JVM.
The "cannot parse the message" error could be caused by a non rfc
compliant message. What are you sending to JAMES via SMTP? Just make
sure that you send valid messages and try again.

Stefano


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


Re: James dedicated relay

Posted by elalley <el...@dhs.gov>.
Don't have access to the James boxes now but Xmx must be 128m if my memory
does not fail me.
I think I caused the memory error by sending my two test boxes into the
infinite loop with corresponding gateway settings. I removed the gateway
from .117 and now don't get those errors any more. My next pain is that I
still cannot send mail from .116 to .117 (a dedicated relay is my ultimate
goal). Now the error is something like "cannot parse the message". The good
news that I don't have my message dumped to relay-denied. Meanwhile I'll
download the newer Java version.

Thank you

Elena


Stefano Bagnara-2 wrote:
> 
> elalley ha scritto:
>> OS - Solaris 10 x86 with all latest patches.
>> JVM - bundled 1.5.0_12-b04
> 
> Try with Java 6 Update 3 or at least with java 5 update 13 and let's see
> if you get the same error.
> 
> What is your current Xmx ?
> 
> Stefano
> 
>> Stefano Bagnara-2 wrote:
>>> elalley ha scritto:
>>>> Additional data: added IPs to RemoteAddrNot In Network. Mail from .116
>>>> to
>>>> .117 gets spooled on .117 and then disappears. At this moment James
>>>> dies
>>>> with this error. I do have enough swap space - 13GB.
>>>>
>>>> Exception in thread "CompilerThread0" java.lang.OutOfMemoryError:
>>>> requested
>>>> 32756 bytes for ChunkPool::allocate. Out of swap space?
>>>>  
>>>> [1]+  Exit 1                  /XXX/J*/bin/run.sh
>>> Please tell us JVM version and your OS. Then try upgrading your JVM to
>>> the latest JVM from SUN.
>>>
>>> Stefano
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/James-dedicated-relay-tf4648699.html#a13342342
Sent from the James - Users mailing list archive at Nabble.com.


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


Re: James dedicated relay

Posted by Stefano Bagnara <ap...@bago.org>.
elalley ha scritto:
> OS - Solaris 10 x86 with all latest patches.
> JVM - bundled 1.5.0_12-b04

Try with Java 6 Update 3 or at least with java 5 update 13 and let's see
if you get the same error.

What is your current Xmx ?

Stefano

> Stefano Bagnara-2 wrote:
>> elalley ha scritto:
>>> Additional data: added IPs to RemoteAddrNot In Network. Mail from .116 to
>>> .117 gets spooled on .117 and then disappears. At this moment James dies
>>> with this error. I do have enough swap space - 13GB.
>>>
>>> Exception in thread "CompilerThread0" java.lang.OutOfMemoryError:
>>> requested
>>> 32756 bytes for ChunkPool::allocate. Out of swap space?
>>>  
>>> [1]+  Exit 1                  /XXX/J*/bin/run.sh
>> Please tell us JVM version and your OS. Then try upgrading your JVM to
>> the latest JVM from SUN.
>>
>> Stefano



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


Re: James dedicated relay

Posted by elalley <el...@dhs.gov>.
OS - Solaris 10 x86 with all latest patches.
JVM - bundled 1.5.0_12-b04


Stefano Bagnara-2 wrote:
> 
> elalley ha scritto:
>> Additional data: added IPs to RemoteAddrNot In Network. Mail from .116 to
>> .117 gets spooled on .117 and then disappears. At this moment James dies
>> with this error. I do have enough swap space - 13GB.
>> 
>> Exception in thread "CompilerThread0" java.lang.OutOfMemoryError:
>> requested
>> 32756 bytes for ChunkPool::allocate. Out of swap space?
>>  
>> [1]+  Exit 1                  /XXX/J*/bin/run.sh
> 
> Please tell us JVM version and your OS. Then try upgrading your JVM to
> the latest JVM from SUN.
> 
> Stefano
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/James-dedicated-relay-tf4648699.html#a13339679
Sent from the James - Users mailing list archive at Nabble.com.


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


Re: James dedicated relay

Posted by Stefano Bagnara <ap...@bago.org>.
elalley ha scritto:
> Additional data: added IPs to RemoteAddrNot In Network. Mail from .116 to
> .117 gets spooled on .117 and then disappears. At this moment James dies
> with this error. I do have enough swap space - 13GB.
> 
> Exception in thread "CompilerThread0" java.lang.OutOfMemoryError: requested
> 32756 bytes for ChunkPool::allocate. Out of swap space?
>  
> [1]+  Exit 1                  /XXX/J*/bin/run.sh

Please tell us JVM version and your OS. Then try upgrading your JVM to
the latest JVM from SUN.

Stefano


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


Re: James dedicated relay

Posted by Norman Maurer <no...@apache.org>.
Which JVM you use ? Have you tried to upgrade to the latest java5 or
java6 ?

bye
Norman

Am Sonntag, den 21.10.2007, 18:01 -0700 schrieb elalley:
> Additional data: added IPs to RemoteAddrNot In Network. Mail from .116 to
> .117 gets spooled on .117 and then disappears. At this moment James dies
> with this error. I do have enough swap space - 13GB.
> 
> Exception in thread "CompilerThread0" java.lang.OutOfMemoryError: requested
> 32756 bytes for ChunkPool::allocate. Out of swap space?
>  
> [1]+  Exit 1                  /XXX/J*/bin/run.sh
> 
> I am uploading config.xml with the latest changes. Please look at it.
> 
> Elena
> 
> Did not work. I created new users as bbss1@[10.60.44.116] and
> bbss@[10.60.44.117]. Tried to send mail from .117 to .116. Mail reached .116
> and was dropped in relay-denied. I also disabled dns autodiscovery because I
> found DNS related error in earlier log files. I am sending my config.xml and
> 3 log files with errors pointing to DNS resolution (CNAME). What else?
> Please.
> 
> Elena
> 
> 
> Norman Maurer-3 wrote:
> > 
> > 
> > First of all the creation of an email address with an ip 'as' domain
> > depends on the Server you are using. And if im not wrong the ip needs to
> > get written like '[192.168.1.1]' on sending for example:
> > user1@[192.168.1.1]. 
> > 
> > I just noticed that in the default config.xml you need the sending ip to
> > insert in the <authorizedAddresses> (smtpserver block)  and
> > <RemoteAddrNotInNetwork> Mailet ( transport processor ). After this
> > change it should work.
> > 
> > If it still not work send us your config.xml and the mailet.log 
> > 
> > Norman
> > 
> >> My setup is so secure that I have only two servers in a VLAN in the
> >> DMZ - no DNS records, no exchange servers.
> >> 
> >> I found that I need to create dummy email addresses like
> >> user1@192.168.1.1 and user2@192.168.1.2 to overcome the lack of a DNS
> >> server. Right? All my relay must do is receive mail from one address
> >> and immediately forward to another, nailed point-to-point. At this
> >> time I cannot even send a message from box1 to box2. It ends up in
> >> relay-denied subdirectory.
> >  http://www.nabble.com/file/p13334821/config.xml config.xml 
> > http://www.nabble.com/file/p13334821/dnsserver-2007-10-21-18-01.log
> > dnsserver-2007-10-21-18-01.log 
> > http://www.nabble.com/file/p13334821/mailet-2007-10-21-18-01.log
> > mailet-2007-10-21-18-01.log 
> > http://www.nabble.com/file/p13334821/smtpserver-2007-10-21-18-01.log
> > smtpserver-2007-10-21-18-01.log 
> > 
> http://www.nabble.com/file/p13335127/config.xml config.xml 


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


Re: James dedicated relay

Posted by elalley <el...@dhs.gov>.
Additional data: added IPs to RemoteAddrNot In Network. Mail from .116 to
.117 gets spooled on .117 and then disappears. At this moment James dies
with this error. I do have enough swap space - 13GB.

Exception in thread "CompilerThread0" java.lang.OutOfMemoryError: requested
32756 bytes for ChunkPool::allocate. Out of swap space?
 
[1]+  Exit 1                  /XXX/J*/bin/run.sh

I am uploading config.xml with the latest changes. Please look at it.

Elena

Did not work. I created new users as bbss1@[10.60.44.116] and
bbss@[10.60.44.117]. Tried to send mail from .117 to .116. Mail reached .116
and was dropped in relay-denied. I also disabled dns autodiscovery because I
found DNS related error in earlier log files. I am sending my config.xml and
3 log files with errors pointing to DNS resolution (CNAME). What else?
Please.

Elena


Norman Maurer-3 wrote:
> 
> 
> First of all the creation of an email address with an ip 'as' domain
> depends on the Server you are using. And if im not wrong the ip needs to
> get written like '[192.168.1.1]' on sending for example:
> user1@[192.168.1.1]. 
> 
> I just noticed that in the default config.xml you need the sending ip to
> insert in the <authorizedAddresses> (smtpserver block)  and
> <RemoteAddrNotInNetwork> Mailet ( transport processor ). After this
> change it should work.
> 
> If it still not work send us your config.xml and the mailet.log 
> 
> Norman
> 
>> My setup is so secure that I have only two servers in a VLAN in the
>> DMZ - no DNS records, no exchange servers.
>> 
>> I found that I need to create dummy email addresses like
>> user1@192.168.1.1 and user2@192.168.1.2 to overcome the lack of a DNS
>> server. Right? All my relay must do is receive mail from one address
>> and immediately forward to another, nailed point-to-point. At this
>> time I cannot even send a message from box1 to box2. It ends up in
>> relay-denied subdirectory.
>  http://www.nabble.com/file/p13334821/config.xml config.xml 
> http://www.nabble.com/file/p13334821/dnsserver-2007-10-21-18-01.log
> dnsserver-2007-10-21-18-01.log 
> http://www.nabble.com/file/p13334821/mailet-2007-10-21-18-01.log
> mailet-2007-10-21-18-01.log 
> http://www.nabble.com/file/p13334821/smtpserver-2007-10-21-18-01.log
> smtpserver-2007-10-21-18-01.log 
> 
http://www.nabble.com/file/p13335127/config.xml config.xml 
-- 
View this message in context: http://www.nabble.com/James-dedicated-relay-tf4648699.html#a13335127
Sent from the James - Users mailing list archive at Nabble.com.


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


Re: James dedicated relay

Posted by elalley <el...@dhs.gov>.
Did not work. I created new users as bbss1@[10.60.44.116] and
bbss@[10.60.44.117]. Tried to send mail from .117 to .116. Mail reached .116
and was dropped in relay-denied. I also disabled dns autodiscovery because I
found DNS related error in earlier log files. I am sending my config.xml and
3 log files with errors pointing to DNS resolution (CNAME). What else?
Please.

Elena



First of all the creation of an email address with an ip 'as' domain
depends on the Server you are using. And if im not wrong the ip needs to
get written like '[192.168.1.1]' on sending for example:
user1@[192.168.1.1]. 

I just noticed that in the default config.xml you need the sending ip to
insert in the <authorizedAddresses> (smtpserver block)  and
<RemoteAddrNotInNetwork> Mailet ( transport processor ). After this
change it should work.

If it still not work send us your config.xml and the mailet.log 

Norman

> My setup is so secure that I have only two servers in a VLAN in the
> DMZ - no DNS records, no exchange servers.
> 
> I found that I need to create dummy email addresses like
> user1@192.168.1.1 and user2@192.168.1.2 to overcome the lack of a DNS
> server. Right? All my relay must do is receive mail from one address
> and immediately forward to another, nailed point-to-point. At this
> time I cannot even send a message from box1 to box2. It ends up in
> relay-denied subdirectory.
http://www.nabble.com/file/p13334821/config.xml config.xml 
http://www.nabble.com/file/p13334821/dnsserver-2007-10-21-18-01.log
dnsserver-2007-10-21-18-01.log 
http://www.nabble.com/file/p13334821/mailet-2007-10-21-18-01.log
mailet-2007-10-21-18-01.log 
http://www.nabble.com/file/p13334821/smtpserver-2007-10-21-18-01.log
smtpserver-2007-10-21-18-01.log 
-- 
View this message in context: http://www.nabble.com/James-dedicated-relay-tf4648699.html#a13334821
Sent from the James - Users mailing list archive at Nabble.com.


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