1

Topic: no daily report in postmaster inbox

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

Hello I installed iRedMail on May 17th and it is working fine. But the problem is that I cannot receive daily report in the postmaster box. Can you please tell me where to check?

In addition, yesterday at 10:00am the website didn't respond to browser but can be reached by ping or ssh. I also tried to type IP directly in the browser address bar but still got no luck. I checked /var/log/secure and /var/log/httpd/* and /var/log/maillog. but cannot find nothing special. Finally I rebooted server and problem disappeared. Would anybody tell me where to find root reason please? Thanks in advance.

----

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

2

Re: no daily report in postmaster inbox

loudking wrote:

But the problem is that I cannot receive daily report in the postmaster box. Can you please tell me where to check?

Do you have package 'logwatch' installed?

loudking wrote:

In addition, yesterday at 10:00am the website didn't respond to browser but can be reached by ping or ssh. I also tried to type IP directly in the browser address bar but still got no luck. I checked /var/log/secure and /var/log/httpd/* and /var/log/maillog. but cannot find nothing special. Finally I rebooted server and problem disappeared. Would anybody tell me where to find root reason please? Thanks in advance.

Caused by fail2ban. if your client IP address is static, you can add it in /etc/fail2ban/jail.local (ignoreip=), or, temporarily disable fail2ban service till all your clients are settle down.

3

Re: no daily report in postmaster inbox

1. yum install logwatch
Package logwatch-7.3.6-52.el6.noarch already installed and latest version
Nothing to do

Any ideas?

2. I don't think it was because of fail2ban, because if it was then I should not log in with SSH, but I could.

ZhangHuangbin wrote:
loudking wrote:

But the problem is that I cannot receive daily report in the postmaster box. Can you please tell me where to check?

Do you have package 'logwatch' installed?

loudking wrote:

In addition, yesterday at 10:00am the website didn't respond to browser but can be reached by ping or ssh. I also tried to type IP directly in the browser address bar but still got no luck. I checked /var/log/secure and /var/log/httpd/* and /var/log/maillog. but cannot find nothing special. Finally I rebooted server and problem disappeared. Would anybody tell me where to find root reason please? Thanks in advance.

Caused by fail2ban. if your client IP address is static, you can add it in /etc/fail2ban/jail.local (ignoreip=), or, temporarily disable fail2ban service till all your clients are settle down.

4

Re: no daily report in postmaster inbox

loudking wrote:

Package logwatch-7.3.6-52.el6.noarch already installed and latest version

Do you have file /etc/cron.daily/0logwatch? Did you receive email if you execute it manually?

# bash /etc/cron.daily/0logwatch
loudking wrote:

2. I don't think it was because of fail2ban, because if it was then I should not log in with SSH, but I could.

If it's triggered by smtp/imap services, Fail2ban doesn't block ssh port at all.

5

Re: no daily report in postmaster inbox

1. Command has no effect. Then I checked /var/log/maillog and found following error:

May 26 16:46:44 knowsg amavis[967]: (00967-02) NOTICE: reconnecting in response to: err=2006, HY000, DBD::mysql::st execute failed: MySQL server has gone away at (eval 112) line 172.

MySQL server is very quiet and there should be less than 10 mails per day. I checked solution in this thread

http://www.iredmail.org/forum/topic2536 … ailed.html

But it is not working because I don't have /etc/amavis/conf.d/50-users.

I also tried to search through /etc/clamd.conf, still got no luck.

Please advise.

2. How to ensure that fail2ban is triggered by smtp/imap?

ZhangHuangbin wrote:
loudking wrote:

Package logwatch-7.3.6-52.el6.noarch already installed and latest version

Do you have file /etc/cron.daily/0logwatch? Did you receive email if you execute it manually?

# bash /etc/cron.daily/0logwatch
loudking wrote:

2. I don't think it was because of fail2ban, because if it was then I should not log in with SSH, but I could.

If it's triggered by smtp/imap services, Fail2ban doesn't block ssh port at all.

6

Re: no daily report in postmaster inbox

loudking wrote:

But it is not working because I don't have /etc/amavis/conf.d/50-users.

Check which file is amavisd config file on your server:
http://www.iredmail.org/docs/file.locat … ml#amavisd

loudking wrote:

2. How to ensure that fail2ban is triggered by smtp/imap?

iRedMail has filter file /etc/dovecot/filter.d/dovecot.iredmail.conf and 'postfix.iredmail.conf', they're enabled in /etc/fail2ban/jail.local.

7

Re: no daily report in postmaster inbox

I applied changes to /etc/amavisd/amavisd.conf

$max_servers = 1;
$max_requests = 1;

before 1;

Then run

service amavisd restart
bash /etc/cron.daily/0logwatch

report still not seen in inbox of postmaster. Below is content from /var/log/maillog
May 26 19:06:49 knowsg postfix/pickup[5941]: 96C7169218FA: uid=0 from=<root>
May 26 19:06:49 knowsg postfix/cleanup[6446]: 96C7169218FA: message-id=<20150526110649.96C7169218FA@mail.knowsg.com>
May 26 19:06:49 knowsg postfix/qmgr[869]: 96C7169218FA: from=<root@mail.knowsg.com>, size=14022, nrcpt=1 (queue active)
May 26 19:06:53 knowsg postfix/smtpd[6454]: connect from mail.knowsg.com[127.0.0.1]
May 26 19:06:53 knowsg postfix/smtpd[6454]: 409206921865: client=mail.knowsg.com[127.0.0.1]
May 26 19:06:53 knowsg postfix/cleanup[6446]: 409206921865: message-id=<20150526110649.96C7169218FA@mail.knowsg.com>
May 26 19:06:53 knowsg postfix/qmgr[869]: 409206921865: from=<root@mail.knowsg.com>, size=14477, nrcpt=1 (queue active)
May 26 19:06:53 knowsg postfix/smtpd[6454]: disconnect from mail.knowsg.com[127.0.0.1]
May 26 19:06:53 knowsg amavis[6071]: (06071-01) Passed CLEAN {RelayedInternal}, MYUSERS <root@mail.knowsg.com> -> <root@mail.knowsg.com>, Message-ID: <20150526110649.96C7169218FA@mail.knowsg.com>, mail_id: HPcBrRtdyHMM, Hits: -0.001, size: 14011, queued_as: 409206921865, 3623 ms
May 26 19:06:53 knowsg postfix/smtp[6458]: 409206921865: to=<root@mail.knowsg.com>, relay=none, delay=0.03, delays=0.01/0.02/0/0, dsn=5.4.6, status=bounced (mail for mail.knowsg.com loops back to myself)
May 26 19:06:53 knowsg postfix/cleanup[6446]: 4FE9B69219C1: message-id=<20150526110653.4FE9B69219C1@mail.knowsg.com>
May 26 19:06:53 knowsg postfix/smtp[6450]: 96C7169218FA: to=<root@mail.knowsg.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=12, delays=8.1/0.03/0.01/3.6, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 409206921865)
May 26 19:06:53 knowsg postfix/qmgr[869]: 4FE9B69219C1: from=<>, size=16373, nrcpt=1 (queue active)
May 26 19:06:53 knowsg postfix/bounce[6459]: 409206921865: sender non-delivery notification: 4FE9B69219C1
May 26 19:06:53 knowsg postfix/qmgr[869]: 96C7169218FA: removed
May 26 19:06:53 knowsg postfix/qmgr[869]: 409206921865: removed
May 26 19:06:53 knowsg postfix/smtp[6458]: 4FE9B69219C1: to=<root@mail.knowsg.com>, relay=none, delay=0.01, delays=0/0/0/0, dsn=5.4.6, status=bounced (mail for mail.knowsg.com loops back to myself)
May 26 19:06:53 knowsg postfix/qmgr[869]: 4FE9B69219C1: removed

8

Re: no daily report in postmaster inbox

loudking wrote:

May 26 19:06:53 knowsg postfix/smtp[6458]: 4FE9B69219C1: to=<root@mail.knowsg.com>, relay=none, delay=0.01, delays=0/0/0/0, dsn=5.4.6, status=bounced (mail for mail.knowsg.com loops back to myself)

Do you have entry for root user in /etc/postfix/aliases?

9

Re: no daily report in postmaster inbox

root: postmaster@KnowSG.com

ZhangHuangbin wrote:
loudking wrote:

May 26 19:06:53 knowsg postfix/smtp[6458]: 4FE9B69219C1: to=<root@mail.knowsg.com>, relay=none, delay=0.01, delays=0/0/0/0, dsn=5.4.6, status=bounced (mail for mail.knowsg.com loops back to myself)

Do you have entry for root user in /etc/postfix/aliases?

10

Re: no daily report in postmaster inbox

ZhangHuangbin wrote:

mail for mail.knowsg.com loops back to myself

Show us output of command 'postconf -n' please.

11

Re: no daily report in postmaster inbox

alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
allow_min_user = no
allow_percent_hack = no
biff = no
bounce_queue_lifetime = 4h
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
delay_warning_time = 0h
disable_vrfy_command = yes
dovecot_destination_recipient_limit = 1
enable_original_recipient = no
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
lmtp_tls_mandatory_protocols = !SSLv2 !SSLv3
lmtp_tls_protocols = !SSLv2 !SSLv3
mail_owner = postfix
mailbox_command = /usr/libexec/dovecot/deliver
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
maximal_backoff_time = 4000s
maximal_queue_lifetime = 4h
message_size_limit = 15728640
minimal_backoff_time = 300s
mydestination = localhost, localhost.localdomain
mydomain = mail.knowsg.com
myhostname = mail.knowsg.com
mynetworks = 127.0.0.1
mynetworks_style = host
myorigin = mail.knowsg.com
newaliases_path = /usr/bin/newaliases.postfix
proxy_read_maps = $canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions
queue_directory = /var/spool/postfix
queue_run_delay = 300s
readme_directory = /usr/share/doc/postfix-2.11.0/README_FILES
recipient_bcc_maps = proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_user.cf, proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_domain.cf
recipient_delimiter = +
relay_domains = $mydestination, proxy:mysql:/etc/postfix/mysql/relay_domains.cf
sample_directory = /usr/share/doc/postfix-2.11.0/samples
sender_bcc_maps = proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf, proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_domain.cf
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp-amavis_destination_recipient_limit = 1
smtp_data_init_timeout = 240s
smtp_data_xfer_timeout = 600s
smtp_tls_CAfile = $smtpd_tls_CAfile
smtp_tls_loglevel = 0
smtp_tls_mandatory_protocols = !SSLv2 !SSLv3
smtp_tls_note_starttls_offer = yes
smtp_tls_protocols = !SSLv2 !SSLv3
smtp_tls_security_level = may
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:7777, check_policy_service inet:127.0.0.1:10031,
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, reject_invalid_helo_hostname, check_helo_access pcre:/etc/postfix/helo_access.pcre
smtpd_recipient_restrictions = reject_unknown_recipient_domain, reject_non_fqdn_recipient, reject_unlisted_recipient, check_policy_service inet:127.0.0.1:7777, check_policy_service inet:127.0.0.1:10031, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_reject_unlisted_recipient = yes
smtpd_reject_unlisted_sender = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = private/dovecot-auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql/sender_login_maps.cf
smtpd_sender_restrictions = reject_unknown_sender_domain, reject_non_fqdn_sender, reject_unlisted_sender, permit_mynetworks, reject_sender_login_mismatch, permit_sasl_authenticated
smtpd_tls_CAfile = /etc/pki/tls/certs/unified.crt
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/pki/tls/certs/ssl.crt
smtpd_tls_key_file = /etc/pki/tls/private/ssl.key
smtpd_tls_loglevel = 0
smtpd_tls_mandatory_protocols = !SSLv2 !SSLv3
smtpd_tls_protocols = !SSLv2 !SSLv3
smtpd_tls_security_level = may
smtpd_use_tls = yes
swap_bangpath = no
tls_random_source = dev:/dev/urandom
transport_maps = proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf, proxy:mysql:/etc/postfix/mysql/transport_maps_domain.cf
unknown_local_recipient_reject_code = 550
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql/virtual_alias_maps.cf, proxy:mysql:/etc/postfix/mysql/domain_alias_maps.cf, proxy:mysql:/etc/postfix/mysql/catchall_maps.cf, proxy:mysql:/etc/postfix/mysql/domain_alias_catchall_maps.cf
virtual_gid_maps = static:2000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql/virtual_mailbox_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql/virtual_mailbox_maps.cf
virtual_minimum_uid = 2000
virtual_transport = dovecot
virtual_uid_maps = static:2000

12

Re: no daily report in postmaster inbox

Hello, any response please?

13

Re: no daily report in postmaster inbox

Hello Any response please?

ZhangHuangbin wrote:
ZhangHuangbin wrote:

mail for mail.knowsg.com loops back to myself

Show us output of command 'postconf -n' please.

14

Re: no daily report in postmaster inbox

I have no idea. mail 'loops back to myself' is hard to troubleshoot, have to login to server and do some more tests to figure it out.
Are you willing to pay me to fix it on your server? http://www.iredmail.org/support.html