Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Configure email service for smtp server without authentication

Avatar

Community Advisor

Hi there, 

We currently have the com.day.cq.mailer.DefaultMailService configured to use gmail smtp service, works fine. 

 

But now we are switching to another smtp server where no authentication is needed, the dedicated egress ip is whitelisted on smtp side so everything should be enabled to properly handle incoming requests from AEM to port 25.

 

question then is, for the port forwards rule, is it enough to change the current working port forward config:

 

"portForwards": [{
"name": "smtp.gmail.com",
"portDest": 465,
"portOrig": 30002
}]

to 

"portForwards": [{
"name": "ip.address.goes.here",
"portDest": 25,
"portOrig": 30002
}]

note that no domain name is used, only ip

 

 

and the working mail service is currently configured like this:

 

{
    "smtp.host": "$[env:AEM_PROXY_HOST;default=proxy.tunnel]",
    "smtp.port": "30002",
    "smtp.user": "$[env:EMAIL_USERNAME;default=emailapikey]",
    "smtp.password": "$[secret:EMAIL_PASSWORD]",
    "from.address": "sender@example.com",
    "smtp.ssl": true,
    "smtp.starttls": false,
    "smtp.requiretls": true,
    "debug.email": false,
    "oauth.flow": false
}
 
is it enough to only keep this as below or how would it be configured properly?
 
{
    "smtp.host": "$[env:AEM_PROXY_HOST;default=proxy.tunnel]",
    "smtp.port": "30002",
    "from.address": "sender@example.com",
    "smtp.ssl": true,
    "smtp.starttls": false,
    "smtp.requiretls": true,
    "debug.email": false,
    "oauth.flow": false
}
 
been trying back and forth with different configurations and with the configurations above we keep getting this error:
 
com.day.cq.mailer.MailingException: org.apache.commons.mail.EmailException: Sending the email to the following server failed : proxy.tunnel:30002
1 Accepted Solution

Avatar

Correct answer by
Level 2

As an immediate WA, please hardcode the proxy value (don't use variable) and log a support case mentioning #SKYOPS-21877 to aid expedite the AEM engineer analysis - thanks.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 2

As an immediate WA, please hardcode the proxy value (don't use variable) and log a support case mentioning #SKYOPS-21877 to aid expedite the AEM engineer analysis - thanks.

Avatar

Level 4

I think this is feasible . Not able to recall fully but we had configured SMTP configuration without password . But actually it doesn't means we are skipping authentication. In our case SMTP team did few settings at their end and whitelisted few IP's (might be adobe server IP) to make it workable .