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

as the sender of mail handler is invalid, fix this use default sender… #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jeffery9
Copy link

… address < trapperkeeper@localhost>

ERROR:root:Callback Failed: (501, ': sender address must contain a domain', 'trapperkeeper')
Traceback (most recent call last):
File "build/bdist.linux-x86_64/egg/trapperkeeper/callbacks.py", line 43, in call
self._call(_args, *_kwargs)
File "build/bdist.linux-x86_64/egg/trapperkeeper/callbacks.py", line 171, in _call
self._send_mail(handler, trap, duplicate)
File "build/bdist.linux-x86_64/egg/trapperkeeper/callbacks.py", line 72, in _send_mail
subject, self.template_env, ctxt)
File "build/bdist.linux-x86_64/egg/trapperkeeper/utils.py", line 127, in send_trap_email
smtp.sendmail(sender, recipients, msg.as_string())
File "/usr/lib/python2.7/smtplib.py", line 731, in sendmail
raise SMTPSenderRefused(code, resp, from_addr)
SMTPSenderRefused: (501, ': sender address must contain a domain', 'trapperkeeper')

… address < trapperkeeper@localhost>

ERROR:root:Callback Failed: (501, '<trapperkeeper>: sender address must contain a domain', 'trapperkeeper')
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trapperkeeper/callbacks.py", line 43, in __call__
    self._call(*args, **kwargs)
  File "build/bdist.linux-x86_64/egg/trapperkeeper/callbacks.py", line 171, in _call
    self._send_mail(handler, trap, duplicate)
  File "build/bdist.linux-x86_64/egg/trapperkeeper/callbacks.py", line 72, in _send_mail
    subject, self.template_env, ctxt)
  File "build/bdist.linux-x86_64/egg/trapperkeeper/utils.py", line 127, in send_trap_email
    smtp.sendmail(sender, recipients, msg.as_string())
  File "/usr/lib/python2.7/smtplib.py", line 731, in sendmail
    raise SMTPSenderRefused(code, resp, from_addr)
SMTPSenderRefused: (501, '<trapperkeeper>: sender address must contain a domain', 'trapperkeeper')
@@ -64,7 +64,7 @@ def _send_mail(self, handler, trap, is_duplicate):
ctxt = dict(trap=trap, dest_host=self.hostname)
try:
stats.incr("mail_sent_attempted", 1)
send_trap_email(recipients, "trapperkeeper",
send_trap_email(recipients, "trapperkeeper@localhost",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be turned into a config option. I currently use a mail relay that automatically appends the domain so this would negatively affect my installation as proposed. If you want to change this to be a config option with the default remaining trapperkeeper then I'll gladly merge this.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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

Successfully merging this pull request may close these issues.

3 participants