Comments (14)
The issue indeed happens when the SMTP connection/login fails. From the user perspective the send button is just greyed out with no further feedback. With DEBUG = True
I captured the following trace that isn’t very helpful either in understanding that this is a SMTP connection issue:
TypeError at /webmail/
Object of type bytes is not JSON serializable
/nix/store/niz5fi7ig4iqsn78343p194g6xcnrv06-python3-3.11.6-env/lib/python3.11/site-packages/django/core/handlers/exception.py, line 55, in inner
return inner
else:
@wraps(get_response)
def inner(request):
try:
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
…
except Exception as exc:
response = response_for_exception(request, exc)
return response
return inner
/nix/store/niz5fi7ig4iqsn78343p194g6xcnrv06-python3-3.11.6-env/lib/python3.11/site-packages/django/core/handlers/base.py, line 197, in _get_response
if response is None:
wrapped_callback = self.make_view_atomic(callback)
# If it is an asynchronous view, run it in a subthread.
if iscoroutinefunction(wrapped_callback):
wrapped_callback = async_to_sync(wrapped_callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
…
except Exception as e:
response = self.process_exception_by_middleware(e, request)
if response is None:
raise
# Complain if the view returned None (a common error).
/nix/store/rac8pxbi1vapwrlqzbrkycbyg521djzw-python3-3.11.6/lib/python3.11/contextlib.py, line 81, in inner
"""
return self
def __call__(self, func):
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
…
return inner
class AsyncContextDecorator(object):
"A base class or mixin that enables async context managers to work as decorators."
/nix/store/niz5fi7ig4iqsn78343p194g6xcnrv06-python3-3.11.6-env/lib/python3.11/site-packages/django/contrib/auth/decorators.py, line 23, in _wrapper_view
that takes the user object and returns True if the user passes.
"""
def decorator(view_func):
@wraps(view_func)
def _wrapper_view(request, *args, **kwargs):
if test_func(request.user):
return view_func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
…
path = request.build_absolute_uri()
resolved_login_url = resolve_url(login_url or settings.LOGIN_URL)
# If the login url is the same scheme and net location then just
# use the path as the "next" url.
login_scheme, login_netloc = urlparse(resolved_login_url)[:2]
current_scheme, current_netloc = urlparse(path)[:2]
/nix/store/niz5fi7ig4iqsn78343p194g6xcnrv06-python3-3.11.6-env/lib/python3.11/site-packages/modoboa/admin/lib.py, line 47, in wrapped_f
Some applications (the webmail for example) need a mailbox to
work.
"""
def decorator(f):
@wraps(f)
def wrapped_f(request, *args, **kwargs):
if hasattr(request.user, "mailbox"):
return f(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
…
raise PermDeniedException(_("A mailbox is required"))
return wrapped_f
return decorator
def get_identities(user, searchquery=None, idtfilter=None, grpfilter=None):
/nix/store/niz5fi7ig4iqsn78343p194g6xcnrv06-python3-3.11.6-env/lib/python3.11/site-packages/modoboa_webmail/views.py, line 706, in index
pass
response.update(callback=action)
http_status = 200
if "status" in response:
del response['status']
http_status = 400
return render_to_json_response(response, status=http_status)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
…
/nix/store/niz5fi7ig4iqsn78343p194g6xcnrv06-python3-3.11.6-env/lib/python3.11/site-packages/modoboa/lib/web_utils.py, line 86, in render_to_json_response
def render_to_json_response(context, **response_kwargs):
"""Simple shortcut to render a JSON response.
:param dict context: response content
:return: ``HttpResponse`` object
"""
data = json.dumps(context)
^^^^^^^^^^^^^^^^^^^
…
response_kwargs["content_type"] = "application/json"
return HttpResponse(data, **response_kwargs)
def static_url(path):
"""Returns the correct static url for a given file
/nix/store/rac8pxbi1vapwrlqzbrkycbyg521djzw-python3-3.11.6/lib/python3.11/json/__init__.py, line 231, in dumps
"""
# cached encoder
if (not skipkeys and ensure_ascii and
check_circular and allow_nan and
cls is None and indent is None and separators is None and
default is None and not sort_keys and not kw):
return _default_encoder.encode(obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
…
if cls is None:
cls = JSONEncoder
return cls(
skipkeys=skipkeys, ensure_ascii=ensure_ascii,
check_circular=check_circular, allow_nan=allow_nan, indent=indent,
separators=separators, default=default, sort_keys=sort_keys,
/nix/store/rac8pxbi1vapwrlqzbrkycbyg521djzw-python3-3.11.6/lib/python3.11/json/encoder.py, line 200, in encode
if self.ensure_ascii:
return encode_basestring_ascii(o)
else:
return encode_basestring(o)
# This doesn't pass the iterator directly to ''.join() because the
# exceptions aren't as detailed. The list call should be roughly
# equivalent to the PySequence_Fast that ''.join() would do.
chunks = self.iterencode(o, _one_shot=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
…
if not isinstance(chunks, (list, tuple)):
chunks = list(chunks)
return ''.join(chunks)
def iterencode(self, o, _one_shot=False):
"""Encode the given object and yield each string
/nix/store/rac8pxbi1vapwrlqzbrkycbyg521djzw-python3-3.11.6/lib/python3.11/json/encoder.py, line 258, in iterencode
self.key_separator, self.item_separator, self.sort_keys,
self.skipkeys, self.allow_nan)
else:
_iterencode = _make_iterencode(
markers, self.default, _encoder, self.indent, floatstr,
self.key_separator, self.item_separator, self.sort_keys,
self.skipkeys, _one_shot)
return _iterencode(o, 0)
^^^^^^^^^^^^^^^^^
…
def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,
_key_separator, _item_separator, _sort_keys, _skipkeys, _one_shot,
## HACK: hand-optimized bytecode; turn globals into locals
ValueError=ValueError,
dict=dict,
/nix/store/rac8pxbi1vapwrlqzbrkycbyg521djzw-python3-3.11.6/lib/python3.11/json/encoder.py, line 180, in default
pass
else:
return list(iterable)
# Let the base class default method raise the TypeError
return JSONEncoder.default(self, o)
"""
raise TypeError(f'Object of type {o.__class__.__name__} '
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
…
f'is not JSON serializable')
def encode(self, o):
"""Return a JSON string representation of a Python data structure.
>>> from json.encoder import JSONEncoder
Fixing the SMTP does make it work though!
from modoboa-webmail.
@sabo14 Can you describe your issue a bit more?
from modoboa-webmail.
send button disabled as shown
from modoboa-webmail.
There was issue in SMTP server
Issue Resolved
from modoboa-webmail.
I faced the same issue, but even openig the 25 port on firewall and created all DNS Zones correctly, I can all (create domains and accounts, receive internal and external e-mails), but cannot send or reply. Same message apears in the webmail when I click the Send button. Is there someone to help me to identify a solution? I my case the console shows the following message: Uncaught SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON at JSON.parse (<anonymous>) at Function.parseJSON (jquery.min.js:3:4322) at Webmail.<anonymous> (webmail.js:1063:26) at Object.i (jquery.min.js:3:6336) at c (jquery.min.js:3:7857) at Object.fireWith [as rejectWith] (jquery.min.js:3:8658) at k (jquery.min.js:5:14040) at XMLHttpRequest.r (jquery.min.js:5:18226)
from modoboa-webmail.
is your postfix service working Properly ??
from modoboa-webmail.
in my case user not able to send mail due to SMTP Connection Failure
from modoboa-webmail.
is your postfix service working Properly ??
Yes. It is. Including the path to the SSL certificates. In my case, the server is running the postfix in an Azure VM and, Analyzing the mail.log file the only message I found says: "/smtp[171167]: connect to hotmail-com.olc.protection.outlook.com[104.47.70.33]:25: Connection timed out". I'm new in this Linux universe, but I'm loving it and any help will be appreciated.
from modoboa-webmail.
from modoboa-webmail.
No. As a newby Azure user, I don't now how to do it.
Do you have some link or video to guide me how to do it?
Thanks a lot!
from modoboa-webmail.
from modoboa-webmail.
Yes, I can do it. But I don't understand why do I need to use other SMTP service if I'm deploying one server to do that. I don't prettend to send massive e-maisl, is not possible just to setup postfix or modoboa to use other valid port, for exemple 2525, 465 or 587 instead of using 25? Thanks for trying to help me. You are an awesome person. What is the best time to connect with you on anydesk, discord or any other tool?
from modoboa-webmail.
from modoboa-webmail.
I got it with SMTP2GO. Thankyou very much!
from modoboa-webmail.
Related Issues (20)
- Changing Parameters via CLI
- Embed webmailer into another website HOT 7
- getquota in imaputils has an unbound variable HOT 1
- Error While Sending Message HOT 16
- Error on Webmail HOT 1
- Problem with imap4-utf-7 on Debian 11 and Python 3.9 HOT 2
- Message's title in the sent tab isn't truncated HOT 1
- Email Headers aren't truncated.
- UnboundLocalError at /webmail/ local variable 'data' referenced before assignment HOT 2
- Image in webmail signature broken and added as attachment
- impossible to search sent email with to address HOT 6
- Documentation? Nice idea, easy to install (thanks to README) but how to use it? HOT 2
- Unable to access webmail when logging on new admin
- Formatting Emails
- why my filename cannot be decode by using urldecode? HOT 2
- Cyrillic flag names cause parser error
- Internal error with large number of messages selected in webmail
- Send Button Stuck
- IMAP Notes Compatibility
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modoboa-webmail.