

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
10 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Log courier-imap| From | Sent On | Attachments |
|---|---|---|
| Andre Coetzee | Jun 16, 2004 5:15 am | |
| Sam Varshavchik | Jun 16, 2004 4:37 pm | |
| Andre Coetzee | Jun 17, 2004 9:33 am | |
| Sam Varshavchik | Jun 17, 2004 5:05 pm | |
| Andre Coetzee | Jun 21, 2004 11:05 am | |
| Sam Varshavchik | Jun 21, 2004 3:24 pm | |
| Ana | Jun 22, 2004 5:03 am | |
| cour...@gmx.net | Jun 22, 2004 5:52 am | |
| Ana | Jun 22, 2004 6:14 am | |
| Andre Coetzee | Jun 22, 2004 10:14 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: [courier-users] Log courier-imap | Actions... |
|---|---|---|
| From: | Ana (ana...@udc.es) | |
| Date: | Jun 22, 2004 6:14:04 am | |
| List: | net.sourceforge.lists.courier-users | |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Thanks, but I've just recompiled my courier-imap with syslog capability and now It works ok.
- ----- Original Message ----- From: <cour...@gmx.net> To: <cour...@lists.sourceforge.net> Sent: Tuesday, June 22, 2004 2:52 PM Subject: Re: [courier-users] Log courier-imap
--On Dienstag, 22. Juni 2004 14:09 +0200 Ana <ana...@udc.es> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
hello! I've postfix+courier-imap 3.0 on a Solaris 9 machine. I'd like courier-imap log in another file different from syslog, but I'm not able. I've modified logger.c to this:
# ifdef LOG_MAIL { "mail", LOG_LOCAL3 }, # endif and in my syslog.conf
local3.* /var/log/courier.log
but it doesn't work. Any idea?
No, but you probably just got the wrong line...
The following patch allows to set the facility via the config-file for each courier-daemon individually:
# cat logger-facility-0.45.4.patch # set facility via LOG_FACILITY --- ../courier-0.45.4.orig/tcpd/logger.c Sun Aug 19 00:20:53 2001 +++ tcpd/logger.c Sat Apr 10 18:44:44 2004 @@ -14,7 +14,10 @@ #include "unistd.h" #endif #if HAVE_SYSLOG_H +#include <stdlib.h> +#define SYSLOG_NAMES #include <syslog.h> +#undef SYSLOG_NAMES #endif
static const char rcsid[]="$Id: logger.c,v 1.3 2001/08/16 01:38:43 mrsam Exp $"; @@ -22,11 +25,31 @@ int main(int argc, char **argv) { char buf[512]; -char *p; -int c; +char *p, *f_name; +int c, i; +int f_val=LOG_MAIL; // default
if (argc < 2) return (1);
+/* +** PATCH: adjust logging output via env LOG_FACILITY, may be set to: +** auth,authpriv,cron,daemon,ftp,kern,lpr,mail,news,sysslog,user,uucp +** local0,local1,local2,local3,local4,local5,local6,local7 +*/ +#if HAVE_SYSLOG_H + if( (f_name=getenv("LOG_FACILITY")) != NULL && *f_name ) + { + for (i=0; facilitynames[i].c_name; i++) + { + if (!strcmp(f_name, facilitynames[i].c_name)) + { + f_val = facilitynames[i].c_val; + break; + } + } + } +#endif + #if TESTMODE
#else @@ -38,7 +61,8 @@ | LOG_NOWAIT #endif
- , LOG_MAIL); + , f_val); + close(1); close(2); open("/dev/null", O_WRONLY);
------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________ courier-users mailing list cour...@lists.sourceforge.net Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
-----BEGIN PGP SIGNATURE----- Version: PGP 8.0.2
iQA/AwUBQNgx8Q8kP8jz9+HpEQLXTgCeJ+I8EVNgZTMC/nWkMikKg0sO2ygAoLAf eYCAh+0wuV/Zg3lsU5x/utUE =a+xJ -----END PGP SIGNATURE-----







