1 (edited by tayzee 2018-03-06 18:03:33)

Topic: iRedApd Help!!!

==== Required information ====
- iRedMail version (check /etc/iredmail-release):  0.9.7
- Linux/BSD distribution name and version: Ubuntu 16.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hi there,

Im having an issue with iRedApd which I cannot solve sad

Yesterday I added a new domain and some accounts to my mail server and one of my accounts was complaining about the rejection policy. I decided to copy the default_settings.py file to the /opt/ireadapd/settings.py and all i changed was the greylisting setting to True for training, and restarted iredapd. I never knew anything was wrong until an hour ago when people started complaining that no mail was sending and receiving.

I immediately removed the new settings file and restarted iredapd, but now the problem is persisting.. I have subsequently disabled iredapd in my postfix config for now so that mail can work, but would appreciate some help getting the problem solved..

Heres the error i was receiving in my mail logs:

Mar  6 11:46:16 mail postfix/smtpd[4241]: warning: connect to 127.0.0.1:7777: Connection refused
Mar  6 11:46:16 mail postfix/smtpd[4241]: warning: problem talking to server 127.0.0.1:7777: Connection refused
Mar  6 11:46:17 mail postfix/smtpd[4241]: warning: connect to 127.0.0.1:7777: Connection refused
Mar  6 11:46:17 mail postfix/smtpd[4241]: warning: problem talking to server 127.0.0.1:7777: Connection refused
Mar  6 11:46:17 mail postfix/smtpd[4241]: NOQUEUE: reject: RCPT from mail-sn1nam02lp0017.outbound.protection.outlook.com[216.32.180.17]: 451 4.3.5 <email@domain>: Recipient address rejected: Server configuration problem; from=<user@opm50.hbs.edu> to=<email@domain> proto=ESMTP helo=<NAM02-SN1-obe.outbound.protection.outlook.com>
Mar  6 11:46:17 mail postfix/smtpd[4241]: disconnect from mail-sn1nam02lp0017.outbound.protection.outlook.com[216.32.180.17] ehlo=2 starttls=1 mail=1 rcpt=0/1 quit=1 commands=5/6
Mar  6 11:46:43 mail postfix/smtpd[4206]: timeout after RSET from unknown[196.211.110.250]
Mar  6 11:46:45 mail postfix/master[4058]: terminating on signal 15

nmap localhost shows no port 7777, i assume this could be part of the issue, but nothing was ever changed to remove this:
Starting Nmap 7.01 ( https://nmap.org ) at 2018-03-06 11:59 SAST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000010s latency).
Other addresses for localhost (not scanned): ::1
rDNS record for 127.0.0.1: mail.domain.com
Not shown: 985 closed ports
PORT      STATE SERVICE
24/tcp    open  priv-mail
25/tcp    open  smtp
80/tcp    open  http
110/tcp   open  pop3
143/tcp   open  imap
443/tcp   open  https
587/tcp   open  submission
783/tcp   open  spamassassin
993/tcp   open  imaps
995/tcp   open  pop3s
3306/tcp  open  mysql
9998/tcp  open  distinct32
10024/tcp open  unknown
10025/tcp open  unknown
20000/tcp open  dnp

service iredapd restart works fine, but in the status the below shows:
root@mail:~# service iredapd status
● iredapd.service - LSB: Control iredapd daemon.
   Loaded: loaded (/etc/init.d/iredapd; bad; vendor preset: enabled)
   Active: active (exited) since Tue 2018-03-06 11:37:19 SAST; 23min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 3440 ExecStart=/etc/init.d/iredapd start (code=exited, status=0/SUCCESS)

Mar 06 11:37:19 mail systemd[1]: Starting LSB: Control iredapd daemon....
Mar 06 11:37:19 mail iredapd[3440]: Starting iredapd ...
Mar 06 11:37:19 mail iredapd[3440]: Traceback (most recent call last):
Mar 06 11:37:19 mail iredapd[3440]:   File "/opt/iredapd/iredapd.py", line 22, in <module>
Mar 06 11:37:19 mail iredapd[3440]:     import settings
Mar 06 11:37:19 mail iredapd[3440]: ImportError: No module named settings
Mar 06 11:37:19 mail systemd[1]: Started LSB: Control iredapd daemon..

----

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

2

Re: iRedApd Help!!!

I am also receiving this feedback to my postmaster account, if this provides any more detail:

Cron <root@mail> python /opt/iredapd/tools/spf_to_greylist_whitelists.py >/dev/null
Traceback (most recent call last):
File "/opt/iredapd/tools/spf_to_greylist_whitelists.py", line 72, in <module>
from tools import logger, get_db_conn
File "/opt/iredapd/tools/../tools/__init__.py", line 21, in <module>
backend = settings.backend

Cron <root@mail> python /opt/iredapd/tools/cleanup_db.py >/dev/null
Traceback (most recent call last):
File "/opt/iredapd/tools/cleanup_db.py", line 16, in <module>
import settings
ImportError: No module named settings
AttributeError: 'module' object has no attribute 'backend'

3

Re: iRedApd Help!!!

Copy /opt/iredapd/settings.py.sample to /opt/iredapd/settings.py, then open settings.py to update SQL/LDAP related settings. You may need to update some other parameters too, please check one by one.

4

Re: iRedApd Help!!!

Hey Zhang,

Thanks so much!!

Copied the file as you said, updated db settings for vmail, iredapd and amavis, restarted iredapd, did an nmap and saw that port 7777 was open again. Then edited postfix main config, uncommented the checks, restarted postfix and all seems to be working again!

Just a question, do i need to copy any of the configurations from the defaul_settings.py file from the libs folder, or will iredApd run as expected like this?

Thanks for the help!

5

Re: iRedApd Help!!!

tayzee wrote:

Just a question, do i need to copy any of the configurations from the defaul_settings.py file from the libs folder, or will iredApd run as expected like this?

If you need to modify any settings defined in "/opt/iredapd/libs/default_settings.py", just copy that parameter and append it to "/opt/iredapd/settings.py", then set a new value, restart iRedAPD service.

*) Settings defined in /opt/iredapd/settings.py will override the same one in /opt/iredapd/libs/default_settings.py.
*) Config file "/opt/iredapd/settings.py" will be copied while upgrading iRedAPD, so all your custom settings will be kept after upgrading.