Re: Apache James : Purely MX record based smtp.

2021-07-02 Thread Amlan Sengupta
Hello,


To set more context I am trying to get this work on :
Version : Apache James 3.6.0
Runtime : RHEL 5.7.x
openshift v3.11.248
kubernetes v1.11.0+d4cacc0

I have been debugging this a bit further

- I moved to Apache James 3.6.0
- When I set the gateway host in the mailetcontainer.xml == smtp.x.x.com. I 
get the following error in 3.6.0.
- in my dnsservice.xml I also enabled the  with two upstream dns 
entry. Then I get this


Error:
jvm 1| 02-Jul-2021 21:34:09.722 DEBUG [RemoteDelivery-6] 
org.xbill.DNS.Lookup.lookup:513 - Lookup for smtp.x.x.com./A, cache answer: 
unknown
jvm 1| 02-Jul-2021 21:34:09.728 DEBUG [RemoteDelivery-6] 
org.xbill.DNS.ExtendedResolver$Resolution.send:68 - Sending smtp.x.x.com./A, 
id=50467 to resolver 0 (SimpleResolver [/dnsserrverrip:dnsport]), attempt 1 of 3
jvm 1| 02-Jul-2021 21:34:09.729 DEBUG [RemoteDelivery-6] 
org.xbill.DNS.SimpleResolver.sendAsync:332 - Sending smtp.x.x.com./A, id=50467 
to udp/dnsserrverrip:dnsport
jvm 1| 02-Jul-2021 21:34:09.771 DEBUG [RemoteDelivery-6] 
org.xbill.DNS.Cache.addMessage:732 - Caching NXRRSET for smtp.x.x.com./A
jvm 1| 02-Jul-2021 21:34:09.771 DEBUG [RemoteDelivery-6] 
org.xbill.DNS.Lookup.lookup:563 - Queried smtp.x.x.com./A, id=50467: NXRRSET
jvm 1| 02-Jul-2021 21:34:09.772 ERROR [RemoteDelivery-6] 
org.apache.james.dnsservice.library.MXHostAddressIterator.:79 - Couldn't 
resolve IP address for discovered host smtp.x.x.com.


- so in my env if I do, I get

$nslookup smtp.x.x.com

*** Can't find smtp.x.x.com: No answer

I am wondering if there is anything specific we need to set up or do to get 
this work on kubernetes ? Also has anyone been able to get James to work 
against MX Records which are not coupled with an A Name before ?

I also feel the fundamental issue is, my MX record has no ip and it is dying as 
cannot find one.

 $host smtpxxx..com
 smtpxxx..com mail is handled by 10 sinxxx.xxx.com.
 smtpxxx..com mail is handled by 10 sinyyy.yyy.com.
 smtpxxx..com mail is handled by 10 frayyy.yyy.com.
 smtpxxx..com mail is handled by 10 fraxxx.xxx.com.

Any advise ?

Amlan


Hello Beniot,

This exactly what I am doing in Apache James 3.5.0 in mailetcontainer.xml.

   
  outgoing
  5000, 10, 50
  25
  0
  ${env:MTA_DELIVERY_THREADS}
  true
 bounces
  ${env:SMTP_GATEWAY}
  ${env:SMTP_GATEWAYPORT}

  
  
  ${env:SMTP_WEBSSO_USERNAME}
  ${env:SMTP_WEBSSO_PASSWORD}

  
  
   


The java exception on the other hand states the following :
  jvm 1 | 30-Jun-2021 10:20:30.654 ERROR [RemoteDelivery-2] 
org.apache.james.dnsservice.library.MXHostAddressIterator.:79 - Couldn't 
resolve IP address for discovered host smtpxxx..com.


amlan


On 01/07/2021, 02:47, "btell...@apache.org"  wrote:

Hello,

If ou are using a gateway you should configure it directly
mailetcontainer.xml RemoteDelivery mailet.

Otherwize James would attempt to deliver all mails itself to remote 
domains.

Eg:


outgoing
5000, 10, 23*50
25
0
10
bounces
${env:JAMES_REMOTE_DELIVERY_GATEWAY}

${env:JAMES_REMOTE_DELIVERY_GATEWAY_PORT}

${env:JAMES_REMOTE_DELIVERY_USERNAME}

${env:JAMES_REMOTE_DELIVERY_PASSWORD}


Cheers,

Benoit

On 30/06/2021 22:56, Amlan Sengupta wrote:
> Hello,
>
> To be honest I was not expecting it to need anything else besides a 
MX Record.
>
> The java exception on the other hand states the following :
> jvm 1 | 30-Jun-2021 10:20:30.654 ERROR [RemoteDelivery-2] 
org.apache.james.dnsservice.library.MXHostAddressIterator.:79 - Couldn't 
resolve IP address for discovered host smtpxxx..com. Seems to me that the 
RemoteDelivery class is looking for an ip address for smtpxxx..com and 
treat it as an A Record. Where as all it is the following
>
> $host smtpxxx..com
> smtpxxx..com mail is handled by 10 sinxxx.xxx.com.
> smtpxxx..com mail is handled by 10 sinyyy.yyy.com.
> smtpxxx..com mail is handled by 10 frayyy.yyy.com.
> smtpxxx..com mail is handled by 10 fraxxx.xxx.com.
>
> All my usecase is
>
> Application running in a container ---> ApacheJames Running in a 
separated container ( MTA ) --> SMTP gateway (exposed through MX Records)
>
> Amlan
>
>
>
> On 30/06/2021, 16:43, "David Matthews"  
wrote:
>
> hi Amlan
>
 

Re: Apache James : Purely MX record based smtp.

2021-07-01 Thread Amlan Sengupta
Hello Beniot,

This exactly what I am doing in Apache James 3.5.0 in mailetcontainer.xml.

   
  outgoing
  5000, 10, 50
  25
  0
  ${env:MTA_DELIVERY_THREADS}
  true
 bounces
  ${env:SMTP_GATEWAY}
  ${env:SMTP_GATEWAYPORT}

  
  
  ${env:SMTP_WEBSSO_USERNAME}
  ${env:SMTP_WEBSSO_PASSWORD}

  
  
   


The java exception on the other hand states the following :
  jvm 1 | 30-Jun-2021 10:20:30.654 ERROR [RemoteDelivery-2] 
org.apache.james.dnsservice.library.MXHostAddressIterator.:79 - Couldn't 
resolve IP address for discovered host smtpxxx..com.


amlan


On 01/07/2021, 02:47, "btell...@apache.org"  wrote:

Hello,

If ou are using a gateway you should configure it directly
mailetcontainer.xml RemoteDelivery mailet.

Otherwize James would attempt to deliver all mails itself to remote domains.

Eg:


outgoing
5000, 10, 23*50
25
0
10
bounces
${env:JAMES_REMOTE_DELIVERY_GATEWAY}

${env:JAMES_REMOTE_DELIVERY_GATEWAY_PORT}

${env:JAMES_REMOTE_DELIVERY_USERNAME}

${env:JAMES_REMOTE_DELIVERY_PASSWORD}


Cheers,

Benoit

On 30/06/2021 22:56, Amlan Sengupta wrote:
> Hello,
>
> To be honest I was not expecting it to need anything else besides a MX 
Record.
>
> The java exception on the other hand states the following :
> jvm 1 | 30-Jun-2021 10:20:30.654 ERROR [RemoteDelivery-2] 
org.apache.james.dnsservice.library.MXHostAddressIterator.:79 - Couldn't 
resolve IP address for discovered host smtpxxx..com. Seems to me that the 
RemoteDelivery class is looking for an ip address for smtpxxx..com and 
treat it as an A Record. Where as all it is the following
>
> $host smtpxxx..com
> smtpxxx..com mail is handled by 10 sinxxx.xxx.com.
> smtpxxx..com mail is handled by 10 sinyyy.yyy.com.
> smtpxxx..com mail is handled by 10 frayyy.yyy.com.
> smtpxxx..com mail is handled by 10 fraxxx.xxx.com.
>
> All my usecase is
>
> Application running in a container ---> ApacheJames Running in a 
separated container ( MTA ) --> SMTP gateway (exposed through MX Records)
>
> Amlan
>
>
>
> On 30/06/2021, 16:43, "David Matthews"  wrote:
>
> hi Amlan
>
> Why do you think any SMTP server needs anything other than an MX 
record?
>
> OK Some TXT records for dkim, spf and dmarc, but why an A record?
>
> I doubt that I properly understand your use case and since James 
itself does SMTP, I don't follow why you talk about connecting to an smtp 
provider with your own James instance.
>
> I'm out of date with James now, but did do a write up with config 
changes, as much as for my own future reference as for anyone else. I'm not 
sure if it will help you, but it's at
>
> https://dmatthews.org/java_email.html
>
> if you care to look.
>
> best wishes
>
> --
> David Matthews
> m...@dmatthews.org
>
>
>
>
>
>
> ---
> This e-mail may contain confidential and/or privileged information. If 
you are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and delete this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden.
>
> Please refer to https://www.db.com/disclosures for additional EU 
corporate and regulatory disclosures and to 
http://www.db.com/unitedkingdom/content/privacy.htm for information about 
privacy.
>
> -
> To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org
> For additional commands, e-mail: server-user-h...@james.apache.org

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




---
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and delete this e-mail. Any unauthorized copying, 
disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to https://www.db.com/disclosures for additional EU corporate and 
regulatory disclosures and to 
http://www.db.com/unitedkingdom/content/privacy.htm for information about 
privacy.

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

Re: Apache James : Purely MX record based smtp.

2021-06-30 Thread btell...@apache.org
Hello,

If ou are using a gateway you should configure it directly
mailetcontainer.xml RemoteDelivery mailet.

Otherwize James would attempt to deliver all mails itself to remote domains.

Eg:

    
    outgoing
    5000, 10, 23*50
    25
    0
    10
    bounces
    ${env:JAMES_REMOTE_DELIVERY_GATEWAY}
   
${env:JAMES_REMOTE_DELIVERY_GATEWAY_PORT}
   
${env:JAMES_REMOTE_DELIVERY_USERNAME}
   
${env:JAMES_REMOTE_DELIVERY_PASSWORD}
    

Cheers,

Benoit

On 30/06/2021 22:56, Amlan Sengupta wrote:
> Hello,
>
> To be honest I was not expecting it to need anything else besides a MX Record.
>
> The java exception on the other hand states the following :
> jvm 1 | 30-Jun-2021 10:20:30.654 ERROR [RemoteDelivery-2] 
> org.apache.james.dnsservice.library.MXHostAddressIterator.:79 - 
> Couldn't resolve IP address for discovered host smtpxxx..com. Seems to me 
> that the RemoteDelivery class is looking for an ip address for 
> smtpxxx..com and treat it as an A Record. Where as all it is the following
>
> $host smtpxxx..com
> smtpxxx..com mail is handled by 10 sinxxx.xxx.com.
> smtpxxx..com mail is handled by 10 sinyyy.yyy.com.
> smtpxxx..com mail is handled by 10 frayyy.yyy.com.
> smtpxxx..com mail is handled by 10 fraxxx.xxx.com.
>
> All my usecase is
>
> Application running in a container ---> ApacheJames Running in a separated 
> container ( MTA ) --> SMTP gateway (exposed through MX Records)
>
> Amlan
>
>
>
> On 30/06/2021, 16:43, "David Matthews"  wrote:
>
> hi Amlan
>
> Why do you think any SMTP server needs anything other than an MX record?
>
> OK Some TXT records for dkim, spf and dmarc, but why an A record?
>
> I doubt that I properly understand your use case and since James itself 
> does SMTP, I don't follow why you talk about connecting to an smtp provider 
> with your own James instance.
>
> I'm out of date with James now, but did do a write up with config 
> changes, as much as for my own future reference as for anyone else. I'm not 
> sure if it will help you, but it's at
>
> https://dmatthews.org/java_email.html
>
> if you care to look.
>
> best wishes
>
> --
> David Matthews
> m...@dmatthews.org
>
>
>
>
>
>
> ---
> This e-mail may contain confidential and/or privileged information. If you 
> are not the intended recipient (or have received this e-mail in error) please 
> notify the sender immediately and delete this e-mail. Any unauthorized 
> copying, disclosure or distribution of the material in this e-mail is 
> strictly forbidden.
>
> Please refer to https://www.db.com/disclosures for additional EU corporate 
> and regulatory disclosures and to 
> http://www.db.com/unitedkingdom/content/privacy.htm for information about 
> privacy.
>
> -
> To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org
> For additional commands, e-mail: server-user-h...@james.apache.org

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



Re: Apache James : Purely MX record based smtp.

2021-06-30 Thread Amlan Sengupta
Hello,

To be honest I was not expecting it to need anything else besides a MX Record.

The java exception on the other hand states the following :
jvm 1 | 30-Jun-2021 10:20:30.654 ERROR [RemoteDelivery-2] 
org.apache.james.dnsservice.library.MXHostAddressIterator.:79 - Couldn't 
resolve IP address for discovered host smtpxxx..com. Seems to me that the 
RemoteDelivery class is looking for an ip address for smtpxxx..com and 
treat it as an A Record. Where as all it is the following

$host smtpxxx..com
smtpxxx..com mail is handled by 10 sinxxx.xxx.com.
smtpxxx..com mail is handled by 10 sinyyy.yyy.com.
smtpxxx..com mail is handled by 10 frayyy.yyy.com.
smtpxxx..com mail is handled by 10 fraxxx.xxx.com.

All my usecase is

Application running in a container ---> ApacheJames Running in a separated 
container ( MTA ) --> SMTP gateway (exposed through MX Records)

Amlan



On 30/06/2021, 16:43, "David Matthews"  wrote:

hi Amlan

Why do you think any SMTP server needs anything other than an MX record?

OK Some TXT records for dkim, spf and dmarc, but why an A record?

I doubt that I properly understand your use case and since James itself 
does SMTP, I don't follow why you talk about connecting to an smtp provider 
with your own James instance.

I'm out of date with James now, but did do a write up with config changes, 
as much as for my own future reference as for anyone else. I'm not sure if it 
will help you, but it's at

https://dmatthews.org/java_email.html

if you care to look.

best wishes

--
David Matthews
m...@dmatthews.org






---
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and delete this e-mail. Any unauthorized copying, 
disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to https://www.db.com/disclosures for additional EU corporate and 
regulatory disclosures and to 
http://www.db.com/unitedkingdom/content/privacy.htm for information about 
privacy.


Re: Apache James : Purely MX record based smtp.

2021-06-30 Thread David Matthews
hi Amlan

Why do you think any SMTP server needs anything other than an MX record?

OK Some TXT records for dkim, spf and dmarc, but why an A record?

I doubt that I properly understand your use case and since James itself does 
SMTP, I don't follow why you talk about connecting to an smtp provider with 
your own James instance.

I'm out of date with James now, but did do a write up with config changes, as 
much as for my own future reference as for anyone else. I'm not sure if it will 
help you, but it's at 

https://dmatthews.org/java_email.html

if you care to look.

best wishes

--
David Matthews
m...@dmatthews.org


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



Apache James : Purely MX record based smtp.

2021-06-30 Thread Amlan Sengupta
Hello,

I am a bit unclear based on Apache James 3.5.0 docs whether it is able to 
connect to smtp service provider purely based on MX Records. I have gone 
through the mailing list historically . I have set the gateway and gatewayPort 
to published MX Record.

Logs say the following which seem to imply it is still looking for an A Record.

jvm 1 | 30-Jun-2021 10:20:30.654 ERROR [RemoteDelivery-2] 
org.apache.james.dnsservice.library.MXHostAddressIterator.:79 - Couldn't 
resolve IP address for discovered host smtpxxx..com.

In mailet config  I set up the gateway:


  

  

  

  

  

  

  

  

  

  

  

  

  

  



  ${env:SMTP_GATEWAY}

  ${env:SMTP_GATEWAYPORT}



  

  



  ${env:SMTP_WEBSSO_USERNAME}

  ${env:SMTP_WEBSSO_PASSWORD}


In dnsservice.xml I also enabled


   

   

   true


Our SMTP service provider is forcing down the MX Record with all A Records 
being removed.  Is there anything else I need to consider to get this to work ?


---
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and delete this e-mail. Any unauthorized copying, 
disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to https://www.db.com/disclosures for additional EU corporate and 
regulatory disclosures and to 
http://www.db.com/unitedkingdom/content/privacy.htm for information about 
privacy.