I am facing some weird problem, I have installed the SMTP server on my AIX box and I am successful to send email using the following command:
mailx -s "Hola Mundo" email#domain.com < /tmp/test.txt
But when I am sending the email using the javamail api I am getting following exception, could you help me how to resolve that.
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
javax.mail.SendFailedException: 550 5.7.1 <email#domain.com>... Relaying denied
at com.sun.mail.smtp.SMTPTransport.rcptTo(SMTPTransport.java:632)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:306)
at SendMailUsage.main(SendMailUsage.java:59)
and I am sure my email address is perfect one.
Check out the RFC 2821 (Simple Mail Transfer Protocol), especially the part about STMP replies: https://www.rfc-editor.org/rfc/rfc2821#section-4.2
Status reply starting with 5xx indicates a permanent error. In your case your SMTP server is not configured to route mails to your given destination address.
Issue has been resolved by modifying the sendMail.cf file on the server side. My aix admin informed me that it was due to some DNS issue, will update the solution as soon as I hear from him
Related
I am developing a .Net Core (3.1) web application hosted with IIS 10. When I am trying to use SignalR on localhost, I am able to connect totally fine and receive messages from the backend, but after I publish it to IIS, I get the error: "Server returned handshake error: Handshake was canceled." In the client logs on Chrome's console, I get the message: "Information: SSE connected to http://myserver.com/MyApplication/output" before I get the error described above (which you would think means that I connected successfully)...
I have seen other posts where people have suggested that I have to enable webSockets on IIS, and I have already checked the my site has this enabled.
I have also seen people suggest to try using the longPolling argument in the withUrl function when creating the connection, and this has not helped either.
I have also added SignalR Event Log Trace Listeners to my web.config file, and the only warning I get that might be related to this issue is that I get a warning from the .NET runtime that reads "Failed to determine the https port for redirect." I am not sure what this means or if it would be related to SignalR, but as this also appears to deal with Middleware, it might be significant.
One thing that I thought might be related is that my site is just one of multiple hosted on this server, so that when I am running locally, I can use the following to connect to SignalR:
hubConnection = new signalR.HubConnectionBuilder().withUrl("/output").build();
But because of the way this site is deployed on my server, I have to use this:
hubConnection = new signalR.HubConnectionBuilder().withUrl("/MyApplication/output").build();
when I deploy the site or else I get a 404 error...
Would there be any issue there? I noticed when inspecting the network requests that on localhost, the URL to connect with the socket is "wss://localhost:44315/output?id=..." and I get the "Status Code: 101 Switching Protocols", but after I deploy, the url that is used is "http://myserver.com/MyApplication/output?id=..." and I get a "200 OK" just before receiving the error described at the top. Why does wss get used on localhost but http is requested from my client when I deploy?
FINALLY discovered the issue after days of debugging... The reason I was getting a "101" response on localhost and not when published is because 101 is basically the server (IIS in my case) saying "I support web sockets". I realized that because I wasn't getting this when published, web sockets were probably not enabled in IIS. It was weird, however, because I went into IIS manager and it said that web sockets were enabled, but after much more research, I found that you also have to go into "Server Manager" and enable it as well (see here https://learn.microsoft.com/en-us/iis/get-started/whats-new-in-iis-8/iis-80-websocket-protocol-support and follow step by step instructions). I did not realize both were required.
I am trying to PUT a file from local workstation to a named stage I created but getting an SSL error:
("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",)
I am able to run SELECT statements from within SnowSQL and they run with no problems. But when I try to do a PUT I get an error.
I have also installed latest SnowSQL version available but no luck.
Any thoughts on why I would be getting this error?
thanks
My initial thoughts are that the error indicates a firewall or proxy issue. In particular, a proxy might intercept Snowflake's SSL certificate and replace it with their own. The best way to resolve this is to ensure the certificate is trusted in the proxy and the proxy is configured as per Snowflake's documentation so that the Snowflake certificate can pass through.
The documentation below has more information on using a proxy with SnowSQL. You can pass along the error with issuer details to your network engineer and can request to whitelist the required URLs (documentation also below outlining the whitelisting requirements). You can use the SYSTEM$WHITELIST function to get all the URLs to whitelist in a proxy or firewall for your account.
https://docs.snowflake.net/manuals/user-guide/snowsql-start.html#using-a-proxy-server
https://docs.snowflake.net/manuals/user-guide/hostname-whitelist.html
I am trying to create a fake dns response message from a valid dns query.
I have finished the code and created the response message according to RFC 1035 but I am not sure if it would work if I send it to the source. is there any way or tool to check the message my code generates is valid or not?
Update your program to receive DNS queries on UDP port 53 and to send your replies back. You can then use any DNS client to see if your answers are interpreted as desired. An example client is ISC dig, which can be run as dig #127.0.0.1 example.com. There are many examples on the web that illustrate how to build a simple DNS server; a particularly short one is https://github.com/wfelipe/simple-dns
I have a DNN 8.0.1 website
The users are not able to reset their own passwords. There is an error generated when the reset email is sent:
Mailbox unavailable. The server response was: 5.7.0 Mail relay denied
[...]. Invalid credentials for relay for
Emails are sent through an SMTP relay handled by G-Suite.
here is the stack trace:
at System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response)
at System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, MailAddress from, Boolean allowUnicode)
at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, Boolean allowUnicode, SmtpFailedRecipientException& exception)
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at DotNetNuke.Services.Mail.Mail.SendMailInternal(MailMessage mailMessage, String subject, String body, MailPriority priority, MailFormat bodyFormat, Encoding bodyEncoding, IEnumerable`1 attachments, String smtpServer, String smtpAuthentication, String smtpUsername, String smtpPassword, Boolean smtpEnableSSL)
I have tested the SMTP settings at both the Host and Site Admin levels and they both work.
Email generated from other services are working and emails generated from custom modules are working. Just the emails being set for password resets are not working.
Does anyone have an idea as to why this is happening?
Thanks
When you send an email using the SMTP test, are you sending to an address in the domain of the server? That should work because it doesn't involve a relay.
For relaying, it is the To email address that counts. Relaying means that you are sending to an address that is outside of the domain of the website. So, you need to have permission to do that.
Are your users possible at external email addresses?
One other thing to look at is the SMTP setup for both Host and Site. If I'm remembering right, DNN8 lets you set up separate SMTP for the Host and the site. You may want to check these.
Finally, the way to really see what is going on is to see what is sent to the SMTP server. If you can get at, or have someone get at, the SMTP logs, you'll see exactly how you are sending and the exact error. Given that you are using G-Suite, this may not be easy.
You may get more information from the log4net logs. If there is nothing useful there, you might want to (temporarily) adjust the logging level.
Are you able to get a password reset message for your account?
I configured the SMTP setting om my DNN 7 siteand everything worked fine for weeks. I tried to send a newsletter today and discovered that there is a problem with the SMTP (even though i have changed nothing). I checked the configuration and verified that it hasn't been changed. And indeed it hasn't. I tried a few email accounts that i have and received the same error time and time again. Here is the error:
There has been an error trying to send the test email. The error is:
There is a problem with the configuration of your SMTP Server. Mail was not sent.
Any ideas?
Well, I checked the error and it appears that i used all my allowed emails out by the email server. I guess this is one of the first thing i should have checked...I suggest you to do that if it ever happens to you :)