SAS (WPS) cannot send email via SMTP. See error code - email

I am using WPS, a diluted version of SAS, and I cannot send emails through the SMTP server using the normal (and fairly well documented) config flags.
I keep receiving the error message:
SSL exception: Could not initialise security context [80090322]
Having found some forum posts, the description for this issue is that the SMTP server is expecting authentication using a certificate. When I mentioned this to the IT team, nothing came from it. Having used SAS for a significant period, you would normally and quite simply apply some very basic information into the config file (see below).
I've been given the admin username and password, I've used an array of different ports, but still the same error message persists.
Does anyone have any ideas on how to make SAS/WPS connect to a secure SMTP? Config file is:
-emailsys SMTP
-emailhost 10.0.x.x
-emailport 23 (Port 23 was opened for my use, we are not able to use port 25).
The error message persists even if I force the credentials via -emailid and -emailpw.
Thanks in advance,
Dan

The fix for this is to utilise a fully qualified domain name, rather than an IP address or other method.

I know this is very old, but I had a really bad time trying to figure this same problem out and I'd like to post my solution here for people who might need it in the future.
Basically, this problem happens because SAS/WPS is trying to validate the certificate he has gotten from the smtp server when trying to interact with it (ie.: send an e-mail).
There are 2 solutions:
You can define the location were the trusted certificators are stored for the system to validate it.
You can define the server option TLS_HOSTVALIDATION to NONE by doing something like OPTIONS TLS_HOSTVALIDATION=NONE
I hope this helps.

Related

Gmail SMTP Access 5.5.1 Authentication Required. From Custom Domain

I'm trying to send emails via smtp.gmail.com in the standard way, and I'm getting a standard error, but for some non-standard reason.
Specifically, I get this error: System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required. when I send the mail.
The answers on this link have not helped me: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required?
I suspect that there are additional steps required if you're trying to do this from a custom domain.
I've created a throw-away standard Gmail account to test out my code and everything works perfectly there.
If I en-/dis-able Less Secure Apps then it behaves as you'd expect, and as per the linked solutions.
If I en-/dis-able 2FA and create 3rd party app passwords then, again, it behaves as I'd expect, and as per the linked solutions.
So my code, and my ability to configure a general Gamil acccount, are working just fine.
But when I use an otherwise identical GSuite email address, set up on a custom domain (system#clientdomain.co.uk) then nothing works :( I've tried all the permutations, with/without LessSecureApps, with main user password / with 3rd Party App Password, etc. Nothing works.
I can only assume that either the custom domain or the fact that it's a GSuite account is breaking it.
What now?
So apparently I either needed to wait longer, or change the settings harder!!
A colleague wandered past and asked what the problem was and I demonstrated it, including going through and setting the settings again, and this time it worked. I'm 80% sure they were the same settings, but perhaps not?

Website is not sending emails to email add on MS Exhange

Having problems with setting up my website to use MS Exchange to send emails. I dont want to use the hosts email system.
The MS Exhange has been set up, with email addresses created.
My webpages are using Persits.MailSender which the host supports.
Do i need to change MX records? A records?
Sorry, im not clued up with network side of things, any help would be appreciated
When i email direct, the email address on the exchange picks up the emails. BUT if i email through the website, it goes to the annoying webmail the host is provinding, and not to the exchange
I find this strange, the same email address receiving emails at different places!
Im using ASP, and I have a website set up, which has been sending emails for the last 12 months, the host has messed up (again) somewhere, but doesnt know what is wrong (as usual)
There are no errors, the email always gets sent.... but to the wrong place.
I would look into actually trapping and knowing your errors. That way you can see precisely why it fails and have something to work with. As it stands, your question isn't really answerable. No language nor framework is provided. We don't know if the mail server is confirmed to be working or accessible outside your netowrk; we don't know how your are referencing it or if you are passing user credentials; we don't know what error you're getting...
At this point, you're not debugging, you're just sort of swinging in the dark. Find the point of failure and then research that data point to get a solution. Debug, catch errors, log, step through your code. All good ideas.
Ok i figured it out, I deleted the mail domain on the host as that was the first place the website looks to send an email. Once the mail domain was deleted the emails were sent to the external hosted mailserver MS Exchange email address. Yay!

Apache james relaying denied

I was trying to send mail to my gmail id using apche james but i am getting this error
Requested action not taken: relaying denied
What could be the reason for this?
If this is still relevant to you, you need to do further configuration in your config.xml, especially important would be to define a DNS server. and the relay-mailet.
On another (but important) note:
If you're trying to send to gmail from a dynamic IP (like most people have), gmail will probably deny your request on the grounds of you being a possible spammer.
A static IP-address is mostly needed for actions like this.

local SMTP server won't send email from cfmail b/c of rcpthosts issue

We've ported several legacy ColdFusion sites from rackspace to viviotech, and they all work fine except for sending email using the cfmail tag. When viewing the CF mail.log it contains this error message for each attempt:
"Error","scheduler-0","07/01/10","06:31:22",,"Invalid Addresses; nested exception is: class javax.mail.SendFailedException: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.5.3 - chkuser) "
However, looking at the rcpthosts file, the domain is indeed there that was used in the "from" attribute of cfmail. going into the CF admin, you can set the SMTP server and verify connection. I have tried both 127.0.0.1 as well as the actual IP of the server--both verify as successful connections, but I still can't send email. The old server worked fine for this (even though CF is not supported by rackspace, but IS supported by vivio).
One advice I was already given was use the user:password#server.com construct, but I don't want to do that since none of these domains are reliably permanent--we are wanting to change most or all of the sites to PHP in the next year if possible. I just want to be able to use the local SMTP without restriction, as I was able to on the previous server.
Actually I found the key to the answer here: http://www.palomine.net/qmail/relaying.html
The new server we moved to uses qmail instead of sendmail, which has major restrictions on email by default. There is a "selective relay" link on this page that has steps to remedy, although it's an annoyingly large number of steps.

Email aliasing with qmail

I'm trying to set up email domain aliasing in qmail (I'm on a Plesk server). What should happen is that emails sent to user#myalias.com get sent to user#realdomain.com (regardless of what user is). I would like this to happen without having to set up redirects and mess around with that sort of thing.
I've followed the details on this forum post with limited success. I only made changes to the qmail config as all other config is already there and correct as the myalias.com domain is set up through Plesk ...
modify /var/qmail/control/virtualdomains
add myalias.com:60 ("60" corresponds to the integer of the realdomain.com that is in the same file)
restart qmail service
Logs are showing that qmail accepts the incoming email to #myalias.com and then routes it to #realdomain.com. The email then goes missing and is never actually delivered.
Any thoughts on where/how I could dig deeper to figure out what's happening to the email?
Thanks.
Just following up on this older question of mine. It is all working well now. I had the NOC check the server and they corrected it for me. Had something to do with remotehosts file.
Does the logfile of realdomain.com show that it is even accepting or seeing the incoming redirects?
Try redirecting the email to another domain. If they end up at the other domain, then the problem lies with the domain you're trying to really send it to.
If they don't appear there at all, then it goes back to how they're being redirected and you can focus on that part.