PDA

View Full Version : Postfix keeps shutting down..?


phil_hodges
20th February 2006, 18:23
Hello there, I have a problem with 'postfix'...

When I perform a /etc/init.d/postfix restart it 'fails' on the shutdown and starts up 'ok'... If I perform a restart quickly again it stops 'OK' and starts 'OK'... If however I leave it for a minute, the shutdown 'fails'.

Now the crazy thing is that I have two systems configured almost identically. They are both DELL GX620’s running FC4 and are both fully up to date. One is configured as a webserver and postfix works fine. The other is configured as an ‘Asterisk PBX’ box and I am having trouble.

I wish I knew what I am doing wrong…?


Phil

falko
20th February 2006, 23:47
Can you find any errors in the mail log (in /var/log)?

phil_hodges
21st February 2006, 10:51
Hmmm...

Feb 20 15:59:18 asterisk2 postfix/postfix-script: stopping the Postfix mail system
Feb 20 15:59:19 asterisk2 postfix/postfix-script: starting the Postfix mail system
Feb 20 15:59:19 asterisk2 postfix/master[28371]: fatal: bind 127.0.0.1 port 25: Address already in use

Any ideas...

Phil

falko
21st February 2006, 11:14
It seems that if you stop Postfix it doesn't release 127.0.0.1 fast enough before Postfix is started again.

Can you post the restart section of /etc/init.d/postfix?

daspez
22nd February 2006, 12:08
Check to see if postfix is still listening...
netstat -an | grep 25

if you still see a port open then kill the process
ps -ef|grep postfix

then restart postfix
/etc/init.d/postfix start

benjami
3rd March 2006, 07:46
I see one daily stop and start, at 23:59:01


(/var/log/syslog)

Mar 2 23:59:01 localhost postfix/postfix-script: stopping the Postfix mail system
Mar 2 23:59:01 localhost postfix/master[4382]: terminating on signal 15
Mar 2 23:59:01 localhost postfix/postfix-script: starting the Postfix mail system
Mar 2 23:59:01 localhost postfix/master[17122]: daemon started -- version 2.2.4, configuration /etc/postfix

I think that is some ISPConfig cron script:


$ sudo crontab -l -u root |grep 59
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/ftp_logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/mail_logs.php &> /dev/null
59 23 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/cleanup.php &> /dev/null


Maybe mail_logs.php? :)

falko
3rd March 2006, 10:43
Maybe mail_logs.php? :)
Yes, that's right. ISPConfig rotates the mail log at that time to generate the mail traffic statistics, and therefore Postfix has to be restarted.

AlArenal
28th June 2007, 10:58
ISPConfig rotates the mail log at that time to generate the mail traffic statistics, and therefore Postfix has to be restarted.

Is that a necessity?
I have some problems with ISPC / syslog / logrotate interfering each other with the mail logs, especially since trying to get pflogsumm (following your own tutorial) to mail me meaningful statistics, but all I get is the 'rubbish' out of what's been logged between the runs of mail_logs.php and the run of the syslog cron job / logrotate.

See more detailed description http://www.howtoforge.com/forums/showthread.php?p=77524#post77524

It's like shooting yourself in the foot...

falko
29th June 2007, 19:05
Is that a necessity?
I have some problems with ISPC / syslog / logrotate interfering each other with Yes, because otherwise ISPConfig can't generate proper daily mail traffic statistics.