I’m having trouble with cl-smtp:send-email which seems to stem from a timeout error when calling usocket:socket-connect.
Here is what I am trying to do:
(cl-smtp:send-email "outgoing.mit.edu" "m_klein#mit.edu"
(list "m_klein#mit.edu") "s1" "m1”)
This seems to be the call where the failure occurs (according to the backtrace):
(usocket:socket-connect "outgoing.mit.edu" 25
:protocol :stream
:element-type '(unsigned-byte 8)
:timeout nil
:deadline nil
:nodelay nil
:local-host nil
:local-port nil)
Here is the error:
Error: Error #<USOCKET:TIMEOUT-ERROR #x302001E5FDED>
While executing: USOCKET::RAISE-ERROR-FROM-ID, in process Listener(475).
The odd thing is that the same function call has worked on other machines, but not on my current mac laptop or the cloud-based mac I’ve also been using.
I am running Clozure Common Lisp 1.11.1 on a MacBook Pro on OS 10.13.3
Here are snapshots of the backtrace FYI: https://imgur.com/a/e2xcf
Any ideas? Any help would be greatly appreciated.
Since you are using an external server, first you need to check, correctness of the address (connect using telnet), port and maybe you need an authentication.
Since you are using cl-smtp, first I recommend you to test how it works, for that the easy way of testing smptp is using mailcatcher inside a docker container:
docker run -d -p 1080:1080 -p 1025:1025 --name mailcatcher schickling/mailcatcher
docker ps | grep mailcatcher
6fb056fceb6b schickling/mailcatcher "mailcatcher -f --ip…" 9 months ago Up 18 minutes 0.0.0.0:1025->1025/tcp, 0.0.0.0:1080->1080/tcp mailcatcher
Then you can access to the ourtgoing mail in a web browser localhost:1080, and send mail to localhost:1025
For testing the SMTP, server I recommend to use telnet:
telnet
telnet> o localhost 1025
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 EventMachine SMTP Server
EHLO localhost
250-Ok EventMachine SMTP Server
250-NO-SOLICITING
250 SIZE 20000000
there is a great article on that here
When you are sure that, you get the requirements try with lisp:
CL-USER> (cl-smtp:send-email "127.0.0.1" "antonio.querol#example.com" "pedro.lopez#example.com" "Say Hello" "Hello World"
:port 1025)
("Ok")
Related
I have a Centos server with exim installed. I am trying to send en email from the command line like this:
exim -v account#gmail.com
From: email#mydomain.com
To: account#gmail.com
Subject: test email
this is a test
^D
I have also tried:
echo 'test message' | mail -s Test1 account#gmail.com
as well as sending from a PHP script.
The result is the email times out. The logs indicate exim is timing out:
H=alt2.gmail-smtp-in.l.google.com [173.194.219.26] Connection timed out
I believe iptables are correct. I have scanned the server from an external IP and ports 25, 265 and 587 are open. (Not sure 587 needs to be since this will be a send-only situation most likely.)
I have also telnet'd to port 25 successfully. (Most of the successful resolutions I have found involved port 25 being blocked. I don't think that is the case here. I have also called my provider and checked. They claim port 25 connections are not blocked.)
I would appreciate some ideas.
Thank you.
On Fedora 21, I had a simple script for sending emails
mail -a /tmp/attachment.txt -s "..." someone#somewhere.com
On Fedora 23, this no longer works.
No configuration file found at /home/mike/.esmtprc or /etc/esmtprc
I created the file and assigned correct permissions to it.
hostname = localhost.localdomain:25
(That's what Fedora 21 would send emails from: mike#localhost.localdomain.)
Well, now I'm getting
SMTP server problem Connection refused
Question: how do I get the mail command to work on Fedora 23?
Okay, seems like Fedora 21 must have had an email server running by default, but Fedora 23 does not.
In my
~/.esmtprc
I had to add
hostname = [SMTP SERVER THAT WORKS]:25
mda "/usr/bin/procmail -d %T"
And that worked. Thanks everyone anyway!
I am trying to configure gnus to work with my gmail account. My .gnus file looks like this:
(setq gnus-select-method '(nntp "news.gwene.org"))
(setq user-full-name "George P. Burdell")
(setq user-mail-address "probablyReal#gmail.com")
(setq smtpmail-auth-credentials "~/.authinfo.epg")
(add-to-list 'gnus-secondary-select-methods
'(nnimap "gmail"
(nnimap-address "imap.gmail.com")
(nnimap-server-port 993)
(nnimap-stream ssl)
(nnimap-authinfo-file "~/.authinfo.epg")
)
)
(setq smtpmail-stream-type 'ssl
smtpmail-smtp-server "smtp.gmail.com"
smtpmail-smtp-service 465)
and my .authinfo.epg file looks like this:
machine imap.gmail.com login probablyReal#gmail.com password secret port 993
machine smtp.gmail.com login probablyReal#gmail.com password secret port 465
and the error that it throws is:
Generating the cache active file...done
Opening nnfolder server on archive...done
Opening nnimap server on gmail...
Opening connection to imap.gmail.com via tls...
Opening TLS connection to `imap.gmail.com'...
Opening TLS connection with `gnutls-cli --insecure -p 993 imap.gmail.com'...failed
Opening TLS connection with `gnutls-cli --insecure -p 993 imap.gmail.com --protocols ssl3'...failed
Opening TLS connection with `openssl s_client -connect imap.gmail.com:993 -no_ssl2 -ign_eof'...failed
Opening TLS connection to `imap.gmail.com'...failed
Unable to open server nnimap+gmail due to: Buffer *nnimap imap.gmail.com 993 *nntpd** has no process
Opening nnimap server on gmail...failed:
No new newsgroups
Checking new news...
Reading active file from gmail via nnimap...
Opening nnimap server on gmail...
Server nnimap+gmail previously determined to be down; not retrying
Opening nnimap server on gmail...failed:
Reading active file via nndraft...done
Checking new news...done
Warning: Opening nnimap server on gmail...failed: ; Server nnimap+gmail previously determined to be down; not retrying; Opening nnimap server on gmail...failed: ; Unable to open server nnimap+gmail due to: Buffer *nnimap imap.gmail.com 993 *nntpd** has no process
(sorry for wall of text)
finally, when I evaluate this:
(gnutls-available-p)
it simply prints:
nil
I'm running emacs for windows 8, I'm not using cygwin, and I really can't figure out what the problem is, even after seraching for hours.
edit: I've tried both of these (as well as combinations from both) and get the same errors:
http://blog.binchen.org/posts/notes-on-using-gnus.html
http://www.emacswiki.org/emacs/GnusGmail
My guess would be that Emacs on Windows doesn't come with the required libraries, hence (gnutls-available-p) returns nil for you. You'll have to install gnutls somewhere so that your Emacs will be able to find it, cf. the GnuTLS homepage. You probably have to put the downloaded Windows library into the directory where Emacs is looking for it's libraries.
When I run the following command, I can get successfull result.
root#ubuntu:/home/can# radtest user password 127.0.0.1 1812 testing123
Sending Access-Request of id 78 to 127.0.0.1 port 1812
User-Name = "user"
User-Password = "password"
NAS-IP-Address = 127.0.1.1
NAS-Port = 1812
Message-Authenticator = 0x00000000000000000000000000000000
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=78, length=20
However When I run the "freeradius -X" , I get error message as following :
.....
Failed binding to authentication address * port 1812: Address already in use
/etc/freeradius/radiusd.conf[250]: Error binding to port for 0.0.0.0 port 1812
Please Help Me
Thank you for your efforts.
Can
radiusd is already running. sudo service freeradius stop will stop it, and allow freeradius -X to bind to the address/port that was previously used by the RADIUS daemon.
Run 'service freeradius restart' and 'service freeradius stop' commands
Then run the command,'freeradius -X'
you will not face binding issue anymore.
Even having finished the service, there were pending zombie process.
Searching for a zumbi process I´ve found one:
[root#localhost sites-enabled]# ps aux | grep radi
radiusd 25042 0.0 0.7 186360 14980 ? Ssl Fev17 0:00 /usr/sbin/radiusd -d /etc/raddb
[root#localhost sites-enabled]# kill -9 25042
Service was start sucessfully after this.
Basically the port freeradius is looking to use is already in use by another background running instance of freeradius. Ending the first instance of freeradius will allow you to use that same port for the newly run instance.
I develop our application and can succeed to get hotsname through func: ServiceFound(DNSSDService sref, DNSSDFlags flags, uint ifIndex, String serviceName, String regType, String domain)
I checked the wireshark and Log, the serviceName is right.
My question:
Why I can not ping it through "serviceName.domain", e.g: ping serviceName.local. (I want to use ping to test the network available beofre run my application. now it is blocked the failed ping)
But I can ping it through the real IP, e.g: ping 1.2.3.4 (This means that the network is ok)
ServiceFound and ServiceResolved only provide serviceName.
So how to solve this problem:
1) one simple way to get IP
or 2) how to solve the problem of "ping serviceName.local"
Thanks a lot for your support in advance!
************************Update*******
I retest it on other PC:
I use dns-sd.exe to debug the network
Using following command can get servicename
$ dns-sd.exe -B _http._tcp
Browsing for _http._tcp
Timestamp A/R Flags if Domain Service Type Instance Name
4:33:52.663 Add 3 3 local. _http._tcp. test
Using following command can get zone file
$ dns-sd.exe -Z _http._tcp
Browsing for _http._tcp
_http._tcp PTR Officejet\032Pro\032L7500\032[FEDCE8]._http._tcp
Officejet\032Pro\032L7500\032[FEDCE8]._http._tcp SRV 0 0 80 HPFEDCE8.local. ; Replace with unicast FQDN of target host
Officejet\032Pro\032L7500\032[FEDCE8]._http._tcp TXT ""
using following command can get IP (based on HPFEDCE8.local. in above feedback)
$ dns-sd.exe -G v4 HPFEDCE8.local.
Timestamp A/R Flags if Hostname Address TTL
4:43:38.965 Add 2 3 bej1301Dell2360.local. 10.61.20.99 240
So I can ping it through HPFEDCE8.local.
But in my Test PC: "$ dns-sd.exe -B _http._tcp" is ok, but others commands are failed.
So I think this is the root cause.
So my question is:
as I know, we can use "instance Name" to generate the hostname: test.local.
why they are different from "HPFEDCE8.local." in the zone file
why "ping HPFEDCE8.local." ok and "ping test.local." failed
Do you have any others ideas for my Test PC?
Thanks a lot!!