1

Topic: 版更後 出現 "users are willing to receive notification email"

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer? installer
- Linux/BSD distribution name and version: CentOS 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? 3.8 (LDAP)
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hi 版主:
7月 15 18:30 版更後 ,一直出現下列訊息:
查看各user 的信箱 也沒有收到 notification email.
PS: 有3個 domain 合計為 131 uses ; 非 messages 裡的 133 users , 怎會這樣?


# egrep 'are willing to receive notification email' /var/log/messages

Jul 15 18:30:02 mail journal: iredadmin INFO: 133 users are willing to receive notification email. (file=/opt/www/iredadmin/tools/notify_quarantined_recipients.py, line=233
Jul 15 21:30:01 mail journal: iredadmin INFO: 133 users are willing to receive notification email. (file=/opt/www/iredadmin/tools/notify_quarantined_recipients.py, line=233
Jul 16 00:30:01 mail journal: iredadmin INFO: 133 users are willing to receive notification email. (file=/opt/www/iredadmin/tools/notify_quarantined_recipients.py, line=233
Jul 16 03:30:02 mail journal: iredadmin INFO: 133 users are willing to receive notification email. (file=/opt/www/iredadmin/tools/notify_quarantined_recipients.py, line=233
Jul 16 06:30:01 mail journal: iredadmin INFO: 133 users are willing to receive notification email. (file=/opt/www/iredadmin/tools/notify_quarantined_recipients.py, line=233
Jul 16 09:30:01 mail journal: iredadmin INFO: 133 users are willing to receive notification email. (file=/opt/www/iredadmin/tools/notify_quarantined_recipients.py, line=233
Jul 16 12:30:01 mail journal: iredadmin INFO: 133 users are willing to receive notification email. (file=/opt/www/iredadmin/tools/notify_quarantined_recipients.py, line=233
Jul 16 15:30:01 mail journal: iredadmin INFO: 133 users are willing to receive notification email. (file=/opt/www/iredadmin/tools/notify_quarantined_recipients.py, line=233
Jul 16 18:30:01 mail journal: iredadmin INFO: 133 users are willing to receive notification email. (file=/opt/www/iredadmin/tools/notify_quarantined_recipients.py, line=233
Jul 16 21:30:01 mail journal: iredadmin INFO: 133 users are willing to receive notification email. (file=/opt/www/iredadmin/tools/notify_quarantined_recipients.py, line=233
Jul 17 00:30:01 mail journal: iredadmin INFO: 133 users are willing to receive notification email. (file=/opt/www/iredadmin/tools/notify_quarantined_recipients.py, line=233
Jul 17 03:30:01 mail journal: iredadmin INFO: 133 users are willing to receive notification email. (file=/opt/www/iredadmin/tools/notify_quarantined_recipients.py, line=233
Jul 17 06:30:01 mail journal: iredadmin INFO: 133 users are willing to receive notification email. (file=/opt/www/iredadmin/tools/notify_quarantined_recipients.py, line=233
Jul 17 09:30:01 mail journal: iredadmin INFO: 133 users are willing to receive notification email. (file=/opt/www/iredadmin/tools/notify_quarantined_recipients.py, line=233

# ll /opt/www/
總計 16
drwxr-xr-x   2 root      root         6  4月  1 14:22 html
lrwxrwxrwx   1 root      root        22  7月 15 16:55 iredadmin -> iRedAdmin-Pro-LDAP-3.8
dr-xr-xr-x. 11 iredadmin iredadmin 4096  3月  7 10:09 iRedAdmin-0.9.4
dr-xr-xr-x  11 iredadmin iredadmin 4096  3月  7 11:01 iRedAdmin-0.9.5
dr-xr-xr-x  13 iredadmin iredadmin  317  3月  7 12:01 iRedAdmin-Pro-LDAP-3.3
dr-xr-xr-x  13 iredadmin iredadmin  317  4月 16 13:01 iRedAdmin-Pro-LDAP-3.4
dr-xr-xr-x  13 iredadmin iredadmin  317  4月 24 10:01 iRedAdmin-Pro-LDAP-3.5
dr-xr-xr-x  13 iredadmin iredadmin  317  4月 29 15:01 iRedAdmin-Pro-LDAP-3.6
dr-xr-xr-x  13 iredadmin iredadmin  317  7月  8 22:50 iRedAdmin-Pro-LDAP-3.7
dr-xr-xr-x  13 iredadmin iredadmin 4096  7月 15 18:30 iRedAdmin-Pro-LDAP-3.8
lrwxrwxrwx   1 root      root        28  4月  1 11:48 roundcubemail -> /opt/www/roundcubemail-1.3.9
drwxr-xr-x. 13 root      root      4096  2月 14 11:30 roundcubemail-1.3.8
drwxr-xr-x  13 root      root       322  4月  1 11:47 roundcubemail-1.3.9

2

Re: 版更後 出現 "users are willing to receive notification email"

rain6966 wrote:

7月 15 18:30 版更後 ,一直出現下列訊息:
查看各user 的信箱 也沒有收到 notification email.

请尝试手工执行一下这个脚本,估计是有错误。

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

3 (edited by rain6966 2019-07-17 16:56:05)

Re: 版更後 出現 "users are willing to receive notification email"

Hi 版主:
手動執行 log 如下:
# python /opt/www/iredadmin/tools/notify_quarantined_recipients.py
* 2 users are willing to receive notification email.
# python /opt/www/iredadmin/tools/notify_quarantined_recipients.py --force-all
* 133 users are willing to receive notification email.
# python /opt/www/iredadmin/tools/notify_quarantined_recipients.py --force-all-time
* 2 users are willing to receive notification email.
# python /opt/www/iredadmin/tools/notify_quarantined_recipients.py  --notify-backupmx
* 2 users are willing to receive notification email.

messages log:
Jul 17 16:42:50 mail journal: iredadmin INFO: 2 users are willing to receive notification email. (file=/opt/www/iredadmin/tools/notify_quarantined_recipients.py, line=233
Jul 17 16:43:00 mail journal: iredadmin INFO: 133 users are willing to receive notification email. (file=/opt/www/iredadmin/tools/notify_quarantined_recipients.py, line=233
Jul 17 16:43:31 mail journal: iredadmin INFO: 2 users are willing to receive notification email. (file=/opt/www/iredadmin/tools/notify_quarantined_recipients.py, line=233
Jul 17 16:43:41 mail journal: iredadmin INFO: 2 users are willing to receive notification email. (file=/opt/www/iredadmin/tools/notify_quarantined_recipients.py, line=233

參照:https://docs.iredmail.org/quarantining.html#notify-users-about-quarantined-mails
"Update Amavisd policy settings"  這步驟未執行 ; 更新 amavisd 的資料庫後 , 重新啟動 iredadmin ,還是上面訊息.

Thanks.

4

Re: 版更後 出現 "users are willing to receive notification email"

- Postfix log 里是否有记录该脚本实际发出了一些通知邮件给用户?
- 是否实际有一些邮件被 quarantined?

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

5

Re: 版更後 出現 "users are willing to receive notification email"

Hi 版主:

郵件訊息提示功能現已正常了. 感謝.

因系統重裝 , 我未把其設定啟用, 參考官網文件 Quarantining ,
因還少了"Quarantine clean emails" 的設定, 把其設定好後是有信件提示動作.

昨天晚上起用後, 早上所有信件皆被隔離,且users 能收到信件提示.

使用 "EICAR" 測試 , postmaster@ 會馬上收到訊息 "spam" 或"virus"
因在 amavisd.conf 裡的 $policy_bank{'ORIGINATING'} = {

預設有:
    spam_admin_maps  => ["root\@$mydomain"],
    # notify administrator of locally originating malware
    virus_admin_maps => ["root\@$mydomain"],
    spam_admin_maps  => ["root\@$mydomain"],
    bad_header_admin_maps => ["root\@$mydomain"],
    banned_admin_maps => ["root\@$mydomain"],
把其註解應該就ok , 直接由 notification email 的功能來做.

我現有個問題是 :
昨晚所有叫來的mail 皆被隔離了,spamassasin 的分數不管高低階被隔離.
連 notification email 也一樣被隔離.

PS:官網文件 Quarantining  是否應改放在 下方 "iRedAdmin-Pro"裡 , 而不是在 "How to" ?

Thanks.

6 (edited by rain6966 2019-07-19 15:39:18)

Re: 版更後 出現 "users are willing to receive notification email"

rain6966 wrote:

mail 皆被隔離了,spamassasin 的分數不管高低階被隔離.

其實users 是有收到信件,信件是沒被隔離 ;但在後端的"Quarantined Mails"欄位裡, 是有記錄 ,且可看隔離事件的內容.

剛測試mail ,發現 maillog 出現:
Jul 19 15:04:37 mail amavis[19218]: (!)loading policy bank "ORIGINATING": unknown field "final_destiny_by_ccat"

但我是按官網文件設定的 .

amavisd.conf:
$interface_policy{'10026'} = 'ORIGINATING';
$policy_bank{'ORIGINATING'} = {
    originating => 1,         # declare that mail was submitted by our smtp client
    allow_disclaimers => 1,   # enables disclaimer insertion if available
    enable_dkim_signing => 1,

    # 隔離信件通知
    clean_quarantine_method => 'sql:',
    final_destiny_by_ccat => {CC_CLEAN, D_DISCARD},


    ## notify administrator of locally originating malware
    #spam_admin_maps  => ["root\@$mydomain"],
    ## notify administrator of locally originating malware
    virus_admin_maps => ["alert\@mydomain.com"],
    spam_admin_maps  => ["alert\@mydomain.com"],
    bad_header_admin_maps => ["alert\@mysomain.com"],
    banned_admin_maps => ["alert\@mydomain.com"],
    warnbadhsender   => 0,
    warnbannedsender => 0,

    # force MTA conversion to 7-bit (e.g. before DKIM signing)
    smtpd_discard_ehlo_keywords => ['8BITMIME'],
    terminate_dsn_on_notify_success => 0,  # don't remove NOTIFY=SUCCESS option

    # Bypass checks
    #bypass_spam_checks_maps => [1],    # don't check spam
    #bypass_virus_checks_maps => [1],   # don't check virus
    #bypass_banned_checks_maps => [1],  # don't check banned file names and types
    #bypass_header_checks_maps => [1],  # don't check bad header
};


Thanks.

7

Re: 版更後 出現 "users are willing to receive notification email"

不确定是不是 amavisd 不支持这个参数了... 需要查一下 ChangeLog 或 amavisd 的 perl source code.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee