Problem in sending email with exim in cpanel to extern address - exim

I noticed today that mails do not come through. Since several hours ago, all mails just get stuck in queue. I have tried to deliver them manually, by selecting one mail in WHM Mail Queue Manager and clicking on "Deliver Selected", but after few minutes I just get this error:
Code:
LOG: MAIN
cwd=/usr/local/cpanel/whostmgr/docroot 4 args: /usr/sbin/exim -v -M 1Tli6y-0002Xo-KW
delivering 1Tli6y-0002Xo-KW
Connecting to foobar.TLD [IP.ADDRESS]:25 ... failed: Connection timed out (timeout=5m)
LOG: MAIN
foobar.TLD [IP.ADDRESS] Connection timed out
LOG: MAIN
== info#foobar.TLD R=dkim_lookuphost T=dkim_remote_smtp defer (110): Connection timed out
I have searched on net, and I have found thread on this forum, similar error - http://forums.cpanel.net/f43/t-remote_smtp-defer-53-retry-time-not-reached-any-host-72383.html
and there is proposed solution, but I am not sure should it work in my case. I can not risk loosing emails in queue, my clients would hang me :)

I can see your server is unable to connect remote server to send your mail. Because you are getting "25 ... failed: Connection timed out" error in logs. I think your mail server IP is blacklisted in anti-spam databases and maybe due to that you are getting this issues.

run command
exim -bt info#foobar.tld
Copy ip address and add your CSF white list.
Or turn of Firewall and retest.

Related

Mautic & Amazon SES Integration issues

I installed Mautic in-house instance. I tried to integrate it with Amazon SES service. After all was set as needed (please find the attached screenshot below), I clicked "Test connection" button and got the following error:
Connection could not be established with host
email-smtp.eu-west-1.amazonaws.com [An attempt was made to access a
socket in a way forbidden by its access permissions. #10013] Log data:
++ Starting Mautic\EmailBundle\Swiftmailer\Transport\AmazonTransport !! Connection could not be established with host
email-smtp.eu-west-1.amazonaws.com [An attempt was made to access a
socket in a way forbidden by its access permissions. #10013] (code: 0)
++ Starting Mautic\EmailBundle\Swiftmailer\Transport\AmazonTransport
Can someone give a hand on this? What am I doing wrong?
Screenshot Mautic_Amazon-SES_Integration Settings
I had the same problem and fixed it by leaving the field "Port" empty (Mautic --> email settings --> Port). Apparently my server wasn't able to use port 25, and leaving this field empty made Mautic find the best port.

Emails are added in queue but its not been send in otrs

I am using AWS SES to send emails from OTRS and emails are not working. Below is the error:
Mar 18 06:22:47 ip-10-210-28-141 OTRS-otrs.Console.pl-Maint::Email::MailQueue-09[30010]: [Error][Kernel::System::CommunicationLog::_LogError][Line:538]: CommunicationLog(ID:795,AccountType:-,AccountID:-,Direction:Outgoing,Transport:Email,ObjectLogType:Message,ObjectLogID:2233)::Kernel::System::MailQueue => Message could not be sent! Error message: Can't connect to email-smtp.us-east-1.amazonaws.com: !
I am able to telnet to email-smtp.us-east-1.amazonaws.com
I am able to send emails using SES from the same server via command line but OTRS is not sending email.
It's hard to debug OTRS. In your case OTRS was not possible to create an mail object. The cause can have several issue.
Maybe you are using the wrong SMTP backend module, there are 3 different options, SMTP/SMTPS and SMTPTLS (see also https://github.com/OTRS/otrs/tree/master/Kernel/System/Email)
To get more verbose feedback from the CPAN SMTP module, set $Self->{Debug} = 3; at this place https://github.com/OTRS/otrs/blob/master/Kernel/System/Email/SMTP.pm#L32 and check STDOUT what the problem is.

Mail failure - rejected by local scanning code

i was sending mail from my server ip is completely new and tested . thhe mail i am sending is html mail but not a single mail is getting delivered in my webmail i am getting this error
A message that you sent was rejected by the local scanning code that
checks incoming messages on this system. The following error was given:
This message was classified as SPAM and may not be delivered
------ This is a copy of your message, including all the headers. ------
i tried disabling spamassisn but no luck .
i searched everywhere did several changes in whm tweak settings but all mails are going in not even spam all are being rejected by server

Rails3: ECONNREFUSED Error in Mailer

I have a controller in a Rails 3 app that, after creating a new object of type WorkRequest, sends an e-mail to the requester. Works for all of my users except one. When she tries it I get the following in the server log.
Started POST "/work_requests" for 172.16.42.150 at Mon Aug 08 14:42:53 -0400 2011
Processing by WorkRequestsController#create as HTML
Parameters: {"commit"=>" Save ", "authenticity_token"=>"GhhZ6S0mBaju2zs5Fc7M+u5SoLCke5CRSdVCvLzMK1Q=", "utf8"=>"✓", "work_request"=>{"work_due_date"=>"2011-12-01", "person_id"=>"525", "status"=>"Pending", "last_request_date"=>"", "requester_id"=>"5", "pier_module_id"=>"223"}}
Rendered person_mailer/work_request_init_email.html.erb (2.4ms)
Rendered person_mailer/work_request_init_email.text.erb (1.8ms)
Sent mail to hkitzmiller#acponline.org (409ms)
Completed in 548ms
Errno::ECONNREFUSED (Connection refused - connect(2)):
app/controllers/work_requests_controller.rb:57:in `create'
app/controllers/work_requests_controller.rb:54:in `create'
It appears to have sent the e-mail (she's left for the day so I can't ask if she received it) but the line it's failing on in the controller the line that invokes the mailer, so I'm not sure.
PersonMailer.work_request_init_email(#work_request).deliver
Can't seem to find any solid info on what ECONNREFUSED means. Is the mail server refusing the connect (in which case why does it appear the mail was sent?) or is the web server refusing to connect after the mail is sent.
What might cause either server to refuse a connection with this particular user?
Any help would be much appreciated. All the other users of the app seem to be working fine.
This generally is an error caused by a failed connection to the SMTP server. I'd say double check your settings in your environment files (production.rb most likely) and double check the email address. You might also check to see if there's a limit set by the SMTP server.

MailMessage & MAIL/EXPN/VRFY/ETRN

I was told that my program was not issuing a MAIL/EXPN/VRFY/ETRN when sending an email by the web hosting company we are connecting to.
Anyone know what this means and how I do it?
I am sending an email with SmtpClient and I have no problems with other clients.
Here is what I was told:
Thanks for the additional info, here
is what I found...
Aug 4 11:16:48 smtp1 sendmail[2729]:
o74GGU5F002729:
xx-xx-xx-xx.static.xxx.mo.charter.com
[xx.xx.xx.xx] did not issue
MAIL/EXPN/VRFY/ETRN during connection
to TLSMTA
Notice the time and the IP address
which is your static from Charter. Now
here is a good connection.
Aug 4 11:18:22 smtp1 sendmail[2745]:
STARTTLS=server,
relay=xx.xx.xx.xx.static.xxx.mo.charter.com [xx.xx.xx.xx], version=TLSv1/SSLv3,
verify=NO, cipher=RC4-MD5,
bits=128/128 Aug 4 11:18:23 smtp1
sendmail[2745]: AUTH=server,
relay=xx.xx.xx.xx.static.stls.mo.charter.com
[xx.xx.xx.xx], authid=ronmid,
mech=LOGIN, bits=0
Since their email program did not
issue MAIL/EXPN/VRFY/ETRN during
connection, my server would not
continue the transaction.
Any suggestions?
Thanks!
You app didn't issue any of those 4 commands after connecting. This could be because the server didn't respond correctly and so your app was waiting for that response until it timed out. You can check this by trying to send an email with a simple telnet connection as described here. After you connect and send the EHLO or HELO command (depending on what the server wants) you should get a 250 response.
If you do get the 250 response with telnet but your app still doesn't work, then maybe it's something in your application that tries to send an incorrect command. Maybe you've setup your application to use SSL or credentials, and the SMTP server don't support that or something similar?