Opened 6 years ago

Closed 6 years ago

#849 closed enhancement (invalid)

yeowch when greylisted by local smtp server

Reported by: ayleph Owned by:
Priority: minor Milestone:
Component: infrastructure Keywords: mail, smtp, greylisted
Cc: Parent Tickets:

Description

I set up GMG on a new site running postfix smtp server with postgrey greylisting. When GMG sends a verification email to a new user@domain address, the email is greylisted by my local smtp server and GMG throws an error. The accounts are created fine (they can still log in), and after waiting the requisite time for greylisting, my GMG instance can successfully email these addresses.

I've marked this as minor, as anyone who does encounter this will likely have configured greylisting on purpose and should be able to figure out how to fix it. However, it would be neat if GMG were aware of greylisting and had a slightly smarter behaviour. Perhaps instead of defaulting to a yeowch page, it could display a message such as "account was created but email could not be sent."

Logs follow with identifiable information scrubbed.

/var/log/mediagoblin/mediagoblin.log:

Starting server in PID 18739.
Error - <class 'smtplib.SMTPRecipientsRefused'>: {u'user@domain.tld': (450, '4.2.0 <user@domain.tld>: Recipient address rejected: "Greylisted')}
URL: http://domain.tld/auth/register/
File '/srv/mediagoblin/mediagoblin-0.6.2-dev/lib/python2.7/site-packages/Paste-1.7.5.1-py2.7.egg/paste/exceptions/errormiddleware.py', line 144 in __call__
  app_iter = self.application(environ, sr_checker)
File '/srv/mediagoblin/mediagoblin-0.6.2-dev/lib/python2.7/site-packages/Paste-1.7.5.1-py2.7.egg/paste/urlmap.py', line 203 in __call__
  return app(environ, start_response)
File '/srv/mediagoblin/mediagoblin-0.6.2-dev/mediagoblin/app.py', line 263 in __call__
  return self.call_backend(environ, start_response)
File '/srv/mediagoblin/mediagoblin-0.6.2-dev/mediagoblin/app.py', line 240 in call_backend
  response = controller(request)
File '/srv/mediagoblin/mediagoblin-0.6.2-dev/mediagoblin/decorators.py', line 303 in wrapper
  return controller(request, *args, **kwargs)
File '/srv/mediagoblin/mediagoblin-0.6.2-dev/mediagoblin/decorators.py', line 361 in wrapper
  return controller(request, *args, **kwargs)
File '/srv/mediagoblin/mediagoblin-0.6.2-dev/mediagoblin/auth/views.py', line 51 in register
  user = register_user(request, register_form)
File '/srv/mediagoblin/mediagoblin-0.6.2-dev/mediagoblin/auth/tools.py', line 148 in register_user
  send_verification_email(user, request)
File '/srv/mediagoblin/mediagoblin-0.6.2-dev/mediagoblin/auth/tools.py', line 103 in send_verification_email
  rendered_email)
File '/srv/mediagoblin/mediagoblin-0.6.2-dev/mediagoblin/tools/mail.py', line 129 in send_email
  return mhost.sendmail(from_addr, to_addrs, message.as_string())
File '/usr/lib64/python2.7/smtplib.py', line 735 in sendmail
  raise SMTPRecipientsRefused(senderrs)
SMTPRecipientsRefused: {u'user@domain.tld': (450, '4.2.0 <user@domain.tld>: Recipient address rejected: "Greylisted')}

/var/log/mail.log:

Feb  4 02:04:33 localhost postfix/smtpd[18751]: connect from localhost.localdomain[127.0.0.1]
Feb  4 02:04:33 localhost postgrey[14819]: action=greylist, reason=new, client_name=localhost.localdomain, client_address=127.0.0.1, sender=mediagoblin@localdomain, recipient=user@domain.tld
Feb  4 02:04:33 localhost postgrey[14819]: cleaning up old logs...
Feb  4 02:04:33 localhost postgrey[14819]: cleaning up old entries...
Feb  4 02:04:33 localhost postgrey[14819]: cleaning main database finished. before: 16, after: 3
Feb  4 02:04:33 localhost postgrey[14819]: cleaning clients database finished. before: 13, after: 2
Feb  4 02:04:33 localhost postfix/smtpd[18751]: NOQUEUE: reject: RCPT from localhost.localdomain[127.0.0.1]: 450 4.2.0 <user@domain.tld>: Recipient address rejected: "Greylisted; from=<mediagoblin@localdomain> to=<user@domain.tld> proto=ESMTP helo=<[xxx.xxx.xxx.xxx]>

Subtickets

Change History (2)

comment:1 Changed 6 years ago by ayleph

After giving this some thought, it doesn't make much sense to code GMG such that it recognizes the specific "greylist" response. But perhaps there would be some value in configuring GMG to inform the user that although the email could not be sent, the account has been created (rather than simply displaying an error that causes the user to think that account creation has failed altogether, only for them to find out that their account already exists when they try to re-create it). Alternatively, perhaps it would make sense to prevent account creation altogether if sending the account creation email fails.

comment:2 Changed 6 years ago by ayleph

Resolution: invalid
Status: newclosed

This is really a server config issue, not a GMG issue. Closing as invalid.

Note: See TracTickets for help on using tickets.