I use the syslog facility for logging purposes. I was wondering if there is a way to redirect all logs to mail.* For example, there are user.* messages.. can I change all of them to mail.* ?
thanks.
giannis.
On Fri, 19 Jan 2007 16:26:38 +0200 "Ioannis Zachariadis" izach@forthnet.gr wrote:
I use the syslog facility for logging purposes. I was wondering if there is a way to redirect all logs to mail.* For example, there are user.* messages.. can I change all of them to mail.* ?
thanks.
giannis.
Not an exact solution but syslog can be told to filter logs but the application they come from also (at least on FreeBSD).
!myappname *.* /var/log/myapp.log
You could use this to achieve what you wish, although there might be a better way I don't know about.
HTH, Dom
On Fri, 2007-01-19 at 16:26 +0200, Ioannis Zachariadis wrote:
I use the syslog facility for logging purposes. I was wondering if there is a way to redirect all logs to mail.* For example, there are user.* messages.. can I change all of them to mail.* ?
If there are user.* messages, I doubt they're coming from Dovecot. What such messages are you seeing?
Hi,
The user.* logs are from deliver, for example: Jan 6 15:27:52 hostname deliver(username): [ID 868608 user.info] auth input: gid=126 Timo, is there any way to redirect them to mail.* or replace user.info string to mail.info ?
thanks
giannis. ----- Original Message ----- From: Timo Sirainen To: Dovecot Mailing List Sent: Friday, January 19, 2007 6:24 PM Subject: Re: [Dovecot] Logging
On Fri, 2007-01-19 at 16:26 +0200, Ioannis Zachariadis wrote:
I use the syslog facility for logging purposes. I was wondering if there is a way to redirect all logs to mail.* For example, there are user.* messages.. can I change all of them to mail.* ?
If there are user.* messages, I doubt they're coming from Dovecot. What such messages are you seeing?
On Mon, 2007-01-22 at 09:40 +0200, Ioannis Zachariadis wrote:
Hi,
The user.* logs are from deliver, for example: Jan 6 15:27:52 hostname deliver(username): [ID 868608 user.info] auth input: gid=126 Timo, is there any way to redirect them to mail.* or replace user.info string to mail.info ?
Have you uncommented syslog_facility in dovecot.conf? If not, I don't see why it would log to user, since by default it logs to mail also.
If you've uncommented it .. well, looks like there's a bug that assumes that the setting is in numeric form rather than eg. "mail", which I think would then cause it to log to wherever.
Hi,
I've tested it with syslog_facility=mail uncommented and I had the results I wrote in the previous mail. I've also tested it with syslog_facility commented and log_path and info_log_path in the same logfile. The results were the same.
-- giannis. ----- Original Message ----- From: Timo Sirainen To: Dovecot Mailing List Sent: Monday, January 22, 2007 12:49 PM Subject: Re: [Dovecot] Logging
On Mon, 2007-01-22 at 09:40 +0200, Ioannis Zachariadis wrote:
Hi,
The user.* logs are from deliver, for example: Jan 6 15:27:52 hostname deliver(username): [ID 868608 user.info] auth input: gid=126 Timo, is there any way to redirect them to mail.* or replace user.info string to mail.info ?
Have you uncommented syslog_facility in dovecot.conf? If not, I don't see why it would log to user, since by default it logs to mail also.
If you've uncommented it .. well, looks like there's a bug that assumes that the setting is in numeric form rather than eg. "mail", which I think would then cause it to log to wherever.
On Mon, 2007-01-22 at 13:02 +0200, Ioannis Zachariadis wrote:
Hi,
I've tested it with syslog_facility=mail uncommented and I had the results I wrote in the previous mail. I've also tested it with syslog_facility commented and log_path and info_log_path in the same logfile. The results were the same.
You mean even if you set log_path and info_log_path to point to files, they're not used? Then it sounds like deliver isn't even reading that config file, or there's something else weird going on. Try with deliver -c /etc/dovecot.conf
Also you could try this patch: http://dovecot.org/list/dovecot-cvs/2007-January/007476.html
And then set "syslog_facility = mail" and see if it changes anything.
You don't have multiple syslog_facility settings in dovecot.conf, right?
Hi,
when I point the logs into a file, the file is being used, and all the logs are being written fine. However, when I use the syslog_facility (not multiple, and not the point to file method) I get messages in syslog that are labeled as mail.info or mail.error. All these work fine, but there are messages from deliver that are labeled user.info and user.error. I just want to redirect all messages from dovecot and deliver to be labeled as mail.* and not user.*
thanks,
giannis. ----- Original Message ----- From: Timo Sirainen To: Dovecot Mailing List Sent: Monday, January 22, 2007 1:34 PM Subject: Re: [Dovecot] Logging
On Mon, 2007-01-22 at 13:02 +0200, Ioannis Zachariadis wrote:
Hi,
I've tested it with syslog_facility=mail uncommented and I had the results I wrote in the previous mail. I've also tested it with syslog_facility commented and log_path and info_log_path in the same logfile. The results were the same.
You mean even if you set log_path and info_log_path to point to files, they're not used? Then it sounds like deliver isn't even reading that config file, or there's something else weird going on. Try with deliver -c /etc/dovecot.conf
Also you could try this patch: http://dovecot.org/list/dovecot-cvs/2007-January/007476.html
And then set "syslog_facility = mail" and see if it changes anything.
You don't have multiple syslog_facility settings in dovecot.conf, right?
On Mon, 2007-01-22 at 13:46 +0200, Ioannis Zachariadis wrote:
when I point the logs into a file, the file is being used, and all the logs are being written fine. However, when I use the syslog_facility (not multiple, and not the point to file method) I get messages in syslog that are labeled as mail.info or mail.error. All these work fine, but there are messages from deliver that are labeled user.info and user.error. I just want to redirect all messages from dovecot and deliver to be labeled as mail.* and not user.*
Well, I can't really say anything more than that deliver doesn't log anything to user.* by default. There must be something in your configuration which causes that.
Actually if deliver logs something to mail.*, but not everything, then I'm pretty sure that it's a syslog configuration issue.
I'll try to find out what's going on with syslog.. thanks for your help.
-- giannis. ----- Original Message ----- From: Timo Sirainen To: Dovecot Mailing List Sent: Monday, January 22, 2007 2:47 PM Subject: Re: [Dovecot] Logging
On Mon, 2007-01-22 at 13:46 +0200, Ioannis Zachariadis wrote:
when I point the logs into a file, the file is being used, and all the logs are being written fine. However, when I use the syslog_facility (not multiple, and not the point to file method) I get messages in syslog that are labeled as mail.info or mail.error. All these work fine, but there are messages from deliver that are labeled user.info and user.error. I just want to redirect all messages from dovecot and deliver to be labeled as mail.* and not user.*
Well, I can't really say anything more than that deliver doesn't log anything to user.* by default. There must be something in your configuration which causes that.
Actually if deliver logs something to mail.*, but not everything, then I'm pretty sure that it's a syslog configuration issue.
participants (3)
-
Dominic Marks
-
Ioannis Zachariadis
-
Timo Sirainen