Mandrill: SPF Permanent Error: Invalid domain found (use FQDN) - mandrill

I'm trying to set up Mandrill with one of our client's domains but receiving the error when trying to set up the SPF record:
An unexpected error occurred while checking your domain: SPF Permanent Error: Invalid domain found (use FQDN): 123.123.123
The domain has a current SPF record as follows:
v=spf1 mx ptr ptr:123.123.123 ~all
As per Mandrill's instructions I should add to the existing record as follows:
v=spf1 mx ptr ptr:223.197.169.174 include:spf.mandrillapp.com ~all
Which results in the above error. I have also tried creating a new record instead, which Mandrill also didn't like. Any ideas what I can do?

The PTR mechanism should specify a domain-name and not an ip-address. If no domain is specified the default domain will be used.
But it is strongly discouraged using the PTR mechanism, since it can put a heavy load on the resolving server (https://www.rfc-editor.org/rfc/rfc7208#section-5.5)
So I would think that a record looking like this would do it:
v=spf1 mx include:spf.mandrillapp.com ~all
Or
v=spf1 mx ptr include:spf.mandrillapp.com ~all
if you still want the ptr mechanism.

Related

How to get data from a SAP system using IDOC

I have currently install sap_netweaver_as_abap_751_sp02_ase_dev_edition and all works fine.
My final goal is to create some tables in SAP (I have SAP ASE installed as DB) and to be able to access them using java (of course with sapidoc3.jar and sapjco3.jar).
Until this moment I manage to create a connection to SAP and I get this output:
executing
Attributes:
DEST: mySAPSystem
OWN_HOST: HS-SW-05
PARTNER_HOST: vhcalnplci
SYSTNR: 00
SYSID: NPL
CLIENT: 001
USER: DEVELOPER
LANGUAGE: E
ISO_LANGUAGE: EN
OWN_CODEPAGE: 4102
OWN_CHARSET: UTF16
OWN_ENCODING: utf-16
OWN_BYTES_PER_CHAR: 2
PARTNER_CODEPAGE: 4103
PARTNER_CHARSET: UTF16
PARTNER_ENCODING: utf-16
PARTNER_BYTES_PER_CHAR: 2
OWN_REL: 721
PARTNER_REL: 751
PARTNER_TYPE: 3
KERNEL_REL: 749
TRACE:
RFC_ROLE: C
OWN_TYPE: E
CPIC_CONVID: 00000000
STFC_CONNECTION finished:
Echo: Hello SAP
Response: SAP R/3 Rel. 751 Sysid: NPL Date: 20180905 Time: 132841
Logon_Data: 001/DEVELOPER/E
I also manage to create a simple table in SAP, but right now I don't understand how can I receive info from that table using java and my jars(is not possible to make any selects or things like this).
From what I found on the internet I have understood that these tables are stored in an IDOC file and I should get somehow this IDOC.
If someone has done this before maybe can give me some clues about how can I get some date from a SAP database.
Thank you.
For now, I can only give a general answer, because I feel you'll have to search detailed guides through other posts, how IDOC works.
An IDOC is neither a table, nor a file. It's a format for exchanging data with SAP (SAP also stores them in IDOC tables, for logging and recovery purposes).
You can either send an IDOC to SAP, or get one from SAP. For instance, one IDOC could contain the data of a purchasing order.
To get data from SAP, you must push it from SAP, by defining:
some data in SAP (purchase order, customer, etc.),
when to send it (immediately or scheduled),
how to send the data via IDOCs to your "java program", by configuring partners and ports (file, HTTP, RFC...)
There are transaction codes like WE20, WE21, BD64.
On a trial system, there is almost no real application except the flight demo database. You may try filling it with the program SAPBC_DATA_GENERATOR, then use the program SAPBC_FILL_FLCUST_IDOC to send IDocs of type FLCUSTOMER_CREATEFROMDATA01.

Delphi- How to get my full domain name

In my program I am trying to retrieve the domain name of the current machine.
i found some code that people wrote in forums but they all seem to work partially.
what i mean is that my domain name is something like 'mydomain.mydomain11.com'
and when trying to retrieve the domain name i always get only 'mydomain' instead of 'mydomain.mydomain11'
I also tried usng the 'GetEnvironmentVariable' function which returns the same thing.
If possible, i would like to know how can i retrieve the full path.
my final goal is to query active directory using LDAP protocol, so it will really help to know how can chunk the domain path to something like :
CN=Users,DC=mydomain,DC=mydomain11,DC=com
but getting my full domain name will do for now..
You can use the GetComputerNameEx function with the ComputerNamePhysicalDnsDomain parameter:
The name of the DNS domain assigned to the local computer. If the local computer is a node in a cluster, lpBuffer receives the DNS domain name of the local computer, not the name of the cluster virtual server.`
If your goal is to connect to LDAP to search objects in the directory the usual approach is to connect to RootDSE. Here is an example.
ref What's the best method for getting the local computer name in Delphi
ref http://www.delphipages.com/forum/showthread.php?t=29823
under LorAn, pronounced Lorne - great framework for fetch
rolled in Delphi variable MAXCHAR for buffer size, should be the largest size that can be returned in shortest timeframe
function getDomain: string;
var
vlDomainName : array[0..MAXCHAR] of char;
vlSize : ^DWORD;
begin
New(vlSize);
vlSize^ := MAXCHAR;
ExpandEnvironmentStrings(PChar('%USERDOMAIN%'), vlDomainName, vlSize^);
Dispose(vlSize);
Result := vlDomainName;
end;
To get DNSServer.DOMAIN.DOMAIN..
use ADSI library ADSystemInfo GetAnyDCName() function & split on the decimal [.]

qemu memory operations

I intend to use Qemu to generate a memory trace for the execution of a x86 guest operating system.
According to tcg wiki page, Qemu uses a handful of helpers to generate load/stores to the target(guest) memory.
This list of instructions is tcg_gen_qemu_ld8s/u, tcg_gen_qemu_ld16s/u, tcg_gen_qemu_ld32s/u, tcg_gen_qemu_ld64. (We have a similar set for store instructions).
I am trapping all calls to the above functions in the target-i386/translate.c file
However, I am still missing load/stores of certain instructions like
cmp ecx, [r12+0x4]
mov r10b, [r13+0x0]
mov byte [rax+0xf0000], 0x0
mov byte [rax+rdx], 0x0
Questions :
Can someone please point to other load/store points (direct or indirect) that I am missing ??
Does qemu provide a single entry point function for accesses to guest memory (like guest_read()) which can be instrumented for tracing all loads from the guest memory ???
Can somebody please point to a good documentation where I can understand how qemu maintains the state of the guest memory ??
Sorry friends for the misleading instructions in the previous mail.
cmp ecx, [r12+0x4]
mov r10b, [r13+0x0]
mov byte [rax+0xf0000], 0x0
mov byte [rax+rdx], 0x0
It seems all the above instructions are getting covered with the tcg_gen_ld/st helpers.
But now I have stumbled upon another problem :
I initially thought that all the interactions with the guest memory happen through the helper instructions in the translate.c file.
However, I found that the helper functions for some instructions like cmpxcgh8b and cmpxchg16b are actually accessing guest memory.
So, does it mean there are more than one entry points for reading guest memory.
Can some one please explain how are the ldq and stq instructions translated to access the guest memory ??
The other functions that load data are called cpu_ld*_data and cpu_st*_data, or cpu_ld*_data_ra and cpu_st*_data_ra. The _ra version have an additional argument, which is the address of the caller in the generated code. It is used to compute the address of the faulting instruction in case the load or store generates a page fault.
For example, grepping for cmpxchg8b gives
target/i386/mem_helper.c:void helper_cmpxchg8b(CPUX86State *env, target_ulong a0)
and inside that function:
uintptr_t ra = GETPC();
...
oldv = cpu_ldq_data_ra(env, a0, ra);
newv = (cmpv == oldv ? newv : oldv);
/* always do the store */
cpu_stq_data_ra(env, a0, newv, ra);

SOCKS 5 - Failure behaviour?

I have read the RFC1928 several times and still couldn't understand what a compliant SOCKS 5 server is supposed to reply in case of failure. This doubt comes from the fact that the ATYP, BND.ADDR and BND.PORT fields from a SOCKS reply simply don't make sense if, for instance, a request with an invalid command is received. Must the server not send these fields or just send blanks?
I just red putty source code, and found out that, when there is an error in reply (REP != 0) ATYP is IPv4 (1) BND.ADDR and BND.PORT are all NULL bytes.
I guess this behavior helps developpers to parse requests ?
In a failure reply, only the VER and REP fields are meaningful. The other fields may be present but are not used. You don't even need to look at those bytes unless REP is zero.

Save and Load UTF-8 From Oracle 10g with iBatis

I'm making a web app that needs to load and save UTF-8 (Korean, specifically) characters from a DB. I've been given an account on the Oracle 10g server, but it saves VARCHAR2 type columns as ASCII7, with each UTF-8 character taking 2 VARCHAR2 slots.
I assumed that since iBatis is writing in the same way that it is reading, if I treat everything from input to output as UTF-8 I will have no problems, but any Korean characters I input come out garbled.
Is there a way to do this properly without messing up the (someone else's) DB?
Further information:
I've previously been able to load Korean strings using:
ResultSet rs = ps.executeQuery();
String koreanString = new String(rs.getBytes("colname"), "euc-kr");
And write Korean strings to db using:
PreparedStatement ps = conn.prepareStatement(sql);
ps.setString(1, new String(koreanString.getBytes("euc-kr"), "ISO-8859-1"));
Attempts to change the JDBC connection url result in this message:
Description
Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
[ip]:myTablespace?useUnicode=true&characterEncoding=UTF-8
error dump
javax.servlet.ServletException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
[ip]:myTablespace?useUnicode=true&characterEncoding=UTF-8
at jeus.servlet.jsp2.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:859)
at jeus.servlet.jsp2.runtime.PageContextImpl.handlePageException(PageContextImpl.java:789)
at jeus_jspwork._jsp._500_managerAdmin_5fjsp._jspService(_500_managerAdmin_5fjsp.java:452)
at jeus.servlet.jsp2.runtime.HttpJspBase.service(HttpJspBase.java:95)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at jeus.servlet.jsp.JspServletWrapper.executeServlet(JspServletWrapper.java:147)
at jeus.servlet.servlets.JspServlet.execute(JspServlet.java:365)
at jeus.servlet.engine.HttpRequestProcessor.run(HttpRequestProcessor.java:284)
root cause
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
[ip]:myTablespace?useUnicode=true&characterEncoding=UTF-8
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:261)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:441)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at com.ibatis.common.jdbc.SimpleDataSource.popConnection(SimpleDataSource.java:580)
at com.ibatis.common.jdbc.SimpleDataSource.getConnection(SimpleDataSource.java:222)
at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)
at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForObject(MappedStatement.java:120)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:518)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:493)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:106)
at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(SqlMapClientImpl.java:82)
at [].admRole.getCount(admRole.java:44)
at jeus_jspwork._jsp._500_managerAdmin_5fjsp._jspService(_500_managerAdmin_5fjsp.java:145)
at jeus.servlet.jsp2.runtime.HttpJspBase.service(HttpJspBase.java:95)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at jeus.servlet.jsp.JspServletWrapper.executeServlet(JspServletWrapper.java:147)
at jeus.servlet.servlets.JspServlet.execute(JspServlet.java:365)
at jeus.servlet.engine.HttpRequestProcessor.run(HttpRequestProcessor.java:284)
As I stated in the question, strings are stored and retrieved correctly if they are re-encoded as EUC-KR before being turned into ISO-8859-1 (to save, or vice versa to retrieve).
I modified the two following classes:
com.ibatis.sqlmap.engine.mapping.parameter.ParameterMap
com.ibatis.sqlmap.engine.mapping.result.ResultMap
In both cases, I took the Object[] array (parameters and columnValues), casted to String, and applied the encoding transformations.
I am not using oracle for quite a while, but I have some confidence that this is reason of your "listener does not currently know of SID given" error: Can I force JDBC Driver use UTF-8 Charset to encode?
I am a Chinese developer so the character encoding problem is pretty much the same(we are mostly using GBK character set here). As far as I can remember, "but it saves VARCHAR2 type columns as ASCII7" means that your oracle instance is a non-unicode installation?
The force use of string.getBytes(charset) above JDBC layer is really really bad in terms of maintenance and data interpretability(the string data is displayed as a mess to DBA; DBA can not use SQL to perform any string comparison on this column, etc). So my advice is try to contact your DBA and get the database working with unicode first, since Oracle is very capable of handling unicode data.

Resources