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.