# Postfix stop responding after some time

## MasterPrenium

Hi guys,

I'm running a mail server setup (postfix+courrier), inside a gentoo VPS running on OpenVZ. Postfix & courrier are using virtual accounts stored in a Mysql DB. Looking at resources counters, there is NO resource that is exhausted (also tried increasing all resources by x10, no change)

I'm having an issue with postfix, after a random time, it stop replying on smtp port. Here is what happens :

After a reboot of the VPS, Postfix works fine :

telnet localhost 25

 *Quote:*   

> Trying ::1...
> 
> Connected to localhost.
> 
> Escape character is '^]'.
> ...

 

Then after a random time (from 5 seconds to about 1hour), it stopped replying on port 25 :

telnet localhost 25

 *Quote:*   

> Trying ::1...
> 
> Connected to localhost.
> 
> Escape character is '^]'.

 

and it's stucked here, no answer even if I retry the connection, even if I wait for hours

I don't find any errors in the logs, it seems there is nothing related with the number of opened sockets (postfix sometimes is working with about 20 connections opened, and sometimes it doesn't reply with only one connection opened).

Please note that restarting postfix doesn't solve the issue, I have to restart the VPS.

And sometimes after a VPS restart it's still not working ...

My setup :

 *Quote:*   

> [ebuild   R    ] mail-mta/postfix-3.0.2::gentoo  USE="berkdb eai mysql pam sasl ssl -cdb -doc -dovecot-sasl -hardened -ldap -ldap-bind -lmdb -mbox -memcached -nis -postgres (-selinux) -sqlite -vda" 0 KiB

 

Postconf -n :

 *Quote:*   

> postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_sender_restrictions
> 
> postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_client_restrictions
> 
> postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_helo_restrictions
> ...

 

Any idea ? It's not the first time I setup a postfix server, but it's the first time I'm facing this behaviour ...

Thanks,

----------

## Syl20

Maybe the problem is the mysql service ? When postfix stops responding, did you try to connect to the mysql server ?

I see you use an ipv6 address to connect to the postfix service ( ::1 ), but you defined none in your postfix configuration (mynetworks = 127.0.0.0/8, 172.16.0.0/16, 10.8.0.0/16). I don't think that explains your problem, but setting a coherent configuration should be better.

----------

## sedros

Hi,

It seems that I have the same problem. After some time postfix can't authenticate users trying to send emails and the only solution is to restart postfix.

Log entries that appear when it happens:

```
Jul 20 21:03:23 hostname postfix/smtpd[7295]: sql plugin Parse the username user@email.tld

Jul 20 21:03:23 hostname postfix/smtpd[7295]: sql plugin try and connect to a host

Jul 20 21:03:23 hostname postfix/smtpd[7295]: sql plugin trying to open db '' on host ''

Jul 20 21:03:23 hostname postfix/smtpd[7295]: sql plugin could not connect to host 

Jul 20 21:03:23 hostname postfix/smtpd[7295]: sql plugin couldn't connect to any host

Jul 20 21:03:23 hostname postfix/smtpd[7295]: sql plugin Parse the username user@email.tld

Jul 20 21:03:23 hostname postfix/smtpd[7295]: sql plugin try and connect to a host

Jul 20 21:03:23 hostname postfix/smtpd[7295]: sql plugin trying to open db '' on host ''

Jul 20 21:03:23 hostname postfix/smtpd[7295]: sql plugin could not connect to host 

Jul 20 21:03:23 hostname postfix/smtpd[7295]: sql plugin couldn't connect to any host

Jul 20 21:03:23 hostname postfix/smtpd[7295]: warning: unknown[xxx.xxx.xxx.xxx]: SASL PLAIN authentication failed: generic failure
```

Postfix restart helps only for a few hours.

----------

