A email has a RCPT TO: header which will be in the protected email-domain that we will verify.
This is common-practices with ESAs or email-gateways to verify & eliminate spam for an user that does not exist in the local email domain.com.
Just like in the my previous earlier blogs, " the JumpCloud LDAP-aaS can be use with these appliances to verify the recipient address " . The steps are out line here below and with diagram of possible deployments solutions.
1st create a LDAP profile as shown in one of my earlier blog postings.
http://socpuppet.blogspot.com/2017/03/jumpcloud-ldap-aas-with-fortimail.html
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2z-1VIx7IyQFfdg5QzacSm9gYEL-lVORuDag8dIBF1mkbael6NHY3ZTyRxyl5mlU2cLOLIozQx4UuACFML7l5Ew0vjRkiFUwSkEaRqjjW1fF_RRXS9JvAqh7PuwhhzPhp7zHx2qTdaNg/s400/tips.png)
2nd apply the named LDAP profile for the email protect-domain
Mail Settings > Domains > LDAP User Profile
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF_VUL7lTFR1uL9ozx-tlz_3S_jQKA6Huam-a1ubzeAXXM9gyAKLmkZV6j3S5gOsVrdQBRSKysGJ05YqZpmZUfJxa3yiBjWuODd2XOaz2Rm_Mv4O0klyiTslFAq9bW6sLIdGoIjYfZ2x0/s640/LDAPPROFILEfordomain.png)
3rd VERY VERY IMPORTANT , apply a recipient policy and selected your LDAP profile under
Policy > Recipient
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihLyqP1kQDmSw9YDXOlf7YMDVpr3_E1LS3epohbBuEQQUxA_-U2Cp-jMO8rSI70j7BlBoUDtndafxrSFEb8WhCSRqSZFhiFkR_kZeuN_oHa1Y9WJ7pycKrZlDcbcTiwtgE1sEH0Sr5m6k/s640/policy12.png)
Keep in mind that recipient policies are very important in the FortiMail mail-processing , and please be cautious of the pecking order. Move and re-adjust the policies as required.
Send a test-email , in my case the email address ldap2@socpuppets.com is not a local mailbox on a fortimail acting as a mail-server so it was bounced
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBAbqoIv8DoycOZgvhDNaneScSPMhxlGm7SmGr1hmwHre3ySs8e27QULUkWQNpqPazBpwD073YTniL0YZ2OJvMvU_gB17eCT-_tv8a_Wq3C07Frxjj_AOFhMImKpRwYFkpGrfWbVJrZ4w/s640/TEST_EMAIL.png)
: LOGS:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAYDjlH7bbEKS2Iym3X0wHHT-z-NxNXcgT2E3695fpQ4gkA-31cNT7JbR3BefSs0aOz3NmOfAfC3TRKqFhIb-5Z0BiuBg0tdXX8IzjF_UpXJT479u45U8lMorHZvKrCK0Is4JsAFvBjM8/s640/LOG_short.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVQK8JZWBwgA8ew-VdfQJP36s5begPeiXFMSDRrgqB0wmzMcI78ZnQwiF_UCWleb1STNBIMmJZFVV4HXgB9ViTmgcm_RAt1P97t8OfxooimVZ9A0_PZN6uE3o7y0EyCw-8DUKVBQ_ThZw/s640/DETAIL_LOG.png)
1st match wins. So like in a firewall-policy specify the most specific 1st
e.g top-2-bottom ordering.
RCP-policy 111 info@socpuppets.com { no verification }
RCP-policy 12 *@socpuppets.com { verification via LDAP profile & w/jumpCloud }
RCP-policy 18 googleblogger@socpuppets.com { no verification }
The latter will never be match due to the "*" wildcard policy preceding it. So the ordering of the policy-id regardless of the assigned numbers are very very important !
And my final tip, always review the logs on the FortiMail ESA. If you have any matches, the event logs will reflect the policy # for that match and disposition.
A user that has not been verified will generate a bounce back and no delivery to any inside exchange servers .
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjv_MLkxAl1aTXiPwtrXz4n8Qz_CzFaGs6sBPxt2CzkJw8OJlZdcC7ZyRzMsHTvsk4uOX5Magb25F0-zzazQon9SWjjQIOVqd3kR3Lu0FSJ5SxwHIiohHuciw2bAwjagnWg2eqQsZUhQUQ/s640/bounceback2.png)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6x3AJwLJrcSIO6oFGcXU4BRkrWcdMzdqPX4xdxMPosfFuA1HwIGFrzVYpBod3VwGR6J9gJMHwSWPqHdweZIFK0OmyZgDRvLRM9FvB9lZlWUfGDkv3HiJ9wsOIKsLQvZ9J6kKRg8dIC0E/s640/bounceback1.png)
By deploy a LDAP services and profile and using a LDAP-aaS provider like JumpCloud , will allow you to apply good anti-spam filtering and secure email delivery.
https://jumpcloud.com
Now here' some deployment diagrams. The 1st is supplement your local LDAP server with Jumpcloud as a fallback. Great for a enterprise.Org that's rebuilding or upgrading it local AD server but needs to have a active LDAP services available. Here we achieve this with SLB and priortizing ldap queries to the local LDAP server and fallback to JumpCloud when the local services are not functional , down or interrupted.
The next diagram shows a simple diagram that solely uses a single JumpCloud instance for recipient verifications purposes with multiple MUAs sending mail to valid and non-Valid Recipients.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtchqpjuPTKs-jnvGSpLWbL2_YGc7Z_Q_C8DK9Vo-WtQS2SBw6Z8zYTLS3p8eFBku562JmI6oOOodlILYgyQOY7Ry-r1EbCqwg5PuGKPJ7xiKgUkyidAknP0CxfTSaNDC_6-Uky-WFs9w/s640/typical.png)
And lastly, in a email-hosting provider arena & where you might have single or pair of ESA email-appliance that needs multiple hosted email protect-domains. Here you could craft multiple JumpCloud org-id and build multiple LDAP profile that's unique for each hosted email-domain.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4EaILgc7m0x8c1juQnZdxkutfnwUhkbieoWIsr3NRs0Hw05l79QFImE7fIVcfLulJafBhANfv-AOtJ1sgHjuXJJSXfje-tp0pwdSs4ShpQ-14dqjHgWJQ9tP-iU-JLe5Y1XaBqrADCQk/s640/Screen+Shot+2017-03-28+at+4.07.54+PM.png)
A unique ldap-administrator could be assigned for each instance and controls his/her own scope and manage the ldap org tree and have a unique org-id and ldap-service account for that domain.
And for diagnostics ensure you test for ldap connectivity and the corrent syntax. Here we are using curl for testing LDAPS to jumpcloud
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0bL9gCcKE46XC9jp_RceMHU99ZPaIyG5rRvOvcyAoW0I3QhzMDd7qJXU7UxFyvQRfUS49EZlBFa0EcyypR7tkzA368lPuFS-hD_mtdzYr413qv9G5C4sCE_s7WYLBWQh9cC-hRVfE6j0/s640/diag.png)
Always ensure the correct credentials and use the "-k" if your using cUrl and have not save the jump cloud public-cert.
Ken
Ken Felix
NSE ( network security expert) and Route/Switching Engineer
kfelix -----a----t---- socpuppets ---dot---com
^ ^
=( @ @ )=
o
/ \
No comments:
Post a Comment