http://pierovggsterf4w5xplynqtl56srftc242l3g2xloqlty6nv7372xuyd.onion
Recently, I found myself in the same situation again, but I did not keep these scripts, so I had to write a new one. It did not take much, but since it might be helpful to someone (at least the future me), I decided to share it here. It takes the parameters to connect to the IMAP server on the command line.