Sam Varshavchik <[EMAIL PROTECTED]> writes:
> Julian Mehnle writes:
>
>> Hi Sam,
>> Julian Mehnle wrote:
>>>
>>> [ ... ]
>>>
>>> Ok, this is useful indeed, but what if an admin hasn't installed imapd?
>>> Wouldn't it be a good idea to add such a "--version" switch to
>>> 'courier' or 'courierd' as well?
>> Sam, do you have any plans to make a Courier version query possible
>> without depending on Courier's IMAP component to be installed?
>
> This is not a priority right now. As the saying goes -- if you want
> things done sometimes you have to do them yourself.
At the bottom of this message is a patch for courier-0.45.4.20040411.
I'm sure that it will work in the newer release(s). It took 8 minutes
to write, test, and produce the patch, including my learning curve on
where to find the 'main' method and the version info for this
executable. Now, the following will work:
% ./courier --version
0.45
*** courier/courier.c.orig Tue Apr 20 09:51:31 2004
--- courier/courier.c Tue Apr 20 09:51:49 2004
***************
*** 31,36 ****
--- 31,42 ----
int main(int argc, char **argv)
{
+ if (argc > 1 && strcmp(argv[1], "--version") == 0)
+ {
+ printf("%s\n", VERSION);
+ exit(0);
+ }
+
if (chdir(courierdir()))
{
perror("chdir");
--
Lloyd Zusman
[EMAIL PROTECTED]
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users