26

Re: blacklist not working (0.9.2 - 1.6.0)

mir wrote:

Is maddr not used at all when looking up wblists? And what about the policy table?

maddr is not used for wblist.

*) Amavisd @storage_sql_dsn setting uses: maddr, msgs, msgrcpt, quarantine.
*) Amavisd @lookup_sql_dsn uses: mailaddr, policy, users, wblist.

mir wrote:

I will volunteer to write such a CLI management tool. Does is need to be written in Python? I would much prefer using Perl for the task.

I prefer Python, this way we can share most source code.

----

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

27

Re: blacklist not working (0.9.2 - 1.6.0)

kmihalj wrote:

2015-06-11 12:52:59 ERROR <!> Error applying plugin amavisd_message_size_limit: local variable 'sql_valid_rcpts' referenced before assignment

Could you please show me full content of file libs/amavisd/core.py? I cannot find this syntax error.

28

Re: blacklist not working (0.9.2 - 1.6.0)

ZhangHuangbin wrote:
kmihalj wrote:

2015-06-11 12:52:59 ERROR <!> Error applying plugin amavisd_message_size_limit: local variable 'sql_valid_rcpts' referenced before assignment

Could you please show me full content of file libs/amavisd/core.py? I cannot find this syntax error.

There is no error, ... I didn't apply patch correctly.... all is working now smile

29

Re: blacklist not working (0.9.2 - 1.6.0)

kmihalj wrote:

There is no error, ... I didn't apply patch correctly.... all is working now

OK, let me know whether or not it works for you.

30

Re: blacklist not working (0.9.2 - 1.6.0)

ZhangHuangbin wrote:

OK, let me know whether or not it works for you

No errors in hour .... so everything is working fine

31

Re: blacklist not working (0.9.2 - 1.6.0)

here is a log entry for 126.com, you can see its to my domain dco.me, this has a catchall to my other domain where I receive the emails, in the WBLIST I have @.126.com

the email appears in my inbox as from postmaster@126.com

2015-06-11 12:46:32 DEBUG Session ended
2015-06-11 12:47:04 DEBUG smtp session: request=smtpd_access_policy
2015-06-11 12:47:04 DEBUG smtp session: protocol_state=RCPT
2015-06-11 12:47:04 DEBUG smtp session: protocol_name=ESMTP
2015-06-11 12:47:04 DEBUG smtp session: client_address=220.181.15.196
2015-06-11 12:47:04 DEBUG smtp session: client_name=unknown
2015-06-11 12:47:04 DEBUG smtp session: reverse_client_name=126.mxmail.netease.c                                                   om
2015-06-11 12:47:04 DEBUG smtp session: helo_name=m15-196.126.com
2015-06-11 12:47:04 DEBUG smtp session: sender=
2015-06-11 12:47:04 DEBUG smtp session: recipient=svehwbbkkl@dco.me
2015-06-11 12:47:04 DEBUG smtp session: recipient_count=0
2015-06-11 12:47:04 DEBUG smtp session: queue_id=
2015-06-11 12:47:04 DEBUG smtp session: instance=1cca.55797537.ef6fa.0
2015-06-11 12:47:04 DEBUG smtp session: size=0
2015-06-11 12:47:04 DEBUG smtp session: etrn_domain=
2015-06-11 12:47:04 DEBUG smtp session: stress=
2015-06-11 12:47:04 DEBUG smtp session: sasl_method=
2015-06-11 12:47:04 DEBUG smtp session: sasl_username=
2015-06-11 12:47:04 DEBUG smtp session: sasl_sender=
2015-06-11 12:47:04 DEBUG smtp session: ccert_subject=
2015-06-11 12:47:04 DEBUG smtp session: ccert_issuer=
2015-06-11 12:47:04 DEBUG smtp session: ccert_fingerprint=
2015-06-11 12:47:04 DEBUG smtp session: ccert_pubkey_fingerprint=
2015-06-11 12:47:04 DEBUG smtp session: encryption_protocol=
2015-06-11 12:47:04 DEBUG smtp session: encryption_cipher=
2015-06-11 12:47:04 DEBUG smtp session: encryption_keysize=0
2015-06-11 12:47:04 DEBUG --> Apply plugin: amavisd_wblist
2015-06-11 12:47:04 ERROR <!> Error applying plugin amavisd_wblist: need more th                                                   an 1 value to unpack
2015-06-11 12:47:04 DEBUG --> Apply plugin: sql_alias_access_policy
2015-06-11 12:47:04 DEBUG SQL: query access policy: SELECT accesspolicy, goto, m                                                   oderators
            FROM alias
            WHERE
                address='svehwbbkkl@dco.me'
                AND address <> goto
                AND active=1
            LIMIT 1

2015-06-11 12:47:04 DEBUG SQL: record: None
2015-06-11 12:47:04 DEBUG <-- Result: DUNNO (Not a mail alias account)
2015-06-11 12:47:04 DEBUG --> Apply plugin: sql_user_restrictions
2015-06-11 12:47:04 DEBUG SQL to get restriction rules of sender ():
        SELECT
            allowedrecipients, rejectedrecipients,
            allowedsenders, rejectedsenders
        FROM mailbox
        WHERE username=''
        LIMIT 1

2015-06-11 12:47:04 DEBUG Returned SQL Record: None
2015-06-11 12:47:04 DEBUG SQL to get restriction rules of recipient (svehwbbkkl@                                                   dco.me):
            SELECT
                allowedrecipients, rejectedrecipients,
                allowedsenders, rejectedsenders
            FROM mailbox
            WHERE username='svehwbbkkl@dco.me'
            LIMIT 1

2015-06-11 12:47:04 DEBUG Returned SQL Record: None
2015-06-11 12:47:04 DEBUG <-- Result: DUNNO
2015-06-11 12:47:04 INFO [220.181.15.196] RCPT,  -> svehwbbkkl@dco.me, DUNNO
2015-06-11 12:47:04 DEBUG Session ended

32

Re: blacklist not working (0.9.2 - 1.6.0)

deejc wrote:

2015-06-11 12:47:04 ERROR <!> Error applying plugin amavisd_wblist: need more th                                                   an 1 value to unpack

A programming error.

Which version of iRedAPD are you running? is it the final release of iRedAPD-1.6.0? If not, please download the final release and upgrade.

33

Re: blacklist not working (0.9.2 - 1.6.0)

how can i tell which version it is ? i downloaded it via the upgrade links.

34

Re: blacklist not working (0.9.2 - 1.6.0)

*) iRedAPD version number is hard-coded in /opt/iredapd/libs/__init__.py.
*) I cannot reproduce this error.

I suggest you download iRedAPD-1.6.0 from http://www.iredmail.org/yum/misc/ then upgrade it again, to make sure you're running the final release.

35

Re: blacklist not working (0.9.2 - 1.6.0)

thanks, i did this, lets see how it goes.

* Detected Linux/BSD distribution: DEBIAN
* Found iRedAPD directory: /opt/iredapd, symbol link of /opt/iRedAPD-1.6.0
* Found iRedAPD config file: /opt/iredapd/settings.py
* Checking dependent Python modules:
  + [required] python-sqlalchemy
* Copying new version to /opt/iRedAPD-1.6.0
cp: `/opt/iredapd/settings.py' and `/opt/iRedAPD-1.6.0/settings.py' are the same file
* Removing old symbol link /opt/iredapd
* Creating symbol link /opt/iredapd to /opt/iRedAPD-1.6.0
* Copy new SysV init script.
* Add missing parameters.
* Restarting iRedAPD service.
Stopping iredapd ...
Starting iredapd ...
* Upgrade completed.
<<< NOTE >>> If iRedAPD doesn't work as expected, please post your issue in
<<< NOTE >>> our online support forum: http://www.iredmail.org/forum/
<<< NOTE >>> iRedAPD log file is /var/log/iredapd.log.

36

Re: blacklist not working (0.9.2 - 1.6.0)

ZhangHuangbin wrote:

I prefer Python, this way we can share most source code.

I have come to the same conclusion regarding sharing code.

37

Re: blacklist not working (0.9.2 - 1.6.0)

mir wrote:
ZhangHuangbin wrote:

I prefer Python, this way we can share most source code.

I have come to the same conclusion regarding sharing code.

Hi Huang,

Can I mail you directly for further clarification?

38

Re: blacklist not working (0.9.2 - 1.6.0)

still getting through, does it make a difference that i am using the free 10 user version of Pro ?

2015-06-11 20:03:55 DEBUG Session ended
2015-06-11 20:11:36 DEBUG Connect from 127.0.0.1, port 43926.
2015-06-11 20:11:36 DEBUG smtp session: request=smtpd_access_policy
2015-06-11 20:11:36 DEBUG smtp session: protocol_state=RCPT
2015-06-11 20:11:36 DEBUG smtp session: protocol_name=ESMTP
2015-06-11 20:11:36 DEBUG smtp session: client_address=220.181.15.191
2015-06-11 20:11:36 DEBUG smtp session: client_name=unknown
2015-06-11 20:11:36 DEBUG smtp session: reverse_client_name=126.mxmail.netease.com
2015-06-11 20:11:36 DEBUG smtp session: helo_name=m15-191.126.com
2015-06-11 20:11:36 DEBUG smtp session: sender=
2015-06-11 20:11:36 DEBUG smtp session: recipient=pqbheouohb@dco.me
2015-06-11 20:11:36 DEBUG smtp session: recipient_count=0
2015-06-11 20:11:36 DEBUG smtp session: queue_id=
2015-06-11 20:11:36 DEBUG smtp session: instance=3865.5579dd67.c2aff.0
2015-06-11 20:11:36 DEBUG smtp session: size=0
2015-06-11 20:11:36 DEBUG smtp session: etrn_domain=
2015-06-11 20:11:36 DEBUG smtp session: stress=
2015-06-11 20:11:36 DEBUG smtp session: sasl_method=
2015-06-11 20:11:36 DEBUG smtp session: sasl_username=
2015-06-11 20:11:36 DEBUG smtp session: sasl_sender=
2015-06-11 20:11:36 DEBUG smtp session: ccert_subject=
2015-06-11 20:11:36 DEBUG smtp session: ccert_issuer=
2015-06-11 20:11:36 DEBUG smtp session: ccert_fingerprint=
2015-06-11 20:11:36 DEBUG smtp session: ccert_pubkey_fingerprint=
2015-06-11 20:11:36 DEBUG smtp session: encryption_protocol=
2015-06-11 20:11:36 DEBUG smtp session: encryption_cipher=
2015-06-11 20:11:36 DEBUG smtp session: encryption_keysize=0
2015-06-11 20:11:36 DEBUG --> Apply plugin: amavisd_wblist
2015-06-11 20:11:36 ERROR <!> Error applying plugin amavisd_wblist: need more than 1 value to unpack
2015-06-11 20:11:36 DEBUG --> Apply plugin: sql_alias_access_policy
2015-06-11 20:11:36 DEBUG SQL: query access policy: SELECT accesspolicy, goto, moderators
            FROM alias
            WHERE
                address='pqbheouohb@dco.me'
                AND address <> goto
                AND active=1
            LIMIT 1
   
2015-06-11 20:11:36 DEBUG SQL: record: None
2015-06-11 20:11:36 DEBUG <-- Result: DUNNO (Not a mail alias account)
2015-06-11 20:11:36 DEBUG --> Apply plugin: sql_user_restrictions
2015-06-11 20:11:36 DEBUG SQL to get restriction rules of sender ():
        SELECT
            allowedrecipients, rejectedrecipients,
            allowedsenders, rejectedsenders
        FROM mailbox
        WHERE username=''
        LIMIT 1
   
2015-06-11 20:11:36 DEBUG Returned SQL Record: None
2015-06-11 20:11:36 DEBUG SQL to get restriction rules of recipient (pqbheouohb@dco.me):
            SELECT
                allowedrecipients, rejectedrecipients,
                allowedsenders, rejectedsenders
            FROM mailbox
            WHERE username='pqbheouohb@dco.me'
            LIMIT 1
       
2015-06-11 20:11:36 DEBUG Returned SQL Record: None
2015-06-11 20:11:36 DEBUG <-- Result: DUNNO
2015-06-11 20:11:36 INFO [220.181.15.191] RCPT,  -> pqbheouohb@dco.me, DUNNO
2015-06-11 20:11:36 DEBUG Session ended

39

Re: blacklist not working (0.9.2 - 1.6.0)

mir wrote:

Can I mail you directly for further clarification?

Feel free to mail me: zhb _at_ iredmail _dot_ org.

40

Re: blacklist not working (0.9.2 - 1.6.0)

deejc wrote:

still getting through, does it make a difference that i am using the free 10 user version of Pro ?

iRedAPD is independent, it doesn't matter which web admin panel you're running.

deejc wrote:

2015-06-11 20:11:36 DEBUG --> Apply plugin: amavisd_wblist
2015-06-11 20:11:36 ERROR <!> Error applying plugin amavisd_wblist: need more than 1 value to unpack

Please show me output of below command. if i cannot figure it out with this command output, is it possible to let me login to your server (via ssh) for further debugging?

# tail -10 /opt/iredapd/plugins/amavisd_wblist.py

41

Re: blacklist not working (0.9.2 - 1.6.0)

Hi,
sorry for "Very" late reply, I went on holiday and forgot about technology for a while! :-)

I have not done the above but I don't seem to get much spam now, thanks


I have a another question :

1. I am currently a user of ireadadmin pro 10 user , if I setup a new server can I still use this ?

42

Re: blacklist not working (0.9.2 - 1.6.0)

deejc wrote:

1. I am currently a user of ireadadmin pro 10 user , if I setup a new server can I still use this ?

*) Not allowed to run one iRedAdmin-Pro license on two (or more) servers. You must purchase license for each server.
*) If you mean shut down old server (the one you're serving 10 users), and run iRedAdmin-Pro on new server, that's fine.

43

Re: blacklist not working (0.9.2 - 1.6.0)

ZhangHuangbin wrote:

*) If you mean shut down old server (the one you're serving 10 users), and run iRedAdmin-Pro on new server, that's fine.

yes this is what I mean, I no longer have the install file, where may I download it ?

44

Re: blacklist not working (0.9.2 - 1.6.0)

Please send an email to 'support @ iredmail.org', let us know the current owner's email address of your lic

45

Re: blacklist not working (0.9.2 - 1.6.0)

======== Required information ====
- iRedMail version: 0.9.2  (0.9 -> 0.9.1 -> 0.9.2)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Web server (Apache or Nginx): Nginx
- Linux/BSD distribution name and version: Ubuntu 14.04.2 LTS, Trusty Tahr
- Related log if you're reporting an issue:
====

iRedAPD-1.6.0  ( 1.4.4 -> 1.5.0 -> 1.6.0) and  patch applied  from this topic for amavisd_wblist

Sometimes I see lines with errors:

2015-07-27 17:30:01 ERROR <!> Error applying plugin amavisd_wblist: need more than 1 val
ue to unpack

From iredapd.log

2015-07-27 17:30:01 DEBUG Connect from 127.0.0.1, port 52775.
2015-07-27 17:30:01 DEBUG smtp session: request=smtpd_access_policy
2015-07-27 17:30:01 DEBUG smtp session: protocol_state=RCPT
2015-07-27 17:30:01 DEBUG smtp session: protocol_name=ESMTP
2015-07-27 17:30:01 DEBUG smtp session: client_address=213.183.125.125
2015-07-27 17:30:01 DEBUG smtp session: client_name=mail.mpftomsk.ru
2015-07-27 17:30:01 DEBUG smtp session: reverse_client_name=mail.mpftomsk.ru
2015-07-27 17:30:01 DEBUG smtp session: helo_name=mail.mpftomsk.ru
2015-07-27 17:30:01 DEBUG smtp session: sender=
2015-07-27 17:30:01 DEBUG smtp session: recipient=k.tochilina@rtvtomsk.ru
2015-07-27 17:30:01 DEBUG smtp session: recipient_count=0
2015-07-27 17:30:01 DEBUG smtp session: queue_id=
2015-07-27 17:30:01 DEBUG smtp session: instance=f1c.55b61639.71103.0
2015-07-27 17:30:01 DEBUG smtp session: size=224
2015-07-27 17:30:01 DEBUG smtp session: etrn_domain=
2015-07-27 17:30:01 DEBUG smtp session: stress=
2015-07-27 17:30:01 DEBUG smtp session: sasl_method=
2015-07-27 17:30:01 DEBUG smtp session: sasl_username=
2015-07-27 17:30:01 DEBUG smtp session: sasl_sender=
2015-07-27 17:30:01 DEBUG smtp session: ccert_subject=
2015-07-27 17:30:01 DEBUG smtp session: ccert_issuer=
2015-07-27 17:30:01 DEBUG smtp session: ccert_fingerprint=
2015-07-27 17:30:01 DEBUG smtp session: ccert_pubkey_fingerprint=
2015-07-27 17:30:01 DEBUG smtp session: encryption_protocol=
2015-07-27 17:30:01 DEBUG smtp session: encryption_cipher=
2015-07-27 17:30:01 DEBUG smtp session: encryption_keysize=0
2015-07-27 17:30:01 DEBUG Skip plugin: amavisd_message_size_limit (protocol_state != RCPT)
2015-07-27 17:30:01 DEBUG --> Apply plugin: amavisd_wblist
2015-07-27 17:30:01 ERROR <!> Error applying plugin amavisd_wblist: need more than 1 value to unpack
2015-07-27 17:30:01 DEBUG --> Apply plugin: sql_alias_access_policy
2015-07-27 17:30:01 DEBUG SQL: query access policy: SELECT accesspolicy, goto, moderators
            FROM alias
            WHERE
                address='k.tochilina@rtvtomsk.ru'
                AND address <> goto
                AND active=1
            LIMIT 1

2015-07-27 17:30:01 DEBUG SQL: record: None
2015-07-27 17:30:01 DEBUG <-- Result: DUNNO (Not a mail alias account)
2015-07-27 17:30:01 INFO [213.183.125.125] RCPT,  -> k.tochilina@rtvtomsk.ru, DUNNO
2015-07-27 17:30:01 DEBUG Session ended

From mail.log :

Jul 27 17:30:01 gateway postfix/smtpd[3868]: connect from mail.mpftomsk.ru[213.183.125.125]
Jul 27 17:30:01 gateway cbpolicyd[2805]: module=Greylisting, action=defer, host=213.183.125.125, helo=mail.mpftomsk.ru, from=, to=k.tochilina@rtvtomsk.ru, reason=greylisted
Jul 27 17:30:01 gateway postfix/smtpd[3868]: NOQUEUE: reject: RCPT from mail.mpftomsk.ru
[213.183.125.125]: 451 4.7.1 <k.tochilina@rtvtomsk.ru>: Recipient address rejected: Grey
listing in effect, please come back later; from=<> to=<k.tochilina@rtvtomsk.ru> proto=ES
MTP helo=<mail.mpftomsk.ru>
Jul 27 17:30:01 gateway postfix/smtpd[3868]: disconnect from mail.mpftomsk.ru[213.183.12
5.125]

Whether that is necessary that to correct?

46

Re: blacklist not working (0.9.2 - 1.6.0)

zh wrote:

2015-07-27 17:30:01 DEBUG --> Apply plugin: amavisd_wblist
2015-07-27 17:30:01 ERROR <!> Error applying plugin amavisd_wblist: need more than 1 value to unpack

Fixed with this commit:
https://bitbucket.org/zhb/iredapd/commi … e0b50895e6

47

Re: blacklist not working (0.9.2 - 1.6.0)

I made changes (to core.py) two weeks ago.
IRedAPD was restarted.

But today:
2015-07-28 10:44:14 ERROR <!> Error applying plugin amavisd_wblist: need more than 1 value to unpack
2015-07-28 17:08:50 ERROR <!> Error applying plugin amavisd_wblist: need more than 1 value to unpack

48

Re: blacklist not working (0.9.2 - 1.6.0)

Could you please compare your libs/amavisd/core.py to the latest version?
https://bitbucket.org/zhb/iredapd/src/d … sd/core.py

Any difference?

49

Re: blacklist not working (0.9.2 - 1.6.0)

Result of diff:
(zhang_core.py  from  https://bitbucket.org/zhb/iredapd/src/d … d/core.py)

diff -c /opt/iRedAPD-1.6.0/libs/amavisd/core.py /home/alex103/work/1/zhang_core.py
*** /opt/iRedAPD-1.6.0/libs/amavisd/core.py     2015-07-13 09:57:17.936765829 +0600
--- /home/alex103/work/1/zhang_core.py  2015-07-30 11:01:00.583614911 +0600
***************
*** 1,5 ****
  import logging
! from libs import SMTP_ACTIONS, utils


  def is_valid_amavisd_address(addr):
--- 1,5 ----
  import logging
! from libs import utils


  def is_valid_amavisd_address(addr):

50

Re: blacklist not working (0.9.2 - 1.6.0)

Could you please download this file, override the one on your server, then restart iRedAPD service and keep monitoring its log file?

https://bitbucket.org/zhb/iredapd/src/default/libs/amavisd/core.py