Community

DNS error when sending email

Hi,
I am so new to email server’s concepts. I just installed Axigen and passed primary configurations. When i send email to my own account at yahoo.com, i get " ‘yahoo.com’ not found in DNS " error and the mail request status is set to “SEND FAILURE”.
Thanks for any help.

Hi Alireza and welcome to axigen.
You must define dns servers for axigen in
Webadmin -> Services-> DNR.
Best regards

Hi Mohammad,
Thanks for your reply.
We have a server and some stations and an access point in our local network.
The server is Windows server 2012.
Our server’s internal IP is 192.168.50.254 and also we have a valid IP which we use when we want to access our applications from home or outside of office.
Now please tell me that what exactly do i have to define as “name server” for DNR?
We do not have any domain for our development local network.
Sorry for my poor knowledge about Operating System and Networking.
Best Wishes

Dear alireza.
you can set 8.8.8.8 or 1.1.1.1 or any public DNS servers.
Also if you need to send your emails to public email servers (Yahoo, gmail,…) you need to have a public registered domain, DNS server or a host.
best regards

Dear Mohammad,
I really appreciate your commitment and patience.
I will try your recommendations and will inform you about the results.
Best wishes

1 Like

Dear Mohammad,
I have set 8.8.8.8 for DNR and still have problem.
I decided to send you the code which i am using to send an email and its step by step replies which have been generated by Axigen mail server.
I am using UTL_SMTP, an Oracle built in package, for sending email from inside the database.
Here comes the code :

DECLARE
LV_C UTL_SMTP.CONNECTION;
LV_R UTL_SMTP.REPLY;
BEGIN
/* openning connection to mail server */
LV_R := UTL_SMTP.OPEN_CONNECTION(
HOST => ‘192.168.50.254’,
C => LV_C);
DBMS_OUTPUT.PUT_LINE(‘CONNECTION REPLY:’);
DBMS_OUTPUT.PUT_LINE(LV_R.CODE);
DBMS_OUTPUT.PUT_LINE(LV_R.TEXT);

/* Introduce client to mail server and hand shaking */
LV_R := UTL_SMTP.HELO(
C => LV_C,
DOMAIN => ‘WIN-NPI16QIPHH3’);
DBMS_OUTPUT.PUT_LINE(’-------------------------------’);
DBMS_OUTPUT.PUT_LINE(‘HELLO REPLY:’);
DBMS_OUTPUT.PUT_LINE(LV_R.CODE);
DBMS_OUTPUT.PUT_LINE(LV_R.TEXT);

/* introduce sener to mail server */
LV_R := UTL_SMTP.MAIL(
C => LV_C,
SENDER => ‘postmaster@computech’);
DBMS_OUTPUT.PUT_LINE(’-------------------------------’);
DBMS_OUTPUT.PUT_LINE(‘MAIL REPLY:’);
DBMS_OUTPUT.PUT_LINE(LV_R.CODE);
DBMS_OUTPUT.PUT_LINE(LV_R.TEXT);

/* introduce recipient to mail server */
LV_R := UTL_SMTP.RCPT(
C => LV_C,
RECIPIENT => ‘alireza_vali@yahoo.com’);
DBMS_OUTPUT.PUT_LINE(’-------------------------------’);
DBMS_OUTPUT.PUT_LINE(‘RCPT REPLY:’);
DBMS_OUTPUT.PUT_LINE(LV_R.CODE);
DBMS_OUTPUT.PUT_LINE(LV_R.TEXT);

/* signal the mail server to be ready for accepting the email body */
LV_R := UTL_SMTP.OPEN_DATA(
C => LV_C);
DBMS_OUTPUT.PUT_LINE(’-------------------------------’);
DBMS_OUTPUT.PUT_LINE(‘OPEN_DATA REPLY:’);
DBMS_OUTPUT.PUT_LINE(LV_R.CODE);
DBMS_OUTPUT.PUT_LINE(LV_R.TEXT);

/* sending email body to email server */
UTL_SMTP.WRITE_DATA(
C => LV_C,
DATA => ‘HELLO’ || UTL_TCP.CRLF);

/* signal the mail server for ending transfer of email body text */
LV_R := UTL_SMTP.CLOSE_DATA(
C => LV_C);
DBMS_OUTPUT.PUT_LINE(’-------------------------------’);
DBMS_OUTPUT.PUT_LINE(‘CLOSE_DATA REPLY:’);
DBMS_OUTPUT.PUT_LINE(LV_R.CODE);
DBMS_OUTPUT.PUT_LINE(LV_R.TEXT);

/* closing the connection to email server */
UTL_SMTP.QUIT(LV_C);
END;

And here comes the step by step return codes and text for the above code:


CONNECTION REPLY:
220
WIN-NPI16QIPHH3 Axigen ESMTP ready

HELLO REPLY:
250
WIN-NPI16QIPHH3 Axigen ESMTP hello

MAIL REPLY:
250
Sender accepted

RCPT REPLY:
250
Recipient accepted

OPEN_DATA REPLY:
354
Ready to receive data; remember .

CLOSE_DATA REPLY:
552
Mail rejected by the processing module: Syntax error in parameters or arguments


If you need any further descriptions on UTL_SMTP functions used in my code, Just let me know.
Best regards

to further assisst please set smtp-in and processing module log level on “Protocol communication”:
WEBADMIN > SERVICES > SMTP Receiving > Service Configuration > Logging
and
WEBADMIN > QUEUE > Processing > Service Configuration > Logging

Then send a test email and attach the log file.
by default logs stores in :
[axigen/working/directory]/log/everything.txt

Dear Mohammad,
Here is the everything.txt attached.
Thans so much for your help.
Best regardseverything.txt (29.8 KB)

Dear Alireza
please consider that yahoo reject the email maybe for this reasons:
1- You are sending you emails with invalid domain name space (computech.)
2- Public IP address that emails send through it.
3- Check sender public IP in BLACKLIST databases (mxtoolbox.com)
4- Sender public IP must have RDNS

Dear Mohammad,
Correctly understood, if we register a domain for our valid IP, which is in fact our only server that axigen is also installed on it, then we would not have any problem sending mails programmatically (Cross your fingers!).
If i am wrong, please let me know.
Thanks you so much and wish you healthy days during this CORONA VIRUS pandemi.
Ragrds

Dear Alireza.
Yes, but sending emails have to many considerations.
if you suddenly send to many emails to yahoo, it blocks your IP and return a message that “you need to warm up your IP”.
before sending any email to public MTAs please make sure about DNS records (A, MX, SPF, DK, DKIM, DMARC, RDNS). All of this records increase your ip reputation.
and check your public IP in black list databases.

best regards.