1

Topic: Problem with postfix-policyd *BUG* ???

I get this in mail.log
mysql_real_connect(): Access denied for user 'postfix-policyd'@'localhost' (using password:
YES)

I'm using IRedMail-0.6.0-beta1 on Ubuntu 9.04 64bit.

when I'm looking into MySQL there are no Database named.
"postfixpolicyd"

Any help would been appriciated big_smile


Br
Patrik

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Problem with postfix-policyd *BUG* ???

Maybe a bug in iRedMail-0.6.0-beta1.

You can import policyd database templates manully, add a mysql user and grant necessary privileges to this user.
Reference: http://iredmail.googlecode.com/hg/iRedM … service.sh (function policyd_config())

3

Re: Problem with postfix-policyd *BUG* ???

I will try that as soon as possible.
Br
Patrik


ZhangHuangbin wrote:

Maybe a bug in iRedMail-0.6.0-beta1.

You can import policyd database templates manully, add a mysql user and grant necessary privileges to this user.
Reference: http://iredmail.googlecode.com/hg/iRedM … service.sh (function policyd_config())

4

Re: Problem with postfix-policyd *BUG* ???

you can try it in beta2, I have test it in ubuntu 9.10 and can find the database postfixpolicied.

5

Re: Problem with postfix-policyd *BUG* ???

shake wrote:

you can try it in beta2, I have test it in ubuntu 9.10 and can find the database postfixpolicied.

I can do that, but where can I download Beta2?

Br
Patrik

6 (edited by shake 2010-02-10 01:23:23)

Re: Problem with postfix-policyd *BUG* ???

http://code.google.com/p/iredmail/downloads/list

beta3 have been publish.

7

Re: Problem with postfix-policyd *BUG* ???

putte wrote:

I will try that as soon as possible.
Br
Patrik


ZhangHuangbin wrote:

Maybe a bug in iRedMail-0.6.0-beta1.

You can import policyd database templates manully, add a mysql user and grant necessary privileges to this user.
Reference: http://iredmail.googlecode.com/hg/iRedM … service.sh (function policyd_config())

yes...it work 4 me
add a mysql user "postfix-policyd" and grant necessary privileges to this user
set passwd with passwd on postfix-policyd.conf
---> MYSQLPASS="xxxXwcTu4iCY7LTpJ2hWZSxxx"
import policyd.sql (attached)
restart...FINISH

Post's attachments

policyd.sql 19.06 kb, 72 downloads since 2010-04-28 

You don't have the permssions to download the attachments of this post.

8 (edited by flava 2011-12-07 19:03:13)

Re: Problem with postfix-policyd *BUG* ???

Hello,

I have a fresh installed Debian 5.0.9, but I use Squeeze as Rep in sources.list
I have also the problem, that database postfixpolicyd doesn´t exist after install, and there is no mysqluser postfix-policyd as described in postfix-policyd.conf.
If I look in mysql.user, there are vmail, vmailadmin, amavisd, roundcube and iredadmin.


I have to run
/etc/init.d/postfix-policyd start
then it is started.

Do you know what I´m making wrong ?
Thank you in advance.

9

Re: Problem with postfix-policyd *BUG* ???

flava wrote:

I have a fresh installed Debian 5.0.9, but I use Squeeze as Rep in sources.list

We didn't test Debian like this (mix apt repositories), so not sure whether it's the root cause or not.

10

Re: Problem with postfix-policyd *BUG* ???

ok I installed Debian again and this time I made a dist-upgrade to 6.0.3
After installing some packages (apache2, php5, mysql ....) I download iRedmail, untar it and run bash iRedmail.sh
I am asked for mysql root password, I give the same password as I gave it minutes before as I installed mysql-server. I run a shellscript after a fresh OS Installation, some lines from my installscript.sh:

aptitude -y install nmap iptables tcpdump fwlogwatch ncftp lftp ftp-ssl curl zip unzip bzip2 openssl ssl-cert wput libssl-dev dnsutils telnet less hdparm
aptitude -y install apache2-mpm-prefork apache2-utils
aptitude -y install php5 libapache2-mod-php5 libapache2-mod-fcgid php5-cli php5-common php5-cgi php5-curl php5-imagick
aptitude -y install mysql-server-5.1 php5-mysql phpmyadmin

Then this error message appears:

< INFO > Configure User/Group: vmail.
< INFO > Configure Apache web server and PHP.
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

I guess it´s in the file functions/mysql.sh line 52

mysqladmin --user=root password "${MYSQL_ROOT_PASSWD}"

Why it is saying using password: NO ?
I got it!
I changed it to

mysqladmin --user=root -pXXX password "${MYSQL_ROOT_PASSWD}"

(yes, hard-coded)
One step further.
this time:
ERROR 1049 (42000) at line 5: Unknown database 'postfixpolicyd'

How can I fix this ?
So your script assumes that we don´t have mysql installed ?

11

Re: Problem with postfix-policyd *BUG* ???

@ZhangHuangbin
Ok my mistake, you wrote FRESH installation at http://www.iredmail.org/install_iredmail_on_debian.html

I will try out again

12

Re: Problem with postfix-policyd *BUG* ???

flava wrote:

< INFO > Configure Apache web server and PHP.
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

As you already knew, iRedMail is designed to be deployed on a FRESH OS, so it expects MySQL was installed without a root password, and it try to set new root password. This error should be considered as expected behave.

13

Re: Problem with postfix-policyd *BUG* ???

okay,

this time i ran iRedmail.sh first.
It works.
One problem is the following in mail.log

Dec  8 16:50:29 www postfix/smtpd[15720]: connect from xxx.de[xxx]
Dec  8 16:50:29 www postfix/smtpd[15720]: warning: connect to 127.0.0.1:10031: Connection refused
Dec  8 16:50:29 www postfix/smtpd[15720]: warning: problem talking to server 127.0.0.1:10031: Connection refused
Dec  8 16:50:30 www postfix/smtpd[15720]: warning: connect to 127.0.0.1:10031: Connection refused
Dec  8 16:50:30 www postfix/smtpd[15720]: warning: problem talking to server 127.0.0.1:10031: Connection refused
Dec  8 16:50:30 www postfix/smtpd[15720]: NOQUEUE: reject: RCPT from xxx[xxx]: 451 4.3.5 Server configuration problem; from=<xxx> to=<xxx> proto=ESMTP helo=<xxx>

I have to run /etc/init.d/postfix-policyd start

Dec  8 16:53:17 www postfix-policyd: starting policyd v1.82
Dec  8 16:53:17 www postfix-policyd: connecting to mysql database: 127.0.0.1
Dec  8 16:53:17 www postfix-policyd: connected..

Maybe you can add this line to your script.
I´ll include it in my script also.

So great work for you smile
I must check out other things, so I can send mails via Email-Client, but can´t receive mails:

Dec  8 17:01:16 www postfix-policyd: rcpt=1, greylist=new, host=xxx (xxx), from=xxx, to=xxx, size=2902
Dec  8 17:01:16 www postfix/smtpd[15853]: NOQUEUE: reject: RCPT from xxx[xxx]: 450 4.7.1 <xxx>: Recipient address rejected: Policy Rejection- Please try later.; 

14

Re: Problem with postfix-policyd *BUG* ???

It's greylisting, mails will arrive in about 15 minutes.
Reference: http://greylisting.org/

15

Re: Problem with postfix-policyd *BUG* ???

ok thank you very much! I´ll read that. I got mail after few minutes, yes.
Definitely great script.