Closed l-arnold closed 9 years ago
This should be pretty simple, since I think there is postfix already enabled on lapp. Just need to update the SMTP settings in the server config file.
I can outline how I have SMTP setup in my Odoo. I just was not able to put that together with how to use the "built in postfix". A few links out there but none clear.
I will start documenting here the SMTP side for Outgoing and Incoming.
My Outgoing Server Settings. (at: Settings/General Settings/Outgoing Mail Serve
Description
my.mailserver.com
Priority
10
Connection Information
SMTP Server
my.mailserver.com
SMTP Port
25
Debugging
Security and Authentication Connection Security TLS (STARTTLS) Username odoo@my.mailserver.com Password
Incoming Mail Server: Incoming Accoung needs to be setup as a "Catchall" Account for the domain. This way it serves all the needs and users of the Odoo System.
Settings: Settings/General Settings/Configure Incoming Mail Gateway
Name my.mailserver.com Server Type IMAP Server Last Fetch Date 09/04/2015 20:26:08 Server & Login Advanced Server Information Server Name server.zmailcloud.com Port 993 SSL/TLS
Login Information Username odoo@my.mailserver.com Password
(only one entry for me - can set more it seems)
The appliance should be set up to use localhost to send mail by default. Users can then configure an alternate if they desire. Incoming mailserver should be left unconfigured by default IMO.
Outgoing w/ Localhost is "default". Trick is getting responses routed properly. How to tie them together. It will mail with Localhost. A reply however.. not sure what happens then. Would be great to have a "reply" like "Order Confirmed" work.
I will look for some threads. I just have never used Postfix. Will Postfix take any 'ougoing" mail on Localhost? Are there Spam issues there (stupid question)
My system routes through our mail provider (zmailcloud.com) which hosts zimbra. One thing I pay for and get some value. Still being sure it all routes is a trick (Odoo issues mostly)
(updated: added paragraph 2) Main Question: Can Postfix function as a "catchall" Mail (something). Not sure if it is a server. If MX Records are pointed at it, can it catch all mail pointed at the defined domain?
Needs to do this in the "guise" of one Email Address that Odoo Logs into then goes and distributes.
A few Links: Best direct actions: https://www.odoo.com/forum/help-1/question/incoming-e-mail-to-postfix-45260
http://www.cyberciti.biz/faq/howto-setup-postfix-catch-all-email-accounts/
perhaps also: https://www.odoo.com/forum/help-1/question/how-to-set-up-e-mail-messaging-with-odoo-61796
these above and below from Google Search: postfix odoo catchall localhost integration https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=postfix+odoo+catchall+localhost+integration
long "issue thread" Not sure it is worked through or not.
Existing TurnKey appliances should already be able to send mail OOTB and all appliances have Postfix installed and configured by default. Perhaps have a look at one of them (e.g. WordPress) and check how it has been configured. Forwarding (like it sounds you are using) is an option but IMO it should be default configured to just send email direct.
Its the 'catchall' recieving I want to configure ottb..
Yes, can mailb with localhost thru postfix. Need to verrify the spam is not taken as spam on that front.
Hey guys sorry for the radio silence, I thought I would have some time but my wife and life had other plans!
Email servers are a dangerous thing configured incorrectly. Don't want a open forwarder.
I think postfix is configured for host only so that only apps that are hosted on the same server can "send"
I don't think you want incoming email from the Internet! I could see forwarding emails from a main email server (so email is filtered before forwarding on) to the email server to odoo. Is there a function that odoo can use incoming email for some purpose.
TBH I'm not sure what you mean by "catchall"... As of v14.0 all TurnKey apps include postfix and have root@localhost configured to forward email to the email address defined by inithooks. Please don't change that; or send any Odoo mail to root@localhost. The idea is that the Odoo (or whatever app it is) admin user may want a different email to whoever is monitoring root@localhost.
IMO it probably doesn't need to be fully pre-configured; but if an Odoo user configures Odoo to send emails (via the WebUI) then it should just work OOTB (you shouldn't need to also fiddle around on the command line &/or in conf files &/or Webmin to set it up).
Just remember when you are building a new TurnKey appliance (that you want added to the library) you can't just consider your own usage scenario; you need to consider other potential users. Some will be total newbs (to Linux generally; TurnKey specifically; ERP/etc generally, Odoo specifically); whereas others will be experts and/or pros (some Odoo experts but Linux newbs; some Linux experts but Odoo newbs; etc). We need to consider and cater to all of these groups of users as much as possible. Obviously we will sometimes need to make compromises but ultimately we want to find the best, minimalist common ground config that we can...
In and Out mail is a major part of Odoo and one of the reasons why I like it so much. Very much of your communication can take place within the app. Quotations, Invoices, Mail List mailings, Individual customer and team communications all can work.
That said routing everything through an extrernal server has some problems in my opinion. Specifically there are some protocol issues that sometimes, to some systems, stop the mail from going through.
Technically Odoo only needs "one account" to do everything, so long as it is set up as a "catchall account". My understanding is that Postfix essentially serves "one user one system".. It seems it should work. I also think that spam issues could be minimized as the DNS mappings wouid be absolute from the Odoo MX setup and not routed through an external server.
I should work on a Demo system for you two to test and see results/ interface / etc.
With you on all that Jeremy. Cross posting there.
"Catchall" means that the Email address is set up to accept "any mail" heading to the "domain" it is assigned to. Odoo then takes all that mail and parses it to different users, subjects, threads, mail lists, etc. Whether an outside system does this, or Postfix does this, it is required for Odoo to take "incoming" mail. Also, Outgoing mail is pretty disfunctional if you can't get replies.
Will look at some of the links I posted above in this thread to see what comes of them. I do know I had some outgoing tests go out of Localhost a few weeks ago on another system.
We may want to look ata few Postfix Settings and I think we will be all set. The user will need set MX, Set their incoming and outgoing server settins in OdooSettings (Localhost is there but I know the "catchall" has to be there.
Much of the Odoo mail, interface, tbh, is similar to this GitHub "issues" interface. That being, you can expand a "box like this" into a full HTML mail. You can also make very nice " mail list layouts" using the Web Editing interface.
I think I get a vague idea of it. Although TBH I'm not 100% sure. It sounds like I will need to have a look at it to get my head around it...
I'm not clear what you mean by "spam issues". Your server sending spam shouldn't be an issue (non authenticated users should not be able to use postfix). Emails being tagged as spam by your inbox is well beyond the control of TurnKey (it relies on things like DNS settings, IPs that aren't blacklisted, etc) so there is nothing we can do about that...
Case in point:
odoo@mydomain.com sends all the mail for all the users.
Mail will read something like "from odoo@mydomain.com replyto: user@mydomain.com
if routing from an "external server" that server may host many domains. so
from smtp@outsideserver onbehalf of odoo@mydomain.com replyto user@mydomain.com
Basically lots of emails will block variations of the above as "non "authenticated" one way or another. Mostly an odoo problem, but if we can have a "clean" and functional version of (#1 above) , and have it be easy to set up, it would be a real boon for users (and ultimately the TKL/Odoo platform).
Like anything, all this needs testing. Will work on a subdomain of some kind shortly.
Ah ok, so it's to do with internal Odoo functionality not just sending notification emails. Assuming that I've got it right then perhaps that needs to be set via an inithook? So the next thing to do would be to decide which config is the simplest/easiest. Regardless it might be useful to document this. You can add a docs/
directory in your appliance build root directory and put any documentation you create there for now...
:+1:
Resolution for this, my proposal.
I will build information as to how to make it work into the documentation attached. I think it does not make sens to change anything "default" in Postfix at build point as that might break something (am I wrong?).
I will see if I can get one of the solutions illustrated in the Links above to work. I need to do some domain configuration to make that work so will take a little time.
Lets see what "a little" means.
The Top Two Links are both Saying the Same thing about how to get 'Catchall" working through Postfix and Localhost. That is a good thing. Does not seem like too much work but needs Domain setup etc all working together. I think we can include a Version of this Information (assuming it works) in the documentation. Otherwise we would need a nice Trick to Get it to work by default without having Defined a true HOSTNAME as part of Inithooks.
A few Links: Best direct actions: https://www.odoo.com/forum/help-1/question/incoming-e-mail-to-postfix-45260
http://www.cyberciti.biz/faq/howto-setup-postfix-catch-all-email-accounts/
As I just noted on "Final To's" Issue: It looks like we can get PostFix working by just including Some Documentation, otherwise we would need an Inithook to define the "catchall - email address" and set it into POSTFIX. This is pretty easy and documented as to what should be set in the Postfix issue.
I've made a pretty strong effort on Postfix but I am not getting or understanding how to "take mail in".
I am sending out via Postfix. When I reply in my outside system I am not getting "undeliverable" messages. I am not finding anything within Postfix or any transmissions (as I do with our external setup) coming in to Odoo.
Liraz mentions needing a POP or similar (dovecot) server. https://www.turnkeylinux.org/forum/support/20091110/postfix-setup
This is "as complete as there seems to be" a link: https://www.odoo.com/forum/help-1/question/incoming-e-mail-to-postfix-45260 This information "indicates" (without full elaboration) that such can be done without a POP server. There is a script to send mail on (via Alias mode) to Odoo x
I have configured (as I read I need to) to openuser (postgres) and mcookie password, but nothing coming in.
I recomend we leave this to be a ODOO issue rather than the TKL-ODOO App issue for now. If I do not hear to the contrary, I will close this in a few hours.
I do want to come back to it out of my own interest. Difficult scripting but document-able in a WIKI if we figure it our.
For sure... IMO the first step is a MVP (minimum viable product).
So long as the basic functionality of Odoo works OOTB we have an MVP! We can document and/or patch improvements as we go...
Closing and will Open a new Issue called "Documentation". Brief. Only about approach.
I will propose a Wiki that is Liked to from WebConsole but hosted outside. Can have some basic Documents which also travel with the Server.
IMO leave it in the docs directory with the build code in the git repo. Later on we can copy/paste it to the TurnKey appliance Wiki (where all the other app specific docs are...)
Would be really incredible if we could make this work out of the box.