MacroMilter icon indicating copy to clipboard operation
MacroMilter copied to clipboard

Bug TypeError: 'NoneType' object has no attribute

Open katschingg opened this issue 6 years ago • 3 comments

I managed to install MacroMilter as a service under Debian. Also added the milter using

postconf -e smtpd_milters=inet:127.0.0.1:3690 milter_default_action=accept

It seems to work but I sometimes get an error in the SystemLog which is: Feb 22 17:02:35 srv python[1062]: Traceback (most recent call last): Feb 22 17:02:35 srv python[1062]: File "/usr/local/lib/python2.7/dist-packages/Milter/__init__.py", line 666, in connect_callback Feb 22 17:02:35 srv python[1062]: return m.connect(hostname,family,hostaddr) Feb 22 17:02:35 srv python[1062]: File "/usr/local/lib/python2.7/dist-packages/Milter/__init__.py", line 161, in wrapper Feb 22 17:02:35 srv python[1062]: rc = func(self,*args) Feb 22 17:02:35 srv python[1062]: File "/etc/macromilter/macromilter.py", line 155, in connect Feb 22 17:02:35 srv python[1062]: self.IP = hostaddr[0] Feb 22 17:02:35 srv python[1062]: TypeError: 'NoneType' object has no attribute '__getitem__' Feb 22 17:02:35 srv python: MacroMilter: milter claimed not to reply in state 2 but did anyway 3

The macromilter.log does not show any error (also not on DEBUG) so I guess the script exits before any log output and I cannot tell which email/input caused this.

katschingg avatar Feb 22 '19 22:02 katschingg

It seems to be a problem with the hostaddr ip information. Can you reproduce the problem? What MacroMilter version are you using?

sbidy avatar Feb 23 '19 08:02 sbidy

Version: 2019-02-23 12:04:46 MacroMilter startup - Version 3.6

IP information: Do you mean find out my own ip (127.0.0.1) or the ip address of the sender?

Just saw another message: Feb 23 10:48:33 srv postfix/smtpd[28013]: warning: milter inet:127.0.0.1:3690: can't read SMFIC_DATA reply packet header: Success But I guess that's not related?

katschingg avatar Feb 23 '19 11:02 katschingg

It seams to be an error from the milter interface. It handovers a "empty" IP property within the milter object. I have to debug and reproduce the error. What libmilter an pymilter version you are using?

sbidy avatar Feb 27 '19 12:02 sbidy