Email alias from LegacyExchangeDN - LDAP - ldap

I am working with Exchange EWS API. The API returns me a value which is legacyExchangeDN. The value looks like this -
/o=Amazon/ou=Exchange Administrative Group (FYDXXXXXXXXDLT)/cn=Recipients/cn=b08141c097dfd32432klbva43595-email-list
The value is also cropped in some cases (last few characters are not returned by the API)
How can I convert this value into meaningful email address?

Usually you would see this when you make a findItems request because Exchange doesn't resolve the Native (EX) Addresses back to SMTP addresses in this operation. So if you make a GetItem (or Load/Loadpropertiesforitems) request on the particular item you want to look at it as long as that address can be resolve in the GAL (eg that user or object hasn't been deleted) it should return the resolved address. The other option is to use the ResolveName operation https://msdn.microsoft.com/en-us/library/office/dn645423(v=exchg.150).aspx

Related

Exim - identify recipient BCC address

I'm using plus-addressing on Exim to create an automated system - I will process emails based on the local part of the address. So eg:
From: me#eximdomain.com
To: robot+project-4#eximdomain.com
This works well - I can process it based on the To address (specifically project-4). But ideally I want to be able to BCC an email to this address, eg:
From: me#eximdomain.com
To: somebody#otherdomain.com
Bcc: robot+project-4#eximdomain.com
When I am checking the mailbox for robot, I see the message, but nowhere in the header is the actual address that got it there, ie robot+project-4#eximdomain.com - so I cannot process it.
Obviously I do not want somebody#otherdomain.com to be aware of this address; but when robot#eximdomain.com receives it, I want to know that it was actually BCCd to robot+project-4#eximdomain.com (in some/any header).
Is there any way to do this?
Figured this out, if anyone comes across this: added this option to my local delivery transport (Dovecot LMTP in my case):
envelope_to_add = true
It then generates an Envelope-to header containing the incoming address.

Bro Script: Hardcoded IP addresses

Ich have one assignment and I need a little help. I have infected.pcap and the following task:
Hardcoded IP addresses Sometimes, malware contains hardcoded IP addresses to download their payload or to communicate with their command and control (C&C) server. Find all such communication. Hint: Such IPs have no preceding DNS request.
I need to solve it with Bro script. This was my idea, but unfortunatelly all my connections have no DNS request:
#load base/protocols/dns/main.bro
event file_timeout(f: fa_file)
{
for ( cid in f$conns )
{
if(f$conns[cid]?$dns){
print f$conns[cid]$dns;
print "DNS";
}else {
print "No DNS";
}
}
}
Do you know maybe what is wrong with my code?
I would suggest that you're using the wrong event for this. The file_timeout only occurs if a file transfer was occurring and then stopped without completing. A much more interesting event correlation would be:
Track DNS address lookup responses (I would likely use event
dns_A_reply(c: connection, msg: dns_msg, ans: dns_answer, a:
addr)).
Record the addresses returned in a set; this will provide
you a set of all addresses that were discovered through a DNS query.
Examine outbound requests (where orig_h on the SYN is an internal
address)
Check to see if the address in id$resp_h is in the set of
addresses step 2. If it is, return, if it isn't,
generate a notice since you have an outbound connection attempt with
no corresponding DNS lookup.

Send multiple values for one form param in clj-http?

(defn do-request [url query-map]
"Executes HTTP client"
(client/post url {:form-params query-map}))
(do-request "http://foo.com/api" {:a [val1 val2 val3]})
I need to send multiple values for a single key. The API docs state that I need to pass them like foo.com/api?a=val1&a=val2&a=val3 but when I pass that through clj-http as above it only does foo.com/api?a=val3.
(For more detail, I'm using Authorize.Net's version 3.1 CSV-based API and trying to add x_line_item which is defined to work as above.)
Actually #dAni was correct. Passing a vector as above works correctly. The debugging endpoint output from Authorize.Net only shows the last entry, but if you set the client email to one you control you will see the line items you send listed.

wfNotify in IDOC to send mail | csScriptMustBeInWorkflowContext

I have created & called a custom service in my custom template to send mails to users when document gets sent/reject/approve. I want to copy myself in BCC in these mails so that in case of any issues, i could cross check. is there a way i can enter a specific mail address in this code. below is the code i 'm using. Will "wfNotify" be of any help?
code used
<$executeService("APPROVAL_MAIL_PILOT_USERS")$>
<$loop IS_PILOT_USER$>
<$userValue=IS_PILOT_USER.USEREXISTS$>
<$endloop$>
<$if strEqualsIgnoreCase(userValue,"1")$>
----MailFormat----
P.S- when i use wfNotify -> , i get the error
Caused by: intradoc.common.ServiceException: !csScriptMustBeInWorkflowContext,wfNotify
*ScriptStack !csDynHTMLStackDumpStart,pbhati,(datasummary)IdcService=WORKFLOW_SENDTO\,dDocName=D_1247583\,dID=1421894!$
!csDynHTMLNoStack!$
!csDynHTMLErrorMessage,/u01/Oracle/Middleware/user_projects/domains/base_domain/ucm/cs/custom/Workflow/templates/Workflow_reviewer_mail.htm,44,3!csDynHTMLReportMsgFunction,wfNotify!$
-><$wfNotify(xDocOwner,"user")$>
As far as I know, wfNotify can only be called from inside a workflow event which is why you are receiving the csScriptMustBeInWorkflowContext error.
As to a service or Idoc Script function (besides wfNotify) that can be used to send an email to a specific user/alias/token and use a custom template, I could not locate one.
You could create your own scriptable service (which you can then call from Idoc Script) or an Idoc Script function that would allow for this.
You can call wfNotify with the specific username.
But the user must have their email details completed in the user table.
Your second error with the wfNotify call - are you calling wfNotify with a 3rd param for the template?
If so - eliminate this as a source of your problem by just calling wfNotify with the first two params.
wfNotify Oracle Documentation

Debugging K2 workflow - how to view data associated with error conditions?

I have a K2 Blackpearl workflow. In the workflow I populate a process data field with email addresses pulled from a SharePoint list. Using the Text - Join function with the SP List's SmartObject's GetList method for the values and a semi-colon for the separator.
In theory, this should produce a well-formatted string with multiple addresses for the "To" line of the E-mail event. However, I keep receiving a "The specified string is not in the form required for an e-mail address." at the point where the workflow should attempt to send an email.
I've tried using the string "john.doe#company.com;jane.dove#company.com;abc.def#company.com" directly and I've tried splitting the string on the semi-colons in the Activity's destination set. In the first case, there is one instance trying to send the email. In the second instance, the emails are resolved to users and though I select the "ActivityInstanceDestUserEmail" for the "To" line, I still get the error message.
We are using K2 Blackpearl 4.6 with a SharePoint 2010 farm configured strictly for Claims authentication. The users to which I wish to send the email have valid email addresses if resolved using the K2SPS provider, but when the emails are resolved into destination slots, they are resolved into accounts with the K2 provider. I'm guessing that this is the problem with my second method for sending the email. But the first, putting the whole string in the "To" line should have worked it is straight email addresses - no resolving to users is needed.
What am I doing wrong? Is there another way to accomplish this?
Changes in the configuration of our customer security provider, labelled "K2SPS" seem to have resolved the problem - at least for now.