I know it does not work because I get an error when I try to send a password reset email or any test email for that matter. I even paid a guy on fiverr.com to try to figure it out and he couldnât figure it out eitherâŚ
Thanks,
Sean
Edit 1: The error message in the ERPNext Python Docker container when the email tried to send:
Traceback (most recent call last):
File â/home/frappe/frappe-bench/apps/frappe/frappe/email/queue.pyâ, line 415, in send_one
smtpserver.sess.sendmail(email.sender, recipient.recipient, message)
File â/opt/bitnami/python/lib/python3.7/smtplib.pyâ, line 867, in sendmail
raise SMTPSenderRefused(code, resp, from_addr)
smtplib.SMTPSenderRefused: (530, bâ5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [MWHPR22CA0004.namprd22.prod.outlook.com]', âNotifications erpnext@myijack.comâ)
WARNING Property: Unknown Property name. [11:3: overflow-wrap]
Traceback (most recent call last):
File â/home/frappe/frappe-bench/apps/frappe/frappe/email/queue.pyâ, line 415, in send_one
smtpserver.sess.sendmail(email.sender, recipient.recipient, message)
File â/opt/bitnami/python/lib/python3.7/smtplib.pyâ, line 867, in sendmail
raise SMTPSenderRefused(code, resp, from_addr)
smtplib.SMTPSenderRefused: (530, bâ5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [MWHPR10CA0052.namprd10.prod.outlook.com]', âNotifications erpnext@myijack.comâ)
deletingâŚ
Edit 2: a screenshot of the ERPNext email domain settings:
@smino yes, itâs an Outlook email address that I have setup in Settings, Email Account.
Since then Iâve created both a new free outlook.com email address (same failure), and a new free gmail.com email address (same failure).
I feel like I must be missing something in the email setup, but then again, I paid an expert on Fivrr.com to try to figure it out, and he couldnât either.
My assumption is that I must first create an email domain in settings, and then I must go into the âemail accountâ in settings and select a default ânotificationâ email address, and put in my login credentials for that email address. Iâve done all that a few times now, with a few different email addresses, and itâs still not working. Why is it so hard to setup email (separate question, I guessâŚ)? Seems way too hard for a simple thing.
@smino here is the Docker Compose file I used to create all the Docker containers and install everything automatically on our AWS EC2 Ubuntu server. Itâs v12.10.1 for ERPNext and the official image is from Docker Hub.
# This is a combination of ./installation/docker-compose-common.yml and ./installation/docker-compose-erpnext.yml and ./installation/docker-compose-networks.yml
version: '3'
services:
###################################################################
# The following is from ./installation/docker-compose-common.yml
mariadb:
image: mariadb:10.3
restart: on-failure
env_file: .env
environment:
- DB_ROOT_USER=${DB_ROOT_USER}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
# - MYSQL_DATABASE=${MYSQL_DATABASE}
# - MYSQL_USER=${MYSQL_USER}
# - MYSQL_PASSWORD=${MYSQL_PASSWORD}
volumes:
- ./installation/frappe-mariadb.cnf:/etc/mysql/conf.d/frappe.cnf
- mariadb-vol:/var/lib/mysql
networks:
- myijack-network
adminer:
image: adminer:latest
restart: always
env_file: .env
# ports:
# - 0.0.0.0:3000:8080
expose:
- 8080
networks:
- myijack-network
redis-cache:
image: redis:latest
restart: on-failure
expose:
- 6379
env_file: .env
volumes:
- redis-cache-vol:/data
networks:
- myijack-network
redis-queue:
image: redis:latest
restart: on-failure
expose:
- 6379
env_file: .env
volumes:
- redis-queue-vol:/data
networks:
- myijack-network
redis-socketio:
image: redis:latest
restart: on-failure
expose:
- 6379
env_file: .env
volumes:
- redis-socketio-vol:/data
networks:
- myijack-network
###################################################################
# The following is from ./installation/docker-compose-erpnext.yml
erpnext-nginx:
# image: frappe/erpnext-nginx:${VERSION}
image: frappe/erpnext-nginx:v12.10.1
restart: on-failure
env_file: .env
environment:
- FRAPPE_PY=erpnext-python
- FRAPPE_PY_PORT=8000
- FRAPPE_SOCKETIO=frappe-socketio
- SOCKETIO_PORT=9000
- LETSENCRYPT_HOST=${SITES}
- VIRTUAL_HOST=${SITES}
- LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
# # If using this Nginx as the main reverse proxy for the server (e.g. in local development):
# ports:
# - "0.0.0.0:80:80"
# - "0.0.0.0:443:443"
depends_on:
- erpnext-python
- frappe-socketio
- frappe-worker-default
- frappe-worker-long
- frappe-worker-short
volumes:
- sites-vol:/var/www/html/sites:rw
- assets-vol:/assets:rw
networks:
- myijack-network
erpnext-python:
# image: frappe/erpnext-worker:${VERSION}
image: frappe/erpnext-worker:v12.10.1
restart: on-failure
env_file: .env
environment:
- MARIADB_HOST=${MARIADB_HOST}
- REDIS_CACHE=redis-cache:6379
- REDIS_QUEUE=redis-queue:6379
- REDIS_SOCKETIO=redis-socketio:6379
- SOCKETIO_PORT=9000
- AUTO_MIGRATE=1
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
- assets-vol:/home/frappe/frappe-bench/sites/assets:rw
# # AWS RDS special config file
# - ./mariadb/common_site_config.json:/home/frappe/frappe-bench/sites/common_site_config.json:rw
networks:
- myijack-network
frappe-socketio:
# image: frappe/frappe-socketio:${VERSION}
image: frappe/frappe-socketio:v12.8.4
restart: on-failure
depends_on:
- redis-socketio
env_file: .env
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
networks:
- myijack-network
frappe-worker-default:
# image: frappe/erpnext-worker:${VERSION}
image: frappe/erpnext-worker:v12.10.1
restart: on-failure
command: worker
depends_on:
- redis-queue
- redis-cache
env_file: .env
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
networks:
- myijack-network
frappe-worker-short:
# image: frappe/erpnext-worker:${VERSION}
image: frappe/erpnext-worker:v12.10.1
restart: on-failure
command: worker
environment:
- WORKER_TYPE=short
depends_on:
- redis-queue
- redis-cache
env_file: .env
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
networks:
- myijack-network
frappe-worker-long:
# image: frappe/erpnext-worker:${VERSION}
image: frappe/erpnext-worker:v12.10.1
restart: on-failure
command: worker
environment:
- WORKER_TYPE=long
depends_on:
- redis-queue
- redis-cache
env_file: .env
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
networks:
- myijack-network
frappe-schedule:
# image: frappe/erpnext-worker:${VERSION}
image: frappe/erpnext-worker:v12.10.1
restart: on-failure
command: schedule
depends_on:
- redis-queue
- redis-cache
env_file: .env
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
networks:
- myijack-network
site-creator:
# image: frappe/erpnext-worker:${VERSION}
image: frappe/erpnext-worker:v12.10.1
restart: "no"
depends_on:
- erpnext-python
env_file: .env
environment:
- SITE_NAME=${SITE_NAME}
- DB_ROOT_USER=${DB_ROOT_USER} # root if using MariaDB in a Docker container as opposed to AWS RDS
- MARIADB_HOST=${MARIADB_HOST}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
- INSTALL_APPS=${INSTALL_APPS}
# # Force re-creation of site even if it already exists
# # Otherwise it will say "Connections OK. Site erp.myijack.com already exists"
# - FORCE=1
# # Using command: new will run "bash /docker-entrypoint.sh new" on container creation
# command: new
volumes:
- sites-vol:/home/frappe/frappe-bench/sites:rw
networks:
- myijack-network
volumes:
# Following is from ./installation/docker-compose-common.yml
mariadb-vol:
redis-cache-vol:
redis-queue-vol:
redis-socketio-vol:
# Following is from ./installation/docker-compose-erpnext.yml
assets-vol:
sites-vol:
networks:
myijack-network:
external:
name: myijack-network
@smino Hereâs the activity on that new test email address I created. All the login attempts were from my own IP address, as opposed to my AWS EC2 serverâs IP address, where the ERPNext is installed.
@smino I remember reading that âbenchâ is not installed and is not needed with the Docker installation (although I canât find where I read that, but Iâm pretty sure @revant_one wrote it somewhere). When I enter the âerpnext-pythonâ Docker container, âbenchâ is not installed (i.e. the âwhich benchâ Linux command returns nothing)
I installed netcat and ran the netcat smtp.office365.com 587 command in the âerpnext-pythonâ container (I assume thatâs the right container), and hereâs the result:
220 MW2PR16CA0065.outlook.office365.com Microsoft ESMTP MAIL Service ready at Tue, 11 Aug 2020 18:18:59 +0000
Is there a frappe-bench folder? You must enter that folder to execute bench commands , something like: cd ~/frappe-bench, then enter your bench commands
Not sure this has anything to do with network connection , rather a setup / authentication snafu. Has any email setup worked?
I had the same issue, I had a tech at Microsoft who helped me set up, if you have your own domain at office365, you have to check in your office365 account what smtp server you need to enter, in my case it was ******-com.mail.protection.outlook.com ( representing my domain).