1

Topic: iRedAPD Stopped again

==== Required information ====
- iRedMail version: 0.9.2
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Linux/BSD distribution name and version: Debian 8
- Related log if you're reporting an issue: /var/log/mail.log
====

Got this this morning when sending an email to test a client's mailbox: SMTP Error (451) Failed to add recipient. Upon checking my mail.log in /var/log, I could see this:

Jun  7 12:59:06 mail postfix/smtpd[3536]: warning: connect to 127.0.0.1:7777: Connection refused
Jun  7 12:59:06 mail postfix/smtpd[3536]: warning: problem talking to server 127.0.0.1:7777: Connection refused
Jun  7 12:59:07 mail postfix/smtpd[3536]: warning: connect to 127.0.0.1:7777: Connection refused
Jun  7 12:59:07 mail postfix/smtpd[3536]: warning: problem talking to server 127.0.0.1:7777: Connection refused

Which meant that iRedAPD stopped accepting connections again. Noteworthy is the fact that Debian pushed out new kernel updates, and new SystemD updates yesterday, which I updated. When I restarted iRedAPD, the mail started flowing again. I'm hoping that this isn't a new problem based on the updates that Debian pushed yesterday... Any advice for me?

----

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

2 (edited by mir 2015-06-08 02:03:38)

Re: iRedAPD Stopped again

SteveLuxe wrote:

Any advice for me?

Until this is finally fixed:

cat /etc/cron.d/iredapd
MAILTO=root

* * * * * root [ -x /usr/local/sbin/check_iredapd.sh ] && /usr/local/sbin/check_iredapd.sh

cat /usr/local/sbin/check_iredapd.sh
#!/bin/sh

CMD=/etc/init.d/iredapd
[ -x $CMD ] || exit 0

STATUS=$($CMD status)
[ $? != 0 ] && $CMD start 2>&1 > /dev/null

exit 0

chmod 700 /usr/local/sbin/check_iredapd.sh

3

Re: iRedAPD Stopped again

mir: your formatting has me a bit confused. I don't have a file called iredapd in /etc/cron.d/

Were you wanting me to create a new file in /etc/cron.d/ with the contents:

MAILTO=root
* * * * * root [ -x /usr/local/sbin/check_iredapd.sh ] && /usr/local/sbin/check_iredapd.sh ???

The other is obviously a shell command which I can handle creating, but I'm guessing I'm creating the file iredapd in /etc/cron.d as well?

4

Re: iRedAPD Stopped again

He did mean to create both files, basically its a script that will restart iredapd once a minute if it for some reason stops. It looks like a temporary workaround.

5

Re: iRedAPD Stopped again

7t3chguy wrote:

He did mean to create both files, basically its a script that will restart iredapd once a minute if it for some reason stops. It looks like a temporary workaround.

Okay... Thanks. Yeah I just created both files. So that should check to see if iRedAPD is still running, and if it isn't, it restarts it?

6

Re: iRedAPD Stopped again

From a glance that seems like what it does

7

Re: iRedAPD Stopped again

I've noticed that this is now happening, too for one of my recipients on my mail server It's a "relay access denied" error...

Jun  7 14:04:08 mail postfix/smtpd[4382]: NOQUEUE: reject: RCPT from mobile-107-107-63-71.mycingular.net[107.107.63.71]: 554 5.7.1 <mobile-107-107-63-71.mycingular.net[107.107.63.71]>: Client host rejected: Access denied; from=<******@************.com> to=<******@**********.us> proto=ESMTP helo=<[10.204.208.149]>
Jun  7 14:04:09 mail postfix/smtpd[4382]: disconnect from mobile-107-107-63-71.mycingular.net[107.107.63.71]

I'm not sure why it's giving a "relay access denied" error, when he's not actually relaying anything. He's trying to send an email from his iPhone, via his account on my mail server.

8

Re: iRedAPD Stopped again

Tell him to re-add the account, it means he isn't performing SMTP AUTH
Without SMTP Auth, the only assumption that can be made is that a Relay is being attemped, sometimes iOS forgets that it was meant to send SMTP Auth and regularly re-adding the account fixes it. (On the device, not within iRedMail)

9

Re: iRedAPD Stopped again

Done. Thanks 7t3chguy!

10

Re: iRedAPD Stopped again

Any related log in /var/log/iredapd.log? Try this:

# grep -i 'error' /var/log/iredapd.log

11

Re: iRedAPD Stopped again

Hi Zhang! I did try checking the iredapd.log, but no result. It died without an error as far as I know...

12

Re: iRedAPD Stopped again

Sorry, cannot help if no related log. sad

Let's wait and see whether it happens again.

13

Re: iRedAPD Stopped again

I'll keep a close eye on the logs, Zhang. Hopefully something will turn up. I'll keep you posted if anything happens. Right now, I'm using Mir's cron job to check every minute if iRedAPD is running or not, and to restart it if it's dead. I'll keep monitoring it.

14

Re: iRedAPD Stopped again

OK. thanks for the feedback.

15

Re: iRedAPD Stopped again

Hello

any idea for this error?

i have the same problem..

iRedmail 0.9.2
Debian 8
MySQL
/var/log/mail.log
warning: connect to 127.0.0.1:7777: Connection refused

16

Re: iRedAPD Stopped again

Hi enriquedann,

Does it happen everytime in a specified period, or just randomly?

17

Re: iRedAPD Stopped again

hi ZhangHuangbin
Does it happen in a specified period...

18

Re: iRedAPD Stopped again

enriquedann wrote:

Does it happen in a specified period...

when? any related log in its log file?

19

Re: iRedAPD Stopped again

i have the same problem, can't found info in logs (mail.err mail.inf mail.log ireadpd.log) maybe i need up the level of log? is possible?

20

Re: iRedAPD Stopped again

Please try to remove (or move to another directory) /etc/logrotate.d/iredapd, and keep tracking this issue. It should fix it.

21

Re: iRedAPD Stopped again

I  have removed iredapd from logrotate.d and now it works fine. The services don't stop anymore from the last 5 days

PD: Sorry my bad english