I have setup a server running MIAB a couple months ago and has been running great. I have another server running Odoo. on the odoo server I’ve installed Postfix as a satellite system. I can send email via prompt from server OK. In Odoo, I have to specify what account I am using. I can send mail from the root@mydomain.com but if I set up any other user, it tells me it can’t send because user is not owned by root.
Is there a way to allow any mail to be relayed from my Odoo server? an spf or dkim record?
Or is there someone that would like to do a little consulting / training?
thanks,
Dave
Thanks for the reply. I had originally set up postfix as a Satellite but changed that to be a Internet site. I can sendmail from the server command prompt. But if another user in Odoo tries to send mail it is rejected as “not owned…”
It seems that the hurdle is being able to allow any user to send email. In the postfix password file, you can only set on entry for that server as you get the following error adding another email: postmap: warning: /etc/postfix/relay_password.db: duplicate entry: “box.dsi-hosting.com”
It would seem logical to use an alias, but odoo requires a password for the outgoing mail server user and I’ve not found any info on how to set a password for an alias.
So, you need to properly configure Odoo to use SMTP. Your MiaB will need to have the user email account that you will be sending from and you will use the details from the admin area mail instructions page to properly configure these settings.
Why reinvent the wheel when the software already has the solution built in?
I have Odoo setup to email and all is working on that end. My issue seems to be with the relay of emails from the server running Odoo and the MIAB server. Inside of Odoo, I have it configured with an SMTP user / password that authenticates back to that user in MIAB. If I am logged into Odoo, I can send emails with no issues. But if another user logs into Odoo and sends an email, they get the “not owned” error message. Since each user has their own email address and Odoo only allows for one SMTP user, the MIAB rejects those emails by other users. Is there a way to tell the MIAB server to accept all emails from another server / ip address? Or how do we assign a password to an MIAB alias so that I can enter that into Odoo’s outgoing mail server config?
Also, we are an Odoo partner and have several customers using it. But they are using other email servers and we do not have this issue. It just seems to be some type of relay or authentication issue.
The issue here is that OP has relaying setup but MIAB is denying the change in the “FROM” address (It is no longer matching the USERNAME address so MIAB is denying access)
What will need to happen is each user will need an alias that is attached to the username used for the relay.
Exactly what I am thinking (just may not be practical if OP has 100 users) … in the MiaB admin area under aliases, add an ‘alias’ pointing back to the same user that odoo mails with and then under permitted senders use the second option - I’ll enter the mail users that can send mail claiming to be from the alias address.
Exactly what I was thinking, but Odoo SMTP user requires a password for authentication and a MIAB alias does not have a password, unless i’m missing something. And from my understanding you can’t have an alias and user with matching email addresses, correct?
thanks
Dave
The user used to sign into SMTP never changes, the FROM address (in this case would be the alias) changes. By default MIAB only allows users to send as themselves AND alias ONLY. So the from address needs to match the username OR the from address needs to be an alias.
@murgero and I are leading you to two different ways of accomplishing this. I am going to step back and let you follow his instructions.
From my interpretation of the Oodo documentation, it is designed to allow you to automatically send email using a external SMTP server (not specifically the one on localhost) and I am approaching this from that angle.
@murgero is approaching this from the angle of a smtp server on localhost which you would then use to relay the mails to the MiaB server for sending.
If you need help with either approach, we both are in the MiaB slack channel.
If Odoo allows you to configure an external server, USE THAT INSTEAD. I was under the impression that it did not (like many PHP scripts). @alento’s way is an easier solution here.
I’ve been reading up on postfix and how to configure the Odoo server as a local mail and forward to the MIAB server. I must admit that this seems very difficult to follow. Especially the rules about virtual mappings.
Odoo is setup to send email using an external SMTP server and it works great. It is just that trying to send to the MIAB server with multiple user email addresses is where I’m hitting my head on the wall.
In Odoo, I configure the outgoing mail server settings as follows:
SMTP Server: box.mydomain.com
SMTP Port: 587
SMTP User: dave@mydomain.com
SMTP Password: mypassword
I log into Odoo as my user and I can send emails. But when the other users log into odoo, they get that error of “not owned…” when sending emails. Odoo is trying to send the mail as their user (i.e. user1@mydomain.com). It gets reject saying that user1@mydomain.com Sender address rejected: not owned by user dave@mydomain.com. So if Odoo is “authenticating” for dave@mydomain.com it does not recognize the other emails. Seems to be a purely relay issue.
I have created an alias in MIAB, info@mydomain.com. On my odoo server, I have changed the outgoing mail server config for the SMTP user of info@mydomain.com and leave the password blank since MIAB aliases do not have passwords. When I try to send an email, I get this error:
Connection Test Failed! Here is what we got instead:
535
5.7.8 Error: authentication failed: UGFzc3dvcmQ6