HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   Centos 5.2 - ISPconfig 3 installation and it's bugs/problems (http://www.howtoforge.com/forums/showthread.php?t=31379)

bl4ckb1rd 16th February 2009 03:39

Centos 5.2 - ISPconfig 3 installation and it's bugs/problems
 
First of all, i would like to say, this so called "perfect" installation of ISPconfig on Centos 5.2 is broken.

- One of the things that is firstly wrong is, that yum repositories dont have mysql precompiled postfix at all. (not even dag one) So... this makes whole mailserver broken with this distribution. Other than that, after i fixed problems with recompiling postfix and enabling mysql support, i ran into another problem. the path of maildrop in master.cf of postfix is wrong.

- Default installation of maildrop with the centos installation guide is /usr/bin/maildrop, so that should be fixed. You can simply solve it with symbolic link of course.

- I have noticed few ajax issues/errors. Sometimes ISPconfig just blocks, and freezes the window. Fortunately it doesn't happen too often. Although, if you are adding a mailbox at that time (like i was), things can get messy. For example, it broke my POP3 and IMAP becouse maildirmake wasn't executed properly and cur, new and tmp directories weren't made properly.

Currently biggest issue i currently have is:

Feb 16 04:11:38 ibex postfix/pipe[18205]: F04DB1A18013: to=<xxx.xxx@xxx.net>, relay=maildrop, delay=5073, delays=5073/0.27/0/0.02, dsn=4.3.0, status=deferred (temporary failure. Command output: /usr/bin/maildrop: Unable to open mailbox. )

I'm not sure where to start searching for answers to this error, since i was always using Qmail so far on my servers. It's my first time i'm looking at postfix which is supported by ISPconfig which i wanted to try out on the new server i made.

I have feeling there must be something with maildrop and mailfilters... not sure. Is there any way i can try "delivering email" manually by su-ing into vmail user and maildroping it manually to the user by issuing it with a command ? That would actually show me where the problem lays. Or maybe how could i log what everything is maildrop doing... in some log file or something...

my current maildroprc is:
logfile "/var/log/maildrop.log"
VERBOSE=5

But for now in maildrop.log i dont have any lines unfortunately.

bl4ckb1rd 16th February 2009 04:06

ok...
 
ok i was searching the web how to test this thing... and i found out this:

Quote:

maildrop: authlib: groupid=5000
maildrop: authlib: userid=5000
maildrop: authlib: logname=alen.krmelj@xxx.net, home=/var/vmail, mail=/var/vmail/xxx.net/alen.krmelj
maildrop: Changing to /var/vmail
Message start at 0 bytes, envelope sender=alen.krmelj@xxx.net
maildrop: Attempting .mailfilter
Tokenized ;
Tokenized ;
Tokenized ;
Tokenized ;
Tokenized string: "LOGNAME"
Tokenized =
Tokenized tolower
Tokenized (
Tokenized string: "$LOGNAME"
Tokenized )
Tokenized ;
Tokenized string: "EXTENSION"
Tokenized =
Tokenized string: "$1"
Tokenized ;
Tokenized string: "RECIPIENT"
Tokenized =
Tokenized tolower
Tokenized (
Tokenized string: "$2"
Tokenized )
Tokenized ;
Tokenized string: "USER"
Tokenized =
Tokenized string: "$3"
Tokenized ;
Tokenized string: "HOST"
Tokenized =
Tokenized string: "$4"
Tokenized ;
Tokenized string: "SENDER"
Tokenized =
Tokenized string: "$5"
Tokenized ;
Tokenized string: "DEFAULT"
Tokenized =
Tokenized string: "/var/vmail/$HOST/$USER/."
Tokenized ;
Tokenized ;
Tokenized if
Tokenized (
Tokenized string: "$EXTENSION"
Tokenized ne
Tokenized string: ""
Tokenized )
Tokenized ;
Tokenized {
Tokenized ;
Tokenized string: "DELIMITER"
Tokenized =
Tokenized string: "+"
Tokenized ;
Tokenized }
Tokenized ;
Tokenized ;
Tokenized if
Tokenized (
Tokenized !
Tokenized string: "$SENDER"
Tokenized )
Tokenized ;
Tokenized {
Tokenized ;
Tokenized string: "SENDER"
Tokenized =
Tokenized string: "<>"
Tokenized ;
Tokenized }
Tokenized ;
Tokenized ;
Tokenized ;
Tokenized ;
Tokenized ;
Tokenized ;
Tokenized string: `test -e /var/vmail/$HOST`
Tokenized ;
Tokenized if
Tokenized (
Tokenized string: "$RETURNCODE"
Tokenized !=
Tokenized string: "0"
Tokenized )
Tokenized ;
Tokenized {
Tokenized ;
Tokenized string: `mkdir /var/vmail/$HOST`
Tokenized ;
Tokenized }
Tokenized ;
Tokenized ;
Tokenized string: `test -e /var/vmail/$HOST/$USER`
Tokenized ;
Tokenized if
Tokenized (
Tokenized string: "$RETURNCODE"
Tokenized !=
Tokenized string: "0"
Tokenized )
Tokenized ;
Tokenized {
Tokenized ;
Tokenized string: `maildirmake /var/vmail/$HOST/$USER`
Tokenized ;
Tokenized string: `chmod -R 0700 /var/vmail/$HOST`
Tokenized ;
Tokenized }
Tokenized ;
Tokenized ;
Tokenized ;
Tokenized ;
Tokenized string: `test -f /var/vmail/mailfilters/$HOST/$USER/.autoresponder`
Tokenized ;
Tokenized if
Tokenized (
Tokenized string: "$RETURNCODE"
Tokenized ==
Tokenized string: "0"
Tokenized )
Tokenized ;
Tokenized {
Tokenized ;
Tokenized include
Tokenized string: "/var/vmail/mailfilters/$HOST/$USER/.autoresponder"
Tokenized ;
Tokenized }
Tokenized ;
Tokenized ;
Tokenized ;
Tokenized string: `echo $SIZE >> /var/vmail/$HOST/$USER/.ispconfig_mailsize`
Tokenized ;
Tokenized ;
Tokenized ;
Tokenized ;
Tokenized ;
Tokenized ;
Tokenized ;
Tokenized ;
Tokenized ;
Tokenized ;
Tokenized string: `test -f /var/vmail/mailfilters/$HOST/$USER/.mailfilter`
Tokenized ;
Tokenized if
Tokenized (
Tokenized string: "$RETURNCODE"
Tokenized ==
Tokenized string: "0"
Tokenized )
Tokenized ;
Tokenized {
Tokenized ;
Tokenized include
Tokenized string: "/var/vmail/mailfilters/$HOST/$USER/.mailfilter"
Tokenized ;
Tokenized }
Tokenized ;
Tokenized else
Tokenized ;
Tokenized {
Tokenized ;
Tokenized if
Tokenized (
Tokenized string: "$DEFAULT"
Tokenized ne
Tokenized string: ""
Tokenized )
Tokenized ;
Tokenized {
Tokenized ;
Tokenized to
Tokenized string: "$DEFAULT"
Tokenized ;
Tokenized }
Tokenized ;
Tokenized else
Tokenized ;
Tokenized {
Tokenized ;
Tokenized string: "EXITCODE"
Tokenized =
Tokenized string: "75"
Tokenized ;
Tokenized exit
Tokenized ;
Tokenized }
Tokenized ;
Tokenized }
Tokenized ;
Tokenized eof
.mailfilter(5): LOGNAME="alen.krmelj@xxx.net"
.mailfilter(6): EXTENSION=""
.mailfilter(7): RECIPIENT=""
.mailfilter(8): USER=""
.mailfilter(9): HOST=""
.mailfilter(10): SENDER=""
.mailfilter(11): DEFAULT="/var/vmail///."
.mailfilter(13): Evaluating IF condition.
.mailfilter(13): Operation on: and - string not equal, result is 0
.mailfilter(13): IF evaluated, result=0
.mailfilter(18): Evaluating IF condition.
.mailfilter(18): Operation on: - logical not.
.mailfilter(18): Operation: logical not=1
.mailfilter(18): IF evaluated, result=1
.mailfilter(20): SENDER="<>"
maildrop: Filtering through `test -e /var/vmail/$HOST`
.mailfilter(28): Evaluating IF condition.
.mailfilter(28): Operation on: 0 and 0 - not equal, result is 0
.mailfilter(28): IF evaluated, result=0
maildrop: Filtering through `test -e /var/vmail/$HOST/$USER`
.mailfilter(34): Evaluating IF condition.
.mailfilter(34): Operation on: 0 and 0 - not equal, result is 0
.mailfilter(34): IF evaluated, result=0
maildrop: Filtering through `test -f /var/vmail/mailfilters/$HOST/$USER/.autoresponder`
.mailfilter(43): Evaluating IF condition.
.mailfilter(43): Operation on: 1 and 0 - equal, result is 0
.mailfilter(43): IF evaluated, result=0
maildrop: Filtering through `echo $SIZE >> /var/vmail/$HOST/$USER/.ispconfig_mailsize`
maildrop: Filtering through `test -f /var/vmail/mailfilters/$HOST/$USER/.mailfilter`
.mailfilter(60): Evaluating IF condition.
.mailfilter(60): Operation on: 1 and 0 - equal, result is 0
.mailfilter(60): IF evaluated, result=0
.mailfilter(66): Evaluating IF condition.
.mailfilter(66): Operation on: /var/vmail///. and - string not equal, result is 1
.mailfilter(66): IF evaluated, result=1
maildrop: Delivering to /var/vmail///.
maildrop: Unable to open mailbox.
It seems this default installation of .mailfilter is broken. Any update on it would be very nice...

oh yea and sorry for the long post.

bl4ckb1rd 16th February 2009 04:26

When i modified my master.cf, to look like this:

Quote:

flags=DRhu user=vmail argv=/usr/bin/maildrop -d vmail ${extension} ${recipient} ${user} ${domain} ${sender}
I got:

Quote:

Feb 16 05:14:03 ibex postfix/pipe[21476]: DA8971A18014: to=<alen.krmelj@xxx.net>, relay=maildrop, delay=8307, delays=8307/0.16/0/0.01, dsn=4.3.5, status=deferred (mail system configuration error)
Feb 16 05:14:03 ibex postfix/pipe[21476]: warning: file /etc/postfix/master.cf: service maildrop: unknown macro name: "domain"
So i went to master.cf and removed that ${domain} and it said:
Quote:

Feb 16 05:14:30 ibex postfix/pipe[21570]: 457561A18015: to=<alen.krmelj@xxx.net>, relay=maildrop, delay=3300, delays=3300/0.05/0/0.12, dsn=2.0.0, status=sent (delivered via maildrop service)
I went to check, but instead of putting these mails into xxx.net folder it spammed them into /var/vmail folder... I deleted them, just to clean the mess up. So here's the question, how to pass this ${domain} variable to postfix ? Oh yes, and the default of this maildrop was:

Quote:

flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}

bl4ckb1rd 16th February 2009 04:47

finally got this solved.

Here is for all of you who wondered why this thing doesnt work:

In master.cf you need:

Quote:

maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d vmail ${extension} ${recipient} ${user} ${nexthop} ${sender}
This is proper syntax. I guess ${domain} was replaced with ${nexthop} in postfix...

Best regards to everyone. Maybe someone finds this thing useful after all. Sorry for the monologues though ;)

Murder4Al 16th February 2009 22:59

Just a quick note I had the same issue on Ubuntu 8.10, and the same fix did it!

bl4ckb1rd 17th February 2009 18:27

I'm glad this solves issues to newly installed ISPconfig 3's

bl4ckb1rd 18th February 2009 03:52

Also on centos 5.2 default installation of postfix logs all messages to /var/log/maillog which isn't very useful for ispconfig, since it tracks /var/log/mail.log, mail.warn and mail.err

you may want to edit your /etc/syslog.conf and change mail line to:

Quote:

# Log all the mail messages in one place.
mail.* -/var/log/mail.log
mail.=warn -/var/log/mail.warn
mail.err -/var/log/mail.err
Which will make use of your monitor in ISPconfig again.


Another note is about syslog facility of pure-ftpd. Default installation will log all to syslog. If you dont want to get flooded with:

Quote:

Feb 18 00:20:02 ibex pure-ftpd: (?@127.0.0.1) [INFO] New connection from 127.0.0.1
Feb 18 00:20:02 ibex pure-ftpd: (?@127.0.0.1) [INFO] Logout.
Feb 18 00:25:01 ibex pure-ftpd: (?@127.0.0.1) [INFO] New connection from 127.0.0.1
Feb 18 00:25:01 ibex pure-ftpd: (?@127.0.0.1) [INFO] Logout.
Change /etc/pure-ftpd/pure-ftpd.conf to:

Quote:

# Syslog facility (auth, authpriv, daemon, ftp, security, user, local*)
# The default facility is "ftp". "none" disables logging.

SyslogFacility none
This should disable logging of pure-ftpd directly to /var/log/messages which ic shown under "Show System Log" in Monitor section of ISPconfig 3.

Clamd also logs in other file, so find and edit LogFile in /etc/clamd.conf to this:

Quote:

LogFile /var/log/clamav/clamav.log
There you go, quick update on default installation of centos 5.2 (all services installed thru yum repositories exactly as guide tells you to do.)

bl4ckb1rd 18th February 2009 03:59

Also if you haven't specified a particular outside ip address at installation, default behaviour in ISPconfig would be adding vhosts as *:80 ... this can bring problems with more vhosts, becouse it wont show vhosted websites, but transfer you to the default one. To fix this, add:

Quote:

NameVirtualHost *:80
to your httpd.conf config file and restart apache.

rogeramay 18th February 2009 14:07

Do you have itemized steps with recompiling postfix with support for mysql? Also, what steps did you do to apply the recomplied postfix to a broken install?

I am getting:

postfix/smtpd[21820]: fatal: unsupported dictionary type: mysql
postfix/master[5651]: warning: process /usr/libexec/postfix/smtpd pid 21820 exit status 1
postfix/master[5651]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
postfix/qmgr[21821]: fatal: unsupported dictionary type: mysql
postfix/master[5651]: warning: process /usr/libexec/postfix/qmgr pid 21821 exit status 1
postfix/master[5651]: warning: /usr/libexec/postfix/qmgr: bad command startup -- throttling

so I believe that the postfix issue is applying to me.

I am very new to postfix (previous servers had be using sendmail).

bl4ckb1rd 18th February 2009 21:13

you installed non-mysql precompiled postfix from repository (which i mentioned before in posts, so i had same problem as you), you need to yum remove it and install mysql precompiled one. Here is the link to doing that, and building a rpm of postfix with mysql enabled:

http://www.swimminginthought.com/?p=41

Dont worry about the warnings, there will be plenty when compiling this rpm :) Dont forget to remove your old postfix before installing this one...


All times are GMT +2. The time now is 11:02.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.