I am using my mail server to send mail using Django. When I try to use the send_mail
function, I am met with an authentication error. I know that it is not the password, because I can use it to login to my mail account.
How My Mail Server is Setup
I am running Ubuntu 16.0.4 with Nginx and Gunicorn for my Django application. I have installed Roundcube, postfix and dovecot.
How Do I add Users to Roundcube?
For me, the only way I know how to do this is by just adding a new user from the CLI using adduser <user>
and from there, logging into Roundcube so that my new user is added to the Roundcube database, and I have an accessible account on Roundcube.
What I Suspect to be The Issue
Since I am creating the users for Roundcube directly from the CLI and they are full Unix users, I can only login to Roundcube using their actual username, and not username@domain.tld
. I suspect that Django is trying to authenticate with user@domain.tld
rather than user
and that is what is causing the issue.
How Can I Fix This?
I am not sure, hence why I am here. I have done my research and cannot find the proper information on making it so that I can login to Roundcube using user@domain.tld
instead of just user
, but I don't think this will solve my issue.
I have also done research and cannot find an answer on how to create just a mail user, and not a full-blown Unix user. I was thinking this might be my best option. Although, I could be completely wrong.