2

I am running postfix on debian wheezy with Dovecot and I had spam issues with a php script . after finding and removing the script I am unable to send any mails from squirrel mail from my browser. I get

ERROR: Message not sent. Server replied: Service not available, closing channel 421 4.3.2 All server ports are busy

How can i track this issue down and What information should I provide to resolve this issue?

thanks

user3067037
  • 19
  • 1
  • 5
  • Please check your `/var/log/mail.log` or `/var/log/maillog` – b13n1u Jan 19 '14 at 09:39
  • Jan 19 13:06:54 htz postfix/postscreen[10888]: warning: cannot connect to service private/smtpd: No such file or directory Jan 19 13:06:55 htz postfix/postscreen[10888]: PASS NEW [64.20.227.133]:62525 Jan 19 13:06:55 htz postfix/postscreen[10888]: DISCONNECT [64.20.227.133]:62525 Jan 19 13:08:35 htz postfix/postscreen[10888]: close database /var/lib/postfix/postscreen_cache.db: No such file or directory (possible Berkeley DB bug) – user3067037 Jan 19 '14 at 09:45
  • I guess you have already tried to restart postfix ?:) Please share the output of `postconf -n` – b13n1u Jan 19 '14 at 09:49
  • I don't even have enough rep to copy the output but http://mxtoolbox.com tells me this : Connecting to 178.63.21.220 SendSMTPCommand: You hung up on us after we connected. Please whitelist us. (connection lost) MXTB-PWS3v2 1435ms – user3067037 Jan 19 '14 at 09:53
  • I also get Jan 19 13:15:01 htz postfix/postscreen[11386]: warning: cannot connect to service private/smtpd: No such file or directory in my mail log – user3067037 Jan 19 '14 at 09:59
  • It look's like you are using `postscreen` and it could be dropping the connections. You can try to disable it temporarily. – b13n1u Jan 19 '14 at 10:00
  • Please check your `/etc/postfix/main.cf` for `postscreen_access_list` most probably `/etc/postfix/postscreen_access.cidr` then try to add your client to white list, example `192.168.0.1 permit` – b13n1u Jan 19 '14 at 10:09
  • I have no postscreen in the main.cf or in the postfix folder at all – user3067037 Jan 19 '14 at 10:12
  • Could you check if there is any infromation about postscreen in /etc/postfix/master.cf ? – b13n1u Jan 19 '14 at 10:13
  • smtp inet n - - - 1 postscreen – user3067037 Jan 19 '14 at 10:15
  • So it looks like you have postscreen enabled but it's not configured at all, please comment out the `postscreen` line in master.cf and uncomment `smtp inet ... smtpd` and reload/restart postfix. Please take a look at [this](http://www.postfix.org/POSTSCREEN_README.html#turnoff) – b13n1u Jan 19 '14 at 10:21
  • I commented the postscreen line and now I am unable to open squirrelmail which is my web base email handler – user3067037 Jan 19 '14 at 10:34
  • You also need uncomment smtp inet ... smtpd and reload/restart postfix. Please take a look at the postscreen [manual](http://www.postfix.org/POSTSCREEN_README.html#turnoff) – b13n1u Jan 19 '14 at 12:03
  • Thanks for your replies . Commenting both of them will leave me with : Connection refused 111 Can't open SMTP stream. – user3067037 Jan 19 '14 at 12:11
  • You need to coment out(remove the postscreen line) and **UN** comment(add) the smtpd line – b13n1u Jan 19 '14 at 12:44
  • Well That solved my issues in the sending part .. I now am able to send mail again but not able to receive .. webmin postfix says : mail transport unavailable – user3067037 Jan 19 '14 at 13:12
  • Please add to the question, the output of your your master.cf and the mil.log after you changes. – b13n1u Jan 19 '14 at 13:19
  • I've uploaded my main.cf here because I do not have enough rep to post the answer yet : http://shrib.com/dZ4wq2KD – user3067037 Jan 19 '14 at 13:28
  • Please also share the master.cf file. BTW is your dovecot daemon running? – b13n1u Jan 19 '14 at 13:36
  • http://shrib.com/z2di1fNg this is my master.cf and dovecot service is running – user3067037 Jan 19 '14 at 13:42
  • Hmm... you are running Dovecot as your MTA right? If so, why is there no dovecot entry in your master.cf ? How should postfix know that it has to move the emails to dovecot ? You need to add dovecot to your master.cf: something like: `dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient} `Was your email ever working properly ? Take a look at this [tutorial](https://workaround.org/ispmail/wheezy) – b13n1u Jan 19 '14 at 14:01
  • I did add dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -d ${recipient} to my master.cf and now I am able to send and receive .. I do not know how to thank you but you are an angel sent from heaven or something. great job – user3067037 Jan 19 '14 at 14:12
  • can you post the answer so atleast I tick it for the future if anyones having the same problem ? – user3067037 Jan 19 '14 at 14:16
  • Great to hear that it's working!:) – b13n1u Jan 19 '14 at 14:18

1 Answers1

3

From the data that you provided it looks like you have enabled postscreen but it is not properly configured. The best option is to disable it for now to check if this helps. Please us this howto to disable it. Also from the provided master.cf it looks like you don't have an MTA(dovecot) configured in postfix. Please add dovecot configuration to the master.cf so postfix will now that it has to move the mails to MTA. an example below(you probably will need to modifiy it a little bit)

dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -d ${recipient}

b13n1u
  • 980
  • 9
  • 14
  • This helped a lot. I uncommented the wrong line in my master.cf and ran postscreen instead of smtpd. – nomen Feb 11 '15 at 22:52