Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug TypeError: 'NoneType' object has no attribute #53

Open
katschingg opened this issue Feb 22, 2019 · 3 comments
Open

Bug TypeError: 'NoneType' object has no attribute #53

katschingg opened this issue Feb 22, 2019 · 3 comments
Assignees
Labels

Comments

@katschingg
Copy link

katschingg commented Feb 22, 2019

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.

@sbidy
Copy link
Owner

sbidy commented Feb 23, 2019

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

@katschingg
Copy link
Author

katschingg commented Feb 23, 2019

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?

@sbidy sbidy added the bug label Feb 27, 2019
@sbidy sbidy assigned sbidy and katschingg and unassigned katschingg Feb 27, 2019
@sbidy
Copy link
Owner

sbidy commented Feb 27, 2019

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants