From: Jakob H. <jh...@pl...> - 2007-08-23 00:34:31
|
Hi, here's a patch to add STARTTLS to the ODMR protocol. (I was a little surprised yesterday when I noticed that it isn't already there...) Most of the code is copied from imap.c. I inserted it into the generic smtp code, so it could probably be used to deliver fetched mail via TLS (if somebody ever wanted to do that). I did run some tests, but not really thorough. Comments welcome. You may notice that the patch removes adding our hostname to the ctl->domainlist for ODMR. I think this was plain wrong and bothered me everytime I set up fetchmail with odmr. ODMR's default is a simple "ATRN" without any arguments, which means "fetch mail for all domains associated with the account", so we should stick with that. Additional notes: - The logging looks broken, with -v you get mixed ODMR and SMTP line prefixes, but that's not related to my patch. Fixing this would could probably easily be done by changing smtp_mode and using it as an index to an array { "SMTP", "LMTP", "ODMR", ... }. - What's with the formatting in odmr.c?? Mixed spaces and tabs, that's quite horrible... if you don't mind, I'll clean that up (to whatever the preferred format is). Regards, Jakob |