[gentoo-user] [postfix - bug?] error in master.cf - problem with restart
Hello I noticed that when someone makes an error in master.cf (for example write anything at the beginning of the file) and then restart postfix there is a problem: postfix is stopped (that's ok), then it should be started but it isn't (in log something like postfix/master[1649]: fatal: /etc/postfix/master.cf: line 4: bad transport type: ==) and there is no error shown on console ( echo $? - shows 0 ) and then when we try to restart (or start) postfix again - we can't - unless we delete /var/lib/init.d/started/postfix file (it's not deleted while restarting) is it a bug or we're doing sth wrong?! equery list | grep postfix mail-mta/postfix-2.5.5 uname -r 2.6.27-gentoo-r8 regards nichu
Re: [gentoo-user] [postfix - bug?] error in master.cf - problem with restart
2009/6/22 Eray Aslan eray.as...@caf.com.tr On 22.06.2009 13:02, Marcin Niskiewicz wrote: I noticed that when someone makes an error in master.cf http://master.cf (for example write anything at the beginning of the file) and then restart postfix there is a problem: postfix is stopped (that's ok), then it should be started but it isn't (in log something like postfix/master[1649]: fatal: /etc/postfix/master.cf http://master.cf: line 4: bad transport type: ==) and there is no error shown on console ( echo $? - shows 0 ) and then when we try to restart (or start) postfix again - we can't - unless we delete /var/lib/init.d/started/postfix file (it's not deleted while restarting) is it a bug or we're doing sth wrong?! Postfix init script just calls postfix(1) which calls postfix-script which calls master(8). Exit codes do not get back to the terminal. Use postfix status to check whether the mail system is running. -- Eray Thanks for the answer. But as I said it doesn't start (there's no process, command postfix status shows postfix/postfix-script: the Postfix mail system is not running but still /etc/init.d/postfix status show it's started)... S it is stopped but the status of the service is wrongly updated (file /var/lib/init.d/started/postfix exists) regards nichu
Re: [gentoo-user] syslog-ng +bash history
2009/2/5 Willie Wong ww...@princeton.edu On Thu, Feb 05, 2009 at 09:31:07AM +0100, Penguin Lover Marcin Niskiewicz squawked: It works fine (it writes history to history.log) but still it writes it to those 3 files (debug , syslog, messages) as well ... so now everything I type is written to 4 files (debug , syslog, messages and history.log) and I'd like it to be written only to 1 file. If you have a filter rule that matches for history, why don't you just append and not [insert rule here] to the filter rule for syslog, messages, and debug? W -- This is just for cultural purposes, so don't panic. ~DeathMech, S. Sondhi. P-town PHY 205 Sortir en Pantoufles: up 790 days, 13:07 Hello thanks for helping me as it seems the solution was easy - i had to put flags(final); parameter and change a little order in config file and put: log { source(src); filter(f_history); destination(history); flags(final); }; in the highest line in log section and it works! (the solution from syslog-ng group) thanks again regards nichu
Re: [gentoo-user] syslog-ng +bash history
2009/2/4 Yannick Mortier mvmort...@googlemail.com 2009/2/4 Marcin Niskiewicz mniskiew...@gmail.com: Hello Marcin! I imply that you already have done some modifications to your syslog-ng.conf as logging everything the user type on the console is not in the standard file that comes with gentoo. Basically syslog-ng has got sources and destinations. So you have to take a look at your syslog-ng.conf and find out the name of the sources and the name of the destination of the history.log file. Then you can simply add the following line (replace the variables accordingly) log { source([source that was previously used for debug]); source([source that was previously used for syslog]); source([source that was previously used for messages]); destination([destination of history.log]) }; If all the sources give you the same messages or they are one and the same source just insert only this one. If your history.log file was not defined by now you can simply add it as a destination with destination [name] { file([path-to-history.log]/history.log);} Also if there are other log lines that contain the sources and the destinations that you mentioned you have to remove them completely if they only contain this one source or just remove the source that delivers the history. Then syslog-ng should only log into history.log Greetings -- Currently developing a browsergame... http://www.p-game.de Trade - Expand - Fight Follow me at twitter! http://twitter.com/moortier As I can see I wrote my post unclearly ;) I meant that in standard configuration (without any changes) everything typed in console is written to those 3 files (debug , syslog, messages) And I would like syslog not to log history in those 3 files. So I made filter to route it to history.log It works fine (it writes history to history.log) but still it writes it to those 3 files (debug , syslog, messages) as well ... so now everything I type is written to 4 files (debug , syslog, messages and history.log) and I'd like it to be written only to 1 file. I hope it's clear now ;) regards My STANDARD configuration (with my modifiication to route history to history.log) looks like this: # Copyright 2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/syslog-ng.conf.gentoo.hardened,v 1.5 2007/10/30 17:16:15 solar Exp $ # # Syslog-ng configuration file, compatible with default hardened installations. # options { chain_hostnames(off); sync(0); stats(43200); }; source src { unix-stream(/dev/log); internal(); }; source kernsrc { file(/proc/kmsg); }; destination authlog { file(/var/log/auth.log); }; destination syslog { file(/var/log/syslog); }; destination cron { file(/var/log/cron.log); }; destination daemon { file(/var/log/daemon.log); }; destination kern { file(/var/log/kern.log); file(/dev/tty12); }; destination lpr { file(/var/log/lpr.log); }; destination user { file(/var/log/user.log); }; destination uucp { file(/var/log/uucp.log); }; destination mail { file(/var/log/mail/mail.log); }; destination avc { file(/var/log/avc.log); }; destination audit { file(/var/log/audit.log); }; destination pax { file(/var/log/pax.log); }; destination grsec { file(/var/log/grsec.log); }; destination historia { file(/var/log/history.log); }; destination mailinfo { file(/var/log/mail/mail.info); }; destination mailwarn { file(/var/log/mail/mail.warn); }; destination mailerr { file(/var/log/mail/mail.err); }; destination newscrit { file(/var/log/news/news.crit); }; destination newserr { file(/var/log/news/news.err); }; destination newsnotice { file(/var/log/news/news.notice); }; destination debug { file(/var/log/debug); }; destination messages { file(/var/log/messages); }; destination console { usertty(root); }; destination console_all { file(/dev/tty12); }; destination xconsole { pipe(/dev/xconsole); }; filter f_auth { facility(auth); }; filter f_authpriv { facility(auth, authpriv); }; filter f_syslog { not facility(authpriv, mail); }; filter f_cron { facility(cron); }; filter f_daemon { facility(daemon); }; filter f_kern { facility(kern); }; filter f_lpr { facility(lpr); }; filter f_mail { facility(mail); }; filter f_user { facility(user); }; filter f_uucp { facility(uucp); }; filter f_debug { not facility(auth, authpriv, news, mail); }; filter f_messages { level(info..warn) and not facility(auth, authpriv, mail, news); }; filter f_emergency { level(emerg); }; filter f_info { level(info); }; filter f_notice { level(notice); }; filter f_warn { level(warn); }; filter f_crit { level(crit); }; filter f_err { level(err); }; filter f_avc { match(.*avc: .*); }; filter f_audit { match(^audit.*) and not match(.*avc: .*); }; filter f_pax { match(^PAX:.*); }; filter f_grsec { match(^grsec:.*); }; filter f_history { match(.*HISTORY*); }; log { source(src); filter(f_authpriv); destination(authlog); }; log { source
[gentoo-user] syslog-ng +bash history
Hello Everything that is written by users on console is logged in 3 different files (debug , syslog, messages) ... I'd like to route all history logs to one file only... i know how to make a filter which would write it to specific file but still everything is written to other files as well. is there possibility to configure syslog-ng to log history only to one file (for example history.log) and leave others files clean? best regards nichu
Re: [gentoo-user] problem with mail server
2009/2/3 kashani kashani-l...@badapple.net I think you've got a couple of problems, but none of them individually jump at as the cause of your problems. However making these three changes together might help. 1. Turn your max_user_connections in Mysql down to something sane. Default is 100 which is fine unless you're also running a web app against the same Mysql instance. 2. Use proxy in your Mysql connections from Postfix. Postfix can be configured to open a connection to Mysql and keep it open. Basically acts a connection pool and keep Postfix from opening hundreds of connections to Mysql on a very busy server. I recommend *always* using the proxy: statement anytime you're connecting to Mysql from Postfix. Your new transport_map statement will look like this. transport_maps = proxy:mysql:/etc/mail/sql/mysql-transport.cf Generally you shouldn't be running into connection issues because you're hitting Mysql on localhost which means it'll default to a socket connection. It's possible that opening a new session is taking to too long occasionally and using proxy should alleviate that. 3. You're using Postfix 2.1 or earlier query syntax. Hell it might even be Postfix 1.x syntax. This is the new syntax for Postfix 2.2 or better. This really isn't a problem, but the new syntax is far more powerful and suspect bugs that creep into the parser around old syntax aren't noticed or getting fixed. user = postfix password = password hosts = localhost dbname = maildb query = SELECT destination FROM domain WHERE domain='%s' I'm not sure what how-to you've been using, but I'd look at a few others to see some of the other options available. The one you're using seems to be pretty far out of date. While not wrong in any way it isn't taking full advantage of the last seven years of updates in Postfix. kashani thank You for Your response I switch all of mysql connections to proxy and I'll be watching if it helps. You're right - syntax of my configs were ancient - so I set them right. thank You again I hope it's solutions to my problems regards nichu
[gentoo-user] mounting NFS (RW RO)
Hello I have exported 2 directories via NFS - one RW - second RO - both directories are on the same partition. I noticed that order of mounting those shares is really important - when i mount first share RO and second RW - the second one is RO as well - when i mount first share RW and second RO - everything is OK Of course in my scripts I have changed the order of mounting and everything works fine but I think it's a bug and sometimes can be harmful... Has someone had some problem ? ? ? PS. NFS server is on mandriva, nfs client is on gentoo when client is on mandriva as well everything is OK - so that's why i think it's gentoo issue regards nichu