Skip to content

Conversation

@Adityashandilya555
Copy link
Contributor

@Adityashandilya555 Adityashandilya555 commented Oct 4, 2025

Replaced archived django-celery-email with actively maintained django-post-office for async email handling.

  • Updated requirements.txt: django-celery-email -> django-post-office
  • Changed email backend configuration in Dockerfile
  • Updated settings.py to use post_office app conditionally

Checklist

Reference to Existing Issue

Closes #477 .

Description of Changes

Migrated from the archived django-celery-email package to the actively maintained
django-post-office package. This ensures continued security updates and support for
asynchronous email functionality.

The migration maintains the same async email behavior while using a modern,
well-maintained package. All email configuration remains backward compatible.

Screenshot

Screenshot 2025-10-04 at 9 23 56 AM Screenshot 2025-10-04 at 9 22 58 AM Screenshot 2025-10-04 at 9 25 33 AM

Adityashandilya555 and others added 3 commits October 4, 2025 09:15
…p#477

Replaced archived django-celery-email with actively maintained
django-post-office for async email handling.

- Updated requirements.txt: django-celery-email -> django-post-office
- Changed email backend configuration in Dockerfile
- Updated settings.py to use post_office app conditionally

Fixes openwisp#477
Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

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

@Adityashandilya555 can you please update this to be consistent with changes done in #521?

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

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

@Adityashandilya555 How did you test this to be confident emails are really sent?

This doesn't seem to be enough to me. Try the following on master:

docker compose logs postfix -f

In another terminal run:

docker compose run -it dashboard /bin/bash

python manage.py sendtestemail [email protected]

On master you'll see postfix activity trying to send email, likely failing because ISPs block email sending ports for preventing people from sending spam.

I tried this on this branch and nothing happens, it doesn't seem to send anything.

I believe we can switch to https://github.com/panevo/django-celery-email-reboot, which is a fork of the tool we've been using until now, which has proven to be simple and reliable.

@github-project-automation github-project-automation bot moved this from Backlog to In progress in 25.09 Release Oct 11, 2025
@Adityashandilya555
Copy link
Contributor Author

hi i have worked on this issue and created a new pull request for the same #524 Testing Method:

# Terminal 1
docker compose logs postfix -f

# Terminal 2
docker compose run --rm dashboard python manage.py sendtestemail [email protected]

Results:
The email pipeline is working correctly. Postfix logs show email activity:

postfix/smtpd[118]: 95C4120370E8: client=docker-openwisp-openvpn-1
postfix/cleanup[123]: 95C4120370E8: message-id=<176020434555.205.7616411433815178068@a45abb8efcb4>
postfix/qmgr[113]: 95C4120370E8: from=<[email protected]>, size=575, nrcpt=1 (queue active)
postfix/relay/smtp[124]: 95C4120370E8: to=<[email protected]>, relay=none, delay=31, status=deferred

@nemesifier
Copy link
Member

@Adityashandilya555 next time you can simply force-push to the same branch to update the already open PR. Let's close this and continue in #524.

@nemesifier nemesifier closed this Oct 13, 2025
@github-project-automation github-project-automation bot moved this from In progress to Done in 25.09 Release Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Development

Successfully merging this pull request may close these issues.

[change] Migrate django-celery-email

2 participants