2018-02-11 Update

This week there was not much Clojure. I have the call with the Purely Functional guy next Monday. He has a conference this Thursday and Friday. I am not attending. I think a few people from Austin Clojure are going.

I spent more time on the Groovy Mail Server. I just don’t know when to quit. I cannot send mail to Proton Mail. I think they are using Postfix. Every time I try to send an RCPT command, they return “550 5.5.1 Protocol error”. If I am reading the Postfix source code correctly, that can happen if you send an invalid command (RCPT is valid) or if you send a new line either by itself or without a carriage return. I do not think I am sending a command in the wrong form. For one thing, just about every other server I try accepts my mail.

I also had problems with Outlook.com. I was getting a socket exception. From what I gathered from googling, they were ending the socket after the QUIT command. I was not having this problem with Outlook.com mails before. I added a try/catch block, and now I save the emails.

I don’t know how much longer I will continue the Groovy Mail Server. Part of me wants to complete it. On the other hand, since Clojure and Lisp are the ultimate direction I want to go in, maybe I should put it aside. On the first hand, it is always good to keep up with a few extra languages. I would also like to get through Simply Scheme and then SICP, because that would make me a really smart person.

If I really wanted to finish my mail server, I would probably have to get another VPS account and set up something like mail-in-a-box for TLS. I might need a few attempts to get TLS right, and I don’t want everybody banning my emails while I figure it out. There also might be an issue with TLS. I don’t know a whole lot about setting up certificates or how to set up a certificate keystore in Java or how to use keytool. I have Let’s Encrypt certs, but those only last for a few months. I don’t know if you can re-import a cert into a Java app while the app is running. Sometimes it seems like there is not a lot of overlap between security and development.

You’re welcome.

2018-02-05 Update

I know it’s a day late, but here is the weekly update.

I worked some more on the Groovy Email Server, even though I said I would not. Sometimes I hit a wall on something, say I am going to stop, but it just bugs me that I left things in a bad state. Then at some point I get back to it.

I was getting a lot of null strings, which was causing exceptions, and (after some changes I had to revert) sometimes infinite loops. It turns out I was not checking to see if the arguments to EHLO were proper domains. Apparently there are some bots that send bad arguments to some commands to try to take them over. At first I thought I was doing something wrong, but now I know it’s not me. I can exchange messages with Apache James, Gmail, Yahoo and Outlook.com, so if you are sending null strings you are doing something wrong. (I think Yahoo used to use QMail, but now I think they have moved to something else.)

I also have to work on delivery status notifications (RFC 3461). I got rejected by a server that told me I was not implementing the protocol correctly. I guess that SMTP extensions can really change things.

Not much Clojure. I have a call in a couple of weeks with the Purely Functional guy. He offered to come up with a lesson plan for people. I have noticed a few job posts in the Clojure mailing list and Brave Clojure requiring people to have paid Lisp/Clojure experience. One huge complaint in the Lisp world is there are not enough Lisp jobs. I want to email these companies and ask them where I can get the Lisp job that will enable me to apply for the Lisp job they are offering.

You’re welcome.

2018-01-28 Update

This week I did not do much Clojure. I did work on my Groovy mail server. I am starting to use it for my own mail, replacing Apache James. I will work on TLS next.

Update 2018-01-29_02.00.43:
I may put aside the Groovy mail server project, perhaps permanently. I thought I was on a roll, but now I am having issues sending. I cannot figure out what is wrong. I did make a change to my firewall, but I changed back and restarted the server. Still not able to send.

You’re welcome.

 

2018-01-21 Update

There is not too much on the Clojure front. There was a meetup at Cafe Express. I went to that, and I looked at some of Clojure’s special forms. I might work with them a bit and add them to my API example pages.

I am also working on the Groovy mail server. There are a lot of things that should be case-insensitive that were not, so I am working on that. I also need to beef up the docs, especially on setting up clamav. Hopefully I can start using it for myself pretty soon.

You’re welcome.

2018-01-14 Update

My presentation at Austin Clojure went okay. I could not get my laptop to connect to the oh-so-with-it Apple TV. So I had to go over HugSQL by showing a project I had on github.

I also went to a meetup for the Austin JVM Meetup. The agenda was to suggest topics for the next year. There might be some talks on Groovy. I think it might wind up replacing the Austin JUG, which has been inconsistent. The Austin JUG usually meets at the Pickle Center. One difference between Chicago and Austin is that there is no economic or cultural center. There is a geographic center near the capital, but there are companies along MoPac, Capital of Texas Highway and 183. There is no area that is as important as the Loop is in Chicago. A lot of people who live in south Austin do not want to go further north than downtown, and people in Round Rock do not want to even go to downtown Austin.

I also started a bit of work on the Groovy mail server. I kept having an issue getting jars from the repositories. I kept getting this error:

java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

It turns out the “cacerts” file in my JDK was an empty file. I upgraded my JDK, and all was good.

I also did a few more functions in the Clojure API. That is taking longer than I thought.

You’re welcome.

2017-12-17 Update

This week I spent some time working on HugSQL again. I got it to work with conman. I tried with hikari-cp, but I was unable to get it to work.

I am still futzing around with HugSQL. I volunteered to give a presentation at Austin Clojure. I might not post too much about it, since I will be putting content into the presentation.

You’re welcome.

2017-11-19 Update

I am still looking at HugSQL. I started messing around with the quoting option in the connection macro. I noticed that I was not able to get any SQL injection samples to work through HugSQL. (It was a bit odd to try to intentionally do SQL injection after years of trying to prevent it.) I think the Postgres JDBC driver takes care of SQL injection.

To test this, I started looking at Migratus (and its leiningen plugin as well) to make a database in MySQL. I am more of a Postgres guy, so it took a while to get things right. Plus I think that Migratus has to do things a bit differently than regular SQL. I think that creating a table and creating a trigger for that table need to be two separate migrations.

I also had problems with foreign keys. With one foreign key, I got the table name wrong. I had to google the generic (and useless) error message. That led me to googling a few more steps. I had to log in as root, run the command

and look in that wall of text for a section labelled “LATEST FOREIGN KEY ERROR”.  The cause was buried in there. If MySQL is saving some text about the cause in this object, why can’t MySQL just print it out to the prompt instead of forcing me to go through all these other steps?

I might do a Migratus project with Postgres just to see if this small, irritating problem happens there too.

Another thing while working on all of this is I have used pg_dump a few times. I found a page online with examples that mostly work. Maybe I have Postgres configured differently, but I have found that for pg_dump, I have to add a few options to get it to work. The –help says that –password is unnecessary, that you should be prompted for it automatically. I have found that I need to add that, as well as –port and –host (even though I have been running it on localhost).

You’re welcome.