1 (edited by yes298 2015-12-30 11:49:26)

Topic: Error Messager for Out of Office Message

======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.92
- Linux/BSD distribution name and version: CentOS 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro? no
- Related log if you're reporting an issue:
====


Hi Huangbin,

Need  you help again. I have two email servers for different domains.
abc.com, 192.168.1.1
efg.com, 192.168.1.2

Each server has one public IP and connect to a same Firewall, already setup the smart host on both server for transport_maps setting by referring your below post.
http://www.iredmail.org/forum/topic1021 … -host.html

I also disable Greylisting, and completely disable "Amavisd + ClamAV + SpamAssassin" by referring your below document
http://www.iredmail.org/docs/completely … assin.html

On both servers, I modify "/etc/postfix/main.cf" as below
            mynetworks = 127.0.0.1, 192.168.0.0/16

Currently, no problem for sending email via private IP directly between abc.com and efg.com.

But when I setup & enable "Out of Office" auto-reply message from webmail for user peter@abc.com,
I got below error message on server efg.com when user mary@efg.com send a email to peter@abc.com

 NOQUEUE: reject: RCPT from unknown[192.168.1.1]: 554 5.7.1 <mary@efg.com>: Recipient address rejected: Policy rejection; from=<> to=<mary@efg.com> proto=ESMTP helo=<webmail.abc.com> 

What I do to fix it?

BTW, some emails still add ***SPAM*** at the beginning of subject on JUNK folder but already disabled SpamAssassin?

Thanks alot for your always support!!!

[root@webmail ~]# netstat -nptul
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:10025         0.0.0.0:*               LISTEN      10870/master
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      2282/mysqld
tcp        0      0 0.0.0.0:587             0.0.0.0:*               LISTEN      10870/master
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN      1643/dovecot
tcp        0      0 127.0.0.1:10031         0.0.0.0:*               LISTEN      2792/perl
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN      1643/dovecot
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      2534/nginx: master
tcp        0      0 127.0.0.1:24            0.0.0.0:*               LISTEN      1643/dovecot
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      10870/master
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      2534/nginx: master
tcp        0      0 127.0.0.1:4190          0.0.0.0:*               LISTEN      1643/dovecot
tcp        0      0 127.0.0.1:7777          0.0.0.0:*               LISTEN      2008/python
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN      1643/dovecot
tcp        0      0 0.0.0.0:995             0.0.0.0:*               LISTEN      1643/dovecot
tcp6       0      0 :::110                  :::*                    LISTEN      1643/dovecot
tcp6       0      0 :::143                  :::*                    LISTEN      1643/dovecot
tcp6       0      0 :::993                  :::*                    LISTEN      1643/dovecot
tcp6       0      0 :::995                  :::*                    LISTEN      1643/dovecot

----

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

2

Re: Error Messager for Out of Office Message

yes298 wrote:

But when I setup & enable "Out of Office" auto-reply message from webmail for user peter@abc.com,

This issue was mentioned in upgrade tutorial for iRedMail-0.9.1:
http://www.iredmail.org/docs/upgrade.ir … ull_sender

The Roundcube setting "$config['mdn_use_from'] = true;" is enabled since iRedMail-0.9.1, not sure why you doesn't have it.

3

Re: Error Messager for Out of Office Message

Hi HuangBin,

Thanks a lot.
By checking, actually, both servers are enabled that as below by default, but don't know why it's not working?
$config['mdn_use_from'] = true;

if I don't want to disable iRedAPD plugin reject_null_sender in /opt/iredapd/settings.py, any ideas to fix this problem?

BTW, some emails still add ***SPAM*** at the beginning of subject on JUNK folder but already disabled SpamAssassin? how to completely to disable it? Thank you!

4

Re: Error Messager for Out of Office Message

yes298 wrote:

if I don't want to disable iRedAPD plugin reject_null_sender in /opt/iredapd/settings.py, any ideas to fix this problem?

If you disable 'reject_null_sender', this issue won't happen.

yes298 wrote:

BTW, some emails still add ***SPAM*** at the beginning of subject on JUNK folder but already disabled SpamAssassin? how to completely to disable it? Thank you!

How did you disable SpamAssassin? Please follow our tutorial below:
http://www.iredmail.org/docs/disable.sp … mails.html
http://www.iredmail.org/docs/completely … assin.html

5

Re: Error Messager for Out of Office Message

Hi HuangBin,
Thanks for your quick reply.

I know it's working if I disable iRedAPD plugin reject_null_sender in /opt/iredapd/settings.py, and made the testing, the problem fixed. I don't want to disable it early just because your document mentions the risk of without plugin reject_null_sender.

iRedAPD plugin reject_null_sender rejects message submitted by sasl authenticated user but with null sender in From: header (from=<> in Postfix log). If your user's password was cracked by spammer, spammer can use this account to bypass smtp authentication, but with a null sender in From: header, throttling won't be triggered.

As for issue of "SPAM" email, I already followed your guide of below link
http://www.iredmail.org/docs/completely … assin.html

Completely disable all features

If you want to completely disable spam and virus scanning services, steps:
•Comment out below two lines in Postfix config file /etc/postfix/main.cf, then restart Postfix service.
content_filter = smtp-amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings  # <- it's ok if you don't have this line

•Disable network services: Amavisd, ClamAV.

But seems not working.

[root@webmail ~]# netstat -ntpul
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:10025         0.0.0.0:*               LISTEN      2708/master
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      2450/mysqld
tcp        0      0 0.0.0.0:587             0.0.0.0:*               LISTEN      2708/master
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN      1384/dovecot
tcp        0      0 127.0.0.1:10031         0.0.0.0:*               LISTEN      2732/perl
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN      1384/dovecot
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      2637/nginx: master
tcp        0      0 127.0.0.1:24            0.0.0.0:*               LISTEN      1384/dovecot
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      2708/master
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      2637/nginx: master
tcp        0      0 127.0.0.1:4190          0.0.0.0:*               LISTEN      1384/dovecot
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN      1384/dovecot
tcp        0      0 127.0.0.1:7777          0.0.0.0:*               LISTEN      705/python
tcp        0      0 0.0.0.0:995             0.0.0.0:*               LISTEN      1384/dovecot
tcp6       0      0 :::110                  :::*                    LISTEN      1384/dovecot
tcp6       0      0 :::143                  :::*                    LISTEN      1384/dovecot
tcp6       0      0 :::993                  :::*                    LISTEN      1384/dovecot
tcp6       0      0 :::995                  :::*                    LISTEN      1384/dovecot

6

Re: Error Messager for Out of Office Message

yes298 wrote:

But when I setup & enable "Out of Office" auto-reply message from webmail for user peter@abc.com,
I got below error message on server efg.com when user mary@efg.com send a email to peter@abc.com

Do you use Roundcube webmail to setup "out of office" or SOGo?

yes298 wrote:

As for issue of "SPAM" email, I already followed your guide of below link
http://www.iredmail.org/docs/completely … assin.html

Just updated this document, one more file need to be updated:

Comment out below line in Postfix config file /etc/postfix/master.cf,

  -o content_filter=smtp-amavis:[127.0.0.1]:10026

7

Re: Error Messager for Out of Office Message

Hi HuangBin,
Yes, I setup "Out of Office" on Roundcube webmail.
And certainly that problem is fixed if disable iRedAPD plugin reject_null_sender in /opt/iredapd/settings.py.

For iRedMail version 0.92, by default, it already Comment out below line in Postfix config file /etc/postfix/master.cf,

-o content_filter=smtp-amavis:[127.0.0.1]:10026

8

Re: Error Messager for Out of Office Message

I'm confused.

With "$config['mdn_use_from'] = true;" in Roundcube config file, out-of-office message will be sent as specified sender address, so the 'From:' address is not empty. This will make it work with iRedAPD plugin 'reject_null_sender'.

Please turn on debug mode in iRedAPD and reproduce this issue, extract FULL log related to this error in iRedAPD log file, paste here.

Reference:
http://www.iredmail.org/docs/debug.iredapd.html

9

Re: Error Messager for Out of Office Message

HI HuangBin,
On both servers with iRedMail version 0.92, I resumed to default setting --> enable iRedAPD plugin reject_null_sender in /opt/iredapd/settings.py. And, I never made any change for setting "$config['mdn_use_from'] = true;" in Roundcube config file.

As a result, no auto-response message receive.

Sender: mary@efg.com
recipient:  peter@abc.com, enable "Out of Office" via Roundcube Webmail.

maillog on Sender Server

Jan  7 09:40:34 webmail postfix/qmgr[2705]: AFC35303: from=<mary@efg.com>, size=5567, nrcpt=1 (queue active)
Jan  7 09:40:34 webmail postfix/smtpd[1747]: disconnect from unknown[192.168.2.251]
Jan  7 09:40:34 webmail postfix/pickup[32656]: D3A1F100127: uid=2000 from=<>
Jan  7 09:40:34 webmail postfix/cleanup[1479]: D3A1F100127: message-id=<dovecot-sieve-1452130834-793589-0@webmail.abc.com>
Jan  7 09:40:34 webmail postfix/qmgr[2705]: D3A1F100127: from=<>, size=677, nrcpt=1 (queue active)
Jan  7 09:40:34 webmail postfix/pipe[16745]: AFC35303: to=<peter@abc.com>, relay=dovecot, delay=0.28, delays=0.09/0/0/0.18, dsn=2.0.0, status=sent (delivered via dovecot service)
Jan  7 09:40:34 webmail postfix/qmgr[2705]: AFC35303: removed
Jan  7 09:40:35 webmail postfix/smtp[16864]: D3A1F100127: to=<mary@efg.com>, relay=192.168.2.251[192.168.2.251]:25, delay=0.19, delays=0.06/0.02/0.05/0.06, dsn=5.7.1, status=bounced (host 192.168.2.251[192.168.2.251] said: 554 5.7.1 <mary@efg.com>: Recipient address rejected: Policy rejection (in reply to RCPT TO command))

iredapd.log on Sender server

2016-01-07 09:40:35 DEBUG smtp session: request=smtpd_access_policy
2016-01-07 09:40:35 DEBUG smtp session: protocol_state=RCPT
2016-01-07 09:40:35 DEBUG smtp session: protocol_name=ESMTP
2016-01-07 09:40:35 DEBUG smtp session: client_address=192.168.2.183
2016-01-07 09:40:35 DEBUG smtp session: client_name=unknown
2016-01-07 09:40:35 DEBUG smtp session: reverse_client_name=unknown
2016-01-07 09:40:35 DEBUG smtp session: helo_name=PC062
2016-01-07 09:40:35 DEBUG smtp session: sender=mary@efg.com
2016-01-07 09:40:35 DEBUG smtp session: recipient=peter@abc.com
2016-01-07 09:40:35 DEBUG smtp session: recipient_count=0
2016-01-07 09:40:35 DEBUG smtp session: queue_id=
2016-01-07 09:40:35 DEBUG smtp session: instance=2ba3.568dc213.5cf0.0
2016-01-07 09:40:35 DEBUG smtp session: size=0
2016-01-07 09:40:35 DEBUG smtp session: etrn_domain=
2016-01-07 09:40:35 DEBUG smtp session: stress=
2016-01-07 09:40:35 DEBUG smtp session: sasl_method=LOGIN
2016-01-07 09:40:35 DEBUG smtp session: sasl_username=mary@efg.com
2016-01-07 09:40:35 DEBUG smtp session: sasl_sender=
2016-01-07 09:40:35 DEBUG smtp session: ccert_subject=
2016-01-07 09:40:35 DEBUG smtp session: ccert_issuer=
2016-01-07 09:40:35 DEBUG smtp session: ccert_fingerprint=
2016-01-07 09:40:35 DEBUG smtp session: ccert_pubkey_fingerprint=
2016-01-07 09:40:35 DEBUG smtp session: encryption_protocol=TLSv1
2016-01-07 09:40:35 DEBUG smtp session: encryption_cipher=ECDHE-RSA-AES256-SHA
2016-01-07 09:40:35 DEBUG smtp session: encryption_keysize=256
2016-01-07 09:40:35 DEBUG --> Apply plugin: reject_null_sender
2016-01-07 09:40:35 DEBUG <-- Result: DUNNO
2016-01-07 09:40:35 DEBUG Skip plugin: amavisd_message_size_limit (protocol_state != RCPT)
2016-01-07 09:40:35 DEBUG --> Apply plugin: amavisd_wblist
2016-01-07 09:40:35 DEBUG Possible policy senders: ['@.', 'mary@efg.com', '@efg.com', '@.efg.com', '@com.hk', '@.com.hk', '@hk', '@.hk', '192.168.2.183', '*.*.2.183', '*.168.2.183', '*.*.*.183', '192.*.*.*', '192.*.2.183', '192.168.*.*', '192.*.*.183', '192.168.*.183', '192.168.2.*', '*.*.*.*']
2016-01-07 09:40:35 DEBUG Possible policy recipients: ['@.', 'peter@abc.com', '@abc.com', '@.abc.com', '@com', '@.com', 'it_test@*']
2016-01-07 09:40:35 DEBUG SQL: Get policy senders: SELECT id,email FROM mailaddr WHERE email IN ('@.', 'mary@efg.com', '@efg.com', '@.efg.com', '@com.hk', '@.com.hk', '@hk', '@.hk', '192.168.2.183', '*.*.2.183', '*.168.2.183', '*.*.*.183', '192.*.*.*', '192.*.2.183', '192.168.*.*', '192.*.*.183', '192.168.*.183', '192.168.2.*', '*.*.*.*') ORDER BY priority DESC
2016-01-07 09:40:35 DEBUG No senders found in SQL database.
2016-01-07 09:40:35 DEBUG <-- Result: DUNNO
2016-01-07 09:40:35 DEBUG --> Apply plugin: sql_alias_access_policy
2016-01-07 09:40:35 DEBUG SQL: query access policy: SELECT accesspolicy, goto, moderators
2016-01-07 09:40:35 DEBUG SQL: record: None
2016-01-07 09:40:35 DEBUG <-- Result: DUNNO (Not a mail alias account)
2016-01-07 09:40:35 INFO [192.168.2.183] RCPT, mary@efg.com -> peter@abc.com, DUNNO
2016-01-07 09:40:35 DEBUG Session ended
2016-01-07 09:40:35 DEBUG smtp session: request=smtpd_access_policy
2016-01-07 09:40:35 DEBUG smtp session: protocol_state=END-OF-MESSAGE
2016-01-07 09:40:35 DEBUG smtp session: protocol_name=ESMTP
2016-01-07 09:40:35 DEBUG smtp session: client_address=192.168.2.183
2016-01-07 09:40:35 DEBUG smtp session: client_name=unknown
2016-01-07 09:40:35 DEBUG smtp session: reverse_client_name=unknown
2016-01-07 09:40:35 DEBUG smtp session: helo_name=PC062
2016-01-07 09:40:35 DEBUG smtp session: sender=mary@efg.com
2016-01-07 09:40:35 DEBUG smtp session: recipient=peter@abc.com
2016-01-07 09:40:35 DEBUG smtp session: recipient_count=1
2016-01-07 09:40:35 DEBUG smtp session: queue_id=14B6C104260
2016-01-07 09:40:35 DEBUG smtp session: instance=2ba3.568dc213.5cf0.0
2016-01-07 09:40:35 DEBUG smtp session: size=5181
2016-01-07 09:40:35 DEBUG smtp session: etrn_domain=
2016-01-07 09:40:35 DEBUG smtp session: stress=
2016-01-07 09:40:35 DEBUG smtp session: sasl_method=LOGIN
2016-01-07 09:40:35 DEBUG smtp session: sasl_username=mary@efg.com
2016-01-07 09:40:35 DEBUG smtp session: sasl_sender=
2016-01-07 09:40:35 DEBUG smtp session: ccert_subject=
2016-01-07 09:40:35 DEBUG smtp session: ccert_issuer=
2016-01-07 09:40:35 DEBUG smtp session: ccert_fingerprint=
2016-01-07 09:40:35 DEBUG smtp session: ccert_pubkey_fingerprint=
2016-01-07 09:40:35 DEBUG smtp session: encryption_protocol=TLSv1
2016-01-07 09:40:35 DEBUG smtp session: encryption_cipher=ECDHE-RSA-AES256-SHA
2016-01-07 09:40:35 DEBUG smtp session: encryption_keysize=256
2016-01-07 09:40:35 DEBUG Skip plugin: reject_null_sender (protocol_state != END-OF-MESSAGE)
2016-01-07 09:40:35 DEBUG --> Apply plugin: amavisd_message_size_limit
2016-01-07 09:40:35 DEBUG Message size: 5181
2016-01-07 09:40:35 DEBUG Getting applicable policies
2016-01-07 09:40:35 DEBUG Valid policy accounts for recipient peter@abc.com: 'peter@abc.com', '@abc.com', '@.abc.com', '@.'
2016-01-07 09:40:35 DEBUG SELECT policy_name,message_size_limit
2016-01-07 09:40:35 DEBUG No policy found.
2016-01-07 09:40:35 DEBUG <-- Result: DUNNO
2016-01-07 09:40:35 DEBUG Skip plugin: amavisd_wblist (protocol_state != END-OF-MESSAGE)
2016-01-07 09:40:35 DEBUG Skip plugin: sql_alias_access_policy (protocol_state != END-OF-MESSAGE)
2016-01-07 09:40:35 INFO [192.168.2.183] END-OF-MESSAGE, mary@efg.com -> peter@abc.com, DUNNO
2016-01-07 09:40:35 DEBUG Session ended
2016-01-07 09:40:35 DEBUG smtp session: request=smtpd_access_policy
2016-01-07 09:40:35 DEBUG smtp session: protocol_state=RCPT
2016-01-07 09:40:35 DEBUG smtp session: protocol_name=ESMTP
2016-01-07 09:40:35 DEBUG smtp session: client_address=192.168.2.252
2016-01-07 09:40:35 DEBUG smtp session: client_name=unknown
2016-01-07 09:40:35 DEBUG smtp session: reverse_client_name=unknown
2016-01-07 09:40:35 DEBUG smtp session: helo_name=webmail.abc.com
2016-01-07 09:40:35 DEBUG smtp session: sender=
2016-01-07 09:40:35 DEBUG smtp session: recipient=mary@efg.com
2016-01-07 09:40:35 DEBUG smtp session: recipient_count=0
2016-01-07 09:40:35 DEBUG smtp session: queue_id=
2016-01-07 09:40:35 DEBUG smtp session: instance=650e.568dc213.7e899.0
2016-01-07 09:40:35 DEBUG smtp session: size=677
2016-01-07 09:40:35 DEBUG smtp session: etrn_domain=
2016-01-07 09:40:35 DEBUG smtp session: stress=
2016-01-07 09:40:35 DEBUG smtp session: sasl_method=
2016-01-07 09:40:35 DEBUG smtp session: sasl_username=
2016-01-07 09:40:35 DEBUG smtp session: sasl_sender=
2016-01-07 09:40:35 DEBUG smtp session: ccert_subject=
2016-01-07 09:40:35 DEBUG smtp session: ccert_issuer=
2016-01-07 09:40:35 DEBUG smtp session: ccert_fingerprint=
2016-01-07 09:40:35 DEBUG smtp session: ccert_pubkey_fingerprint=
2016-01-07 09:40:35 DEBUG smtp session: encryption_protocol=TLSv1.2
2016-01-07 09:40:35 DEBUG smtp session: encryption_cipher=AECDH-AES256-SHA
2016-01-07 09:40:35 DEBUG smtp session: encryption_keysize=256
2016-01-07 09:40:35 DEBUG --> Apply plugin: reject_null_sender
2016-01-07 09:40:35 DEBUG Spam (no sender address or sasl_username).
2016-01-07 09:40:35 DEBUG <-- Result: REJECT Policy rejection
2016-01-07 09:40:35 DEBUG INSERT INTO log (admin, ip, msg, timestamp) VALUES ('iredapd', '192.168.2.252', 'REJECT Policy rejection ( -> mary@efg.com, reject_null_sender)', NOW());
2016-01-07 09:40:35 INFO [192.168.2.252] RCPT,  -> mary@efg.com, REJECT Policy rejection
2016-01-07 09:40:35 DEBUG Session ended

maillog on Recipient server

Jan  7 09:40:35 webmail postfix/qmgr[2710]: 14B6C104260: from=<mary@efg.com>, size=5366, nrcpt=1 (queue active)
Jan  7 09:40:35 webmail postfix/smtp[11176]: 14B6C104260: to=<peter@abc.com>, relay=192.168.2.252[192.168.2.252]:25, delay=0.28, delays=0.13/0/0.04/0.1, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as AFC35303)
Jan  7 09:40:35 webmail postfix/qmgr[2710]: 14B6C104260: removed
Jan  7 09:40:35 webmail postfix/smtpd[25870]: connect from unknown[192.168.2.252]
Jan  7 09:40:35 webmail postfix/smtpd[25870]: NOQUEUE: reject: RCPT from unknown[192.168.2.252]: 554 5.7.1 <mary@efg.com>: Recipient address rejected: Policy rejection; from=<> to=<mary@efg.com> proto=ESMTP helo=<webmail.abc.com>

iredapd.log on Recipient server

2016-01-07 09:40:34 DEBUG smtp session: request=smtpd_access_policy
2016-01-07 09:40:34 DEBUG smtp session: protocol_state=RCPT
2016-01-07 09:40:34 DEBUG smtp session: protocol_name=ESMTP
2016-01-07 09:40:34 DEBUG smtp session: client_address=192.168.2.251
2016-01-07 09:40:34 DEBUG smtp session: client_name=unknown
2016-01-07 09:40:34 DEBUG smtp session: reverse_client_name=unknown
2016-01-07 09:40:34 DEBUG smtp session: helo_name=webmail.efg.com
2016-01-07 09:40:34 DEBUG smtp session: sender=mary@efg.com
2016-01-07 09:40:34 DEBUG smtp session: recipient=peter@abc.com
2016-01-07 09:40:34 DEBUG smtp session: recipient_count=0
2016-01-07 09:40:34 DEBUG smtp session: queue_id=
2016-01-07 09:40:34 DEBUG smtp session: instance=6d3.568dc212.a5eaf.0
2016-01-07 09:40:34 DEBUG smtp session: size=5366
2016-01-07 09:40:34 DEBUG smtp session: etrn_domain=
2016-01-07 09:40:34 DEBUG smtp session: stress=
2016-01-07 09:40:34 DEBUG smtp session: sasl_method=
2016-01-07 09:40:34 DEBUG smtp session: sasl_username=
2016-01-07 09:40:34 DEBUG smtp session: sasl_sender=
2016-01-07 09:40:34 DEBUG smtp session: ccert_subject=
2016-01-07 09:40:34 DEBUG smtp session: ccert_issuer=
2016-01-07 09:40:34 DEBUG smtp session: ccert_fingerprint=
2016-01-07 09:40:34 DEBUG smtp session: ccert_pubkey_fingerprint=
2016-01-07 09:40:34 DEBUG smtp session: encryption_protocol=TLSv1.2
2016-01-07 09:40:34 DEBUG smtp session: encryption_cipher=AECDH-AES256-SHA
2016-01-07 09:40:34 DEBUG smtp session: encryption_keysize=256
2016-01-07 09:40:34 DEBUG --> Apply plugin: reject_null_sender
2016-01-07 09:40:34 DEBUG <-- Result: DUNNO
2016-01-07 09:40:34 DEBUG Skip plugin: amavisd_message_size_limit (protocol_state != RCPT)
2016-01-07 09:40:34 DEBUG --> Apply plugin: amavisd_wblist
2016-01-07 09:40:34 DEBUG Possible policy senders: ['@.', 'mary@efg.com', '@efg.com', '@.efg.com', '@com.hk', '@.com.hk', '@hk', '@.hk', '192.168.2.251', '192.*.2.251', '192.168.2.*', '*.*.*.251', '*.*.2.251', '192.*.*.*', '192.168.*.*', '192.*.*.251', '*.168.2.251', '*.*.*.*', '192.168.*.251']
2016-01-07 09:40:34 DEBUG Possible policy recipients: ['@.', 'peter@abc.com', '@abc.com', '@.abc.com', '@com', '@.com', 'it_test@*']
2016-01-07 09:40:34 DEBUG SQL: Get policy senders: SELECT id,email FROM mailaddr WHERE email IN ('@.', 'mary@efg.com', '@efg.com', '@.efg.com', '@com.hk', '@.com.hk', '@hk', '@.hk', '192.168.2.251', '192.*.2.251', '192.168.2.*', '*.*.*.251', '*.*.2.251', '192.*.*.*', '192.168.*.*', '192.*.*.251', '*.168.2.251', '*.*.*.*', '192.168.*.251') ORDER BY priority DESC
2016-01-07 09:40:34 DEBUG No senders found in SQL database.
2016-01-07 09:40:34 DEBUG <-- Result: DUNNO
2016-01-07 09:40:34 DEBUG --> Apply plugin: sql_alias_access_policy
2016-01-07 09:40:34 DEBUG SQL: query access policy: SELECT accesspolicy, goto, moderators
2016-01-07 09:40:34 DEBUG SQL: record: None
2016-01-07 09:40:34 DEBUG <-- Result: DUNNO (Not a mail alias account)
2016-01-07 09:40:34 INFO [192.168.2.251] RCPT, mary@efg.com -> peter@abc.com, DUNNO
2016-01-07 09:40:34 DEBUG Session ended
2016-01-07 09:40:34 DEBUG smtp session: request=smtpd_access_policy
2016-01-07 09:40:34 DEBUG smtp session: protocol_state=END-OF-MESSAGE
2016-01-07 09:40:34 DEBUG smtp session: protocol_name=ESMTP
2016-01-07 09:40:34 DEBUG smtp session: client_address=192.168.2.251
2016-01-07 09:40:34 DEBUG smtp session: client_name=unknown
2016-01-07 09:40:34 DEBUG smtp session: reverse_client_name=unknown
2016-01-07 09:40:34 DEBUG smtp session: helo_name=webmail.efg.com
2016-01-07 09:40:34 DEBUG smtp session: sender=mary@efg.com
2016-01-07 09:40:34 DEBUG smtp session: recipient=peter@abc.com
2016-01-07 09:40:34 DEBUG smtp session: recipient_count=1
2016-01-07 09:40:34 DEBUG smtp session: queue_id=AFC35303
2016-01-07 09:40:34 DEBUG smtp session: instance=6d3.568dc212.a5eaf.0
2016-01-07 09:40:34 DEBUG smtp session: size=5366
2016-01-07 09:40:34 DEBUG smtp session: etrn_domain=
2016-01-07 09:40:34 DEBUG smtp session: stress=
2016-01-07 09:40:34 DEBUG smtp session: sasl_method=
2016-01-07 09:40:34 DEBUG smtp session: sasl_username=
2016-01-07 09:40:34 DEBUG smtp session: sasl_sender=
2016-01-07 09:40:34 DEBUG smtp session: ccert_subject=
2016-01-07 09:40:34 DEBUG smtp session: ccert_issuer=
2016-01-07 09:40:34 DEBUG smtp session: ccert_fingerprint=
2016-01-07 09:40:34 DEBUG smtp session: ccert_pubkey_fingerprint=
2016-01-07 09:40:34 DEBUG smtp session: encryption_protocol=TLSv1.2
2016-01-07 09:40:34 DEBUG smtp session: encryption_cipher=AECDH-AES256-SHA
2016-01-07 09:40:34 DEBUG smtp session: encryption_keysize=256
2016-01-07 09:40:34 DEBUG Skip plugin: reject_null_sender (protocol_state != END-OF-MESSAGE)
2016-01-07 09:40:34 DEBUG --> Apply plugin: amavisd_message_size_limit
2016-01-07 09:40:34 DEBUG Message size: 5366
2016-01-07 09:40:34 DEBUG Getting applicable policies
2016-01-07 09:40:34 DEBUG Valid policy accounts for recipient peter@abc.com: 'peter@abc.com', '@abc.com', '@.abc.com', '@.'
2016-01-07 09:40:34 DEBUG SELECT policy_name,message_size_limit
2016-01-07 09:40:34 DEBUG No policy found.
2016-01-07 09:40:34 DEBUG <-- Result: DUNNO
2016-01-07 09:40:34 DEBUG Skip plugin: amavisd_wblist (protocol_state != END-OF-MESSAGE)
2016-01-07 09:40:34 DEBUG Skip plugin: sql_alias_access_policy (protocol_state != END-OF-MESSAGE)
2016-01-07 09:40:34 INFO [192.168.2.251] END-OF-MESSAGE, mary@efg.com -> peter@abc.com, DUNNO
2016-01-07 09:40:34 DEBUG Session ended

10

Re: Error Messager for Out of Office Message

Are you still running iRedAPD-1.6.0? Please show me full content of file /opt/iredapd/plugins/reject_null_sender.py.

Please compare it with the latest plugin in iRedAPD-1.7.0:
https://bitbucket.org/zhb/iredapd/src/d … _sender.py

11

Re: Error Messager for Out of Office Message

Sorry that don't know how to check the version for iRedAPD, pls refer to below info.
I download & setup on 28-Nov-2015 with official version 0.92 and use default setting without any upgrade up to now.

# Author: Zhang Huangbin <zhb _at_ iredmail.org>
#
# Purpose: Reject message submitted by sasl authenticated user but specifying
#          null sender in 'From:' header (from=<> in Postfix log).
#
#          If your user's password was cracked by spammer, spammer can use
#          this account to bypass smtp authentication, but with a null sender
#          in 'From:' header, throttling won't be triggered.
#
# How to use this plugin:
#
# *) Enable this plugin in iRedAPD config file /opt/iredapd/settings.py:
#
#    plugins = ['reject_null_sender', ...]
#
# *) Restart iRedAPD service.

import logging
from libs import SMTP_ACTIONS


def restriction(**kwargs):
    sender = kwargs['sender']
    sasl_username = kwargs['sasl_username']

    if not (sender or sasl_username):
        logging.debug('Spam (no sender address or sasl_username).')
        return SMTP_ACTIONS['reject']

    if sasl_username and not sender:
        logging.debug('Spam (authenticated as %s but sender is null).' % sasl_username)
        return SMTP_ACTIONS['reject']

    return SMTP_ACTIONS['default']

12

Re: Error Messager for Out of Office Message

yes298 wrote:

    if not (sender or sasl_username):
        logging.debug('Spam (no sender address or sasl_username).')
        return SMTP_ACTIONS['reject']

Remove above lines in /opt/iredapd/plugins/reject_null_sender.py, restart iRedAPD service, and try again. It should work now.

13

Re: Error Messager for Out of Office Message

Hi Huangbin,

Thanks a lot and sorry for the delayed reply.
Will try later.
About the SPAM issue, any solution can suggest? thank you!

14

Re: Error Messager for Out of Office Message

yes298 wrote:

About the SPAM issue, any solution can suggest?

Please show us related settings mentioned in our tutorial below, so that we can help troubleshoot:
http://www.iredmail.org/docs/disable.sp … mails.html

15 (edited by yes298 2016-01-13 16:25:16)

Re: Error Messager for Out of Office Message

Thanks, HuangBin, pls refer to below. But actually, early I already followed your guide of below link to "Completely disable Amavisd + ClamAV + SpamAssassin". it seems not working 100% since found few incoming emails marking "*** SPAM" on subject and auto-move to "Junk" folder but up to now, no outgoing emails found same problem. Pls advise detailed steps to fix this, thanks a lot!!!
http://www.iredmail.org/docs/completely … assin.html

$policy_bank{'ORIGINATING'} = {  # mail supposedly originating from our users
  originating => 1,  # declare that mail was submitted by our smtp client
  allow_disclaimers => 1,  # enables disclaimer insertion if available
  # notify administrator of locally originating malware
  virus_admin_maps => ["virusalert\@$mydomain"],
  spam_admin_maps  => ["virusalert\@$mydomain"],
  warnbadhsender   => 1,
  # forward to a smtpd service providing DKIM signing service
  forward_method => 'smtp:[127.0.0.1]:10027',
  # force MTA conversion to 7-bit (e.g. before DKIM signing)
  smtpd_discard_ehlo_keywords => ['8BITMIME'],
  bypass_banned_checks_maps => [1],  # allow sending any file names and types
  terminate_dsn_on_notify_success => 0,  # don't remove NOTIFY=SUCCESS option
};

16

Re: Error Messager for Out of Office Message

If you comment out all 'content_filter =' in /etc/postfix/main.cf AND /etc/postfix/master.cf,Postfix won't pipe email to Amavisd at all, so no SA/ClamAV will be invoked.

Could you please show us output of command below:

grep 'content_filter' /etc/postfix/main.cf /etc/postfix/master.cf

17

Re: Error Messager for Out of Office Message

Hi, HuangBin, pls see below, thanks!

[root@webmail log]# grep 'content_filter' /etc/postfix/main.cf /etc/postfix/master.cf
/etc/postfix/main.cf:#content_filter = smtp-amavis:[127.0.0.1]:10024
/etc/postfix/master.cf:#  -o content_filter=smtp-amavis:[127.0.0.1]:10026
/etc/postfix/master.cf:    -o content_filter=

18

Re: Error Messager for Out of Office Message

With content_filter= commented out (or empty), Amavisd won't be invoked, so amavisd + SA won't insert '**SPAM**' in mail subject at all.

19 (edited by yes298 2016-01-15 11:49:36)

Re: Error Messager for Out of Office Message

Yes...
so it's too strange...
Don't know why? And how to fix...

20

Re: Error Messager for Out of Office Message

No idea yet. sorry.