Coldfusion 7 - mail sending bad 'helo' - email

I've got my own box sitting in a rack. It's Win2000 running CF 7 and using the rack company's smtp server. I can't send emails. When I try, they simply go to the undeliverable email folder. Support says my server is sending a non-verifiable helo message. So their smtp server wont send it.
It being CF 7, the admin has nowhere to specify U/P for auth. However I SHOULD be able to do that within the tag. When I do, I get no errors but the mail goes to the undeliverable folder.
CODE:
<cftry>
<cfmail to="jxxx#yahoo.com"
from="jxxx#xxx.com"
subject="xxx.com Sign-up"
server="smtp.xxx.net"
port="25"
username="valid-account#xxx.net"
password="password" >
This is a test - with server specified
</cfmail>
Success w/ server user defined
<cfcatch type="any">
<strong>ERROR: #cfcatch.Message#</strong><BR />
#cfcatch.Detail#
</cfcatch>
</cftry>
<cftry>
<cfmail to="jxxx#yahoo.com"
from="xxx#xxx.net"
subject="xxx.com Sign-up" >
This is a test - without server specified
</cfmail>
Success w/o server user defined
<cfcatch type="any">
<strong>ERROR: #cfcatch.Message#</strong><BR />
#cfcatch.Detail#
</cfcatch>
</cftry>
I don't know much about mail servers...
Any ideas?

This could be an issue with DNS and the inability of the receiving system to either do a reverse DNS lookup or maybe it isn't in DNS at all.
another possibility is that non-verifable Helo means that you don't have FQDN associated with the system (perhaps your system name does not have a domain associated with it?) (ie. helo me) probably going to be bounced versus "helo me.somewhere.com".
so - don't think this a CF issue from a coding perspective - something that is related to your system setting (FQDN perhaps) or DNS in your location. Most anti-spam / anti-open relay settings are going to look at DNS for some level of validation.

Related

Outlook Autodiscover SMTP authentication

The problem
I am trying to create an autodiscover script for the users of my website. Currently I am creating a working connection to my mail-server, however my mail server requires SMTP authentication. I am currently sending:
<AuthRequired>on</AuthRequired>
in the full XML file to enable SMTP authentication. This enables the checkmark in the details next to "My outgoing server (SMTP) requires authentication". The bullet list with the two options "use same settings as my incoming mail server" (prefered) or "Log on using" has no option selected.
What I've tried
I have tried adding the POP3 information and putting the following attribute in my SMTP part:
<UsePOPAuth>on</UsePOPAuth>
However that did not work. To create the XML file I have used the following URL: https://technet.microsoft.com/en-us/library/cc511507.aspx
My current XML document
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
<Account>
<AccountType>email</AccountType>
<Action>settings</Action>
<Protocol>
<Type>IMAP</Type>
<Server>mail.test.nl</Server>
<Port>143</Port>
<DomainRequired>on</DomainRequired>
<LoginName>me#test.nl</LoginName>
<SPA>off</SPA>
<SSL>off</SSL>
<AuthRequired>on</AuthRequired>
</Protocol>
<Protocol>
<Type>SMTP</Type>
<Server>mail.test.nl</Server>
<Port>587</Port>
<DomainRequired>on</DomainRequired>
<LoginName>me#test.nl</LoginName>
<SPA>off</SPA>
<SSL>off</SSL>
<AuthRequired>on</AuthRequired>
<SMTPLast>on</SMTPLast>
</Protocol>
</Account>
</Response>
</Autodiscover>
I found a very useful article on TechNet which basically explains why this is happening. From what i understood, specifying the SMTPLast property makes Outlook attempt to login to POP/IMAP before SMTP, without actually authenticating SMTP (some servers such as my school's only work this way).
I reproduced the same problem you had with that config but once i removed it, it worked like a charm.
I noticed there isn't a lot of useful documentation about Autodiscover, aka POX autodiscover so here's the xml template that worked for me:
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
<User>
<DisplayName>First Last</DisplayName>
</User>
<Account>
<AccountType>email</AccountType>
<Action>settings</Action>
<Protocol>
<Type>IMAP</Type>
<Server>mail.example.com</Server>
<Port>993</Port>
<AuthRequired>on</AuthRequired>
<LoginName>email#example.com</LoginName>
<SPA>off</SPA>
<SSL>on</SSL>
</Protocol>
<Protocol>
<Type>SMTP</Type>
<Server>mail.example.com</Server>
<Port>587</Port>
<AuthRequired>on</AuthRequired>
<LoginName>email#example.com</LoginName>
<SPA>off</SPA>
<Encryption>TLS</Encryption>
<UsePOPAuth>on</UsePOPAuth>
</Protocol>
</Account>
</Response>
</Autodiscover>

Postfix transport: deliver different domains via different relayhosts

Postfix version 2.11.0
What I'm trying to accomplish is to have mail destined for a particular domain to be relayed through SendGrid but all other outgoing mail to be sent from my local server directly. I have this configuration in /etc/postfix/transport:
example.com smtp:[smtp.sendgrid.net]:587
.example.com smtp:[smtp.sendgrid.net]:587
* :
My understanding from all the searches I've done and reading the Postfix docs is that this should work but if I send to any other domain, for example gmail.com it's still getting relayed through SendGrid.
An example from /var/log/mail.log:
Oct 26 16:15:46 myhost postfix/smtp[25783]: A75F0C04F9: to=<PRIVACY_MASKED#gmail.com>, relay=smtp.sendgrid.net[108.168.190.108]:587, delay=11, delays=11/0.02/0.22/0.03, dsn=2.0.0, status=sent (250 Ok: queued as iTwf5zmCQQSgz_I6sVpSSA)
Is there some other configuration I'm missing?
Ok, now I see the error of my ways. In sasl_passwd I had this:
smtp.sendgrid.net USERNAME:PASSWD
But in transport I had this:
example.com smtp:[smtp.sendgrid.com]:587
The difference is .net versus .com.
Changed it to .net and works!

coldfusion imap An exception occurred when setting up mail server parameters

I am trying to access my Microsoft Exchange server with Coldfusion cfimap so I can move mail out of the junk mail folder. I am using CF10. I want to just test getting the folder list.
<cfscript>
variables.popAttributes = {
server = ...,
port = 995,
username = ...,
password = ...
};
</cfscript>
<cfimap action="open"
connection="variables.folders"
secure="yes"
server="#variables.popAttributes.server#"
port="#variables.popAttributes.port#"
username="#variables.popAttributes.username#"
password="#variables.popAttributes.password#" />
<cfimap action="listallfolders"
connection="variables.folders"
name="variables.folderQry" />
<cfdump var="#variables.folderQry#" />
<cfimap action="close"
connection="variables.folders" />
When I try to run the above code, I get an exception from the "open" tag.
An exception occurred when setting up mail server parameters.
This exception was caused by: javax.mail.MessagingException: +OK The Microsoft Exchange POP3 service is ready.; nested exception is: com.sun.mail.iap.ConnectionException: +OK The Microsoft Exchange POP3 service is ready..
I'd think that the message saying OK the service is ready should mean that it would move on to the next cfimap tag.
You are attempting IMAP operations on a POP3 connection. POP3 has no concept of folders.
Try port 993.

Mercury: sending email from localhost

I configured my Mercury (on local PC with Windows 7 professional) step-by-step following http://www.open-emr.org/wiki/index.php/Mercury_Mail_Configuration_in_Windows, using smtp.gmail.com as external server. I then sent a test email to my gmail from Mercury, and the Mercury core process window showed "Mon 01, 10:50:08: Job MG000001: from postmaster#localhost (local) .... to xxxx#gmail.com (non-local)-OK". But the Mercury SMTP client (relay version) window showed "Faild. Error FF servicing queue job." I saw this error message being repeated (Mercury tried to re-send the email).
I tried to gether more error information but the Mercury logs (XAMPP Control penal) was empty.
Can someone please help? Thanks.
I had the same problem as yours and I came out with this solution.
Follow the answer in this link:
No mail received in inbox with XAMPP 1.8.0, MercuryMail and mail()
And then go to
Mercury under MercuryS -> Connection Control -> Uncheck "Do not Permit SMTP relaying to non-local mail"
Hope it helps :)

Mew gives SMTP error when trying to send through GMail

I'm trying to send an email using the GMail SMTP server.
I have the following setup for mew in emacs:
(default
(mailbox-type 'imap)
(proto "%")
(imap-user my-email)
(imap-server "imap.gmail.com")
(imap-ssl t)
(smtp-server "smtp.gmail.com")
(smtp-auth-list ("PLAIN" "LOGIN" "CRAM-MD5"))
(smtp-user my-email)
(user my-username)
(mail-domain "gmail.com")
(name my-name)
(imap-friend-folder "%from")
(imap-trash-folder "%[Gmail]/All Mail"))
I'm not sure what I'm doing wrong.
The error message is this: 530 5.7.0 Must issue a STARTTLS command first. dr7sm13115113qab.26. This mail has been queued to +queue
What mew configuration settings do I have to change to make this problem go away?
Looks like I forgot to set the variable smtp-ssl to t so that the SMTP connection uses SSL (which GMail requires).