Thread: [Postfixadmin-devel] postfixadmin-devel@lists.sourceforge.net
Brought to you by:
christian_boltz,
gingerdog
From: MailingLists <mai...@st...> - 2008-07-20 16:44:48
|
Hey guys, I am having a serious problem with amavis and postfixadmin. My mailserver setup is as follows: Postfix -> Dovecot -> Amavisd-new (clamav/spamassasin) -> MySQL -> Roundcube -> Postfixadmin. I sometimes get errors in my mail.log as follows: Jul 20 16:36:12 stoned-hacker amavis[14077]: (14077-07) lookup_sql_field(id) (WARN: no such field in the SQL table), "mai...@st..." result=undef Jul 20 16:36:32 stoned-hacker amavis[13326]: (13326-11) lookup_sql_field(id) (WARN: no such field in the SQL table), "mai...@st..." result=undef Jul 20 16:38:28 stoned-hacker amavis[14077]: (14077-08) lookup_sql_field(id) (WARN: no such field in the SQL table), "mai...@st..." result=undef root@stoned-hacker:/var/log# cat /etc/amavis/conf.d/50-user use strict; # # Place your configuration directives here. They will override those in # earlier files. # # See /usr/share/doc/amavisd-new/ for documentation and examples of # the directives you can use in this file # @lookup_sql_dsn = ( ['DBI:mysql:database=postfixadmin;host=127.0.0.1;port=3306', 'postfixadm', 'aaaaaaaa']); $sql_select_policy = 'SELECT domain FROM domain WHERE CONCAT("@",domain) IN (%k)'; #------------ Do not modify anything below this line ------------- 1; # ensure a defined return root@stoned-hacker:/var/log# Is this a known problem as I can't find anything about it on google. I am not the best with SQL so can't re-arrange the tables. I would be really grateful if anyone can help me with this. Thanks in advance, Dusty. P.S: Not sure what else you may need to see, just ask and i'll show ya. |
From: Christian B. <pos...@cb...> - 2008-07-20 20:12:54
|
Hello, Am Sonntag, 20. Juli 2008 schrieb MailingLists: > I sometimes get errors in my mail.log as follows: > > Jul 20 16:36:12 stoned-hacker amavis[14077]: (14077-07) > lookup_sql_field(id) (WARN: no such field in the SQL table), > "mai...@st..." result=undef > root@stoned-hacker:/var/log# cat /etc/amavis/conf.d/50-user ... > $sql_select_policy = 'SELECT domain FROM domain WHERE > CONCAT("@",domain) IN (%k)'; I'm not sure if this is really the cause of the problem. Anyway, you can try SELECT domain, 1 as id FROM domain WHERE ... If this doesn't help, grep your whole amavis config for "id". Regards, Christian Boltz -- [Msg-ID-Fix] Wenn mich Evolution mehr als ein Furz einer Kuh auf einer Wiese am anderen Ende von Deutschland interessieren wuerde, dann koennte ich das sicher locker hinbekommen, die Variable so auszuwerten. ICH WILL ABER NICHT VERDAMMT NOCH MAL!!! [David Haller in suse-linux] |
From: Benny P. <me...@ju...> - 2008-07-20 21:07:46
|
On Sun, July 20, 2008 18:44, MailingLists wrote: > @lookup_sql_dsn = ( > ['DBI:mysql:database=postfixadmin;host=127.0.0.1;port=3306', > 'postfixadm', > 'aaaaaaaa']); > > $sql_select_policy = 'SELECT domain FROM domain WHERE CONCAT("@",domain) > IN (%k)'; this is not currently supported :( http://www.ijs.si/software/amavisd/README.sql-mysql.txt thats the sql setup for amavisd, and we both need it :-) > Example data follows: i had something in my mind with this olso so users can select from presets like this in postfixadmin, and domain owner can add new presets if one like it, olso maybe if domain owner permit it make it possible for user to custom policy it in amavisd if i was better php coder this was done now :/ but dont add amavisd tables to postfix admin, it will fail in the long run make a postfix admin sql cluase that uses amavisd sql data and modify it then its portable code and can be used longer then my life just my 2 cent, eh @ :-) -- Benny Pedersen Need more webspace ? http://www.servage.net/?coupon=cust37098 |
From: MailingLists <mai...@st...> - 2008-07-20 21:43:02
|
Benny Pedersen wrote: > On Sun, July 20, 2008 18:44, MailingLists wrote: > > >> @lookup_sql_dsn = ( >> ['DBI:mysql:database=postfixadmin;host=127.0.0.1;port=3306', >> 'postfixadm', >> 'aaaaaaaa']); >> >> $sql_select_policy = 'SELECT domain FROM domain WHERE CONCAT("@",domain) >> IN (%k)'; >> > > this is not currently supported :( > > http://www.ijs.si/software/amavisd/README.sql-mysql.txt > > thats the sql setup for amavisd, and we both need it :-) > > >> Example data follows: >> > > i had something in my mind with this olso so users can select from presets > like this in postfixadmin, and domain owner can add new presets if one > like it, olso maybe if domain owner permit it make it possible for user to > custom policy it in amavisd > > if i was better php coder this was done now :/ > > but dont add amavisd tables to postfix admin, it will fail in the long run > > make a postfix admin sql cluase that uses amavisd sql data and modify it > > then its portable code and can be used longer then my life > > just my 2 cent, eh @ :-) > > Hey, Thank you for the swift informative reply! :) Can you explain a little more as I don't code and am not very good with SQL ? Thanks again. Dusty. |
From: MailingLists <mai...@st...> - 2008-07-20 21:41:21
|
Christian Boltz wrote: > Hello, > > Am Sonntag, 20. Juli 2008 schrieb MailingLists: > >> I sometimes get errors in my mail.log as follows: >> >> Jul 20 16:36:12 stoned-hacker amavis[14077]: (14077-07) >> lookup_sql_field(id) (WARN: no such field in the SQL table), >> "mai...@st..." result=undef >> > > >> root@stoned-hacker:/var/log# cat /etc/amavis/conf.d/50-user >> > ... > >> $sql_select_policy = 'SELECT domain FROM domain WHERE >> CONCAT("@",domain) IN (%k)'; >> > > I'm not sure if this is really the cause of the problem. Anyway, you can > try SELECT domain, 1 as id FROM domain WHERE ... > > If this doesn't help, grep your whole amavis config for "id". > > > Regards, > > Christian Boltz > Well I tried that syntax and I still get the errors :-[ I have ran a grep "id" mail.log for the full errors with debuy log level turned on in amavis, you may see this log here: http://stoned-hacker.co.uk/log.txt Any ideas ? Thanks for the prompt reply. Dusty. |
From: Christian B. <pos...@cb...> - 2008-07-20 22:39:41
|
Hello, Am Sonntag, 20. Juli 2008 schrieb MailingLists: > Christian Boltz wrote: ... > > I'm not sure if this is really the cause of the problem. Anyway, > > you can try SELECT domain, 1 as id FROM domain WHERE ... > Well I tried that syntax and I still get the errors :-[ Then the error is probably somewhere else. > I have ran a grep "id" mail.log for the full errors with debuy log > level turned on in amavis, you may see this log here: Seems you misunderstood me - grep in your _amavis config_, not the mail log, please ;-) While you are on it, you can also include all SQL-related statements. Something like grep -ri "id\|sql" /etc/amavis* should do this. Regards, Christian Boltz -- "Error Message: Your Password Must Be at Least 18770 Characters and Cannot Repeat Any of Your Previous 30689 Passwords (Q276304)" http://support.microsoft.com/default.aspx?scid=kb;EN-US;q276304 |