That was tricky!
If you have the time to list them, I’d love to hear what steps you
needed to take.
- Willem
That was tricky!
If you have the time to list them, I’d love to hear what steps you
needed to take.
If you have time, I certainly have time.
All of these functions Foodsoft performs used to have to be organized, delegated and done manually by members. My coop has been doing remarkably well considering this was the case, but the unwieldiness of our practices imposed a limit to our growth. I’ll have time because of Foodsoft.
DISCLAIMER: I did not proceed here in such a way to understand what was happening so there are likely redundant or useless settings in here. When forced, I would check the logs for clues, but mostly I kept making changes until it worked. I have not gone through and tweaked it yet.
First I set up email on another domain (hereafter adomainIsetupmailon.com) I own through dreamhost. They use squirrelmail. They are a local, worker-owned and operated enterprise (very rare in the US), and have been in operation since 1997. I have been using their shared hosting since 2007. They are very reasonable and helpful.
in etc/postfix/main.cf add or change the following lines:
#recommended change by liraz at tkl
inet_interfaces = all
#include the brackets!
relayhost = [mail.adomainIsetupmailon.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/smtp_pass
smtp_sasl_security_options = noanonymous
myorigin = mycoopdomainname.org
Next, create the files etc/postfix/sasl_passwd and etc/postfix/smtp_pass and add the following line to them:
[mail.adomainIsetupmailon.com]:587 someaddress@adomainIsetupmailon.com:password
Again, keep the brackets.
Next, run
postmap /etc/postfix/smtp_pass
and
postmap /etc/postfix/sasl_passwd
Next you create config/environments/$RAILS_ENV.rb (keep single quotation marks):
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: ‘mail.adomainIsetupmailon.com’,
port: 587,
domain: ‘adomainIsetupmailon.com’,
user_name: ‘someaddress@adomainIsetupmailon.com’,
password: ‘password’,
authentication: ‘plain’,
}
Now make the changes to config/app_config.yml (note the commenting out of port:3000):
protocol: http
host: internet ip address of VM
email_sender: someaddress@adomainIsetupmailon.com
email_from: someaddress@adomainIsetupmailon.com
#email_replyto: someaddress@adomainIsetupmailon.com
MOST IMPORTANTLY: if you are using the turnkey linux version of foodsoft, you will need to install libsasl2-modules and restart postfix.
As for SPF, it did not end up helping in the non-relay use case. As you hinted at in your earlier message, while the standards are still changing and percolating through user communities, use of a good, honest, maintained email server will cover the myriad minute issues with email certificates, authentication etc.
Thanks, Angelo!
If you have time, I certainly have time.
All of these functions Foodsoft performs used to have to be organized,
delegated and done manually by members. My coop has been doing
remarkably well considering this was the case, but the unwieldiness of
our practices imposed a limit to our growth. I’ll have time because
of Foodsoft.
Thank you for mentioning this, it’s what I’d hoped Foodsoft would be
able to help with!
DISCLAIMER: I did not proceed here in such a way to understand what
was happening so there are likely redundant or useless settings in
here. When forced, I would check the logs for clues, but mostly I
kept making changes until it worked. I have not gone through and
tweaked it yet.First I set up email on another domain (hereafter
adomainIsetupmailon.com) I own through dreamhost. They use
squirrelmail. They are a local, worker-owned and operated enterprise
(very rare in the US), and have been in operation since 1997. I have
been using their shared hosting since 2007. They are very reasonable
and helpful.in etc/postfix/main.cf add or change the following lines:
#recommended change by liraz at tkl
inet_interfaces = all#include the brackets!
relayhost = mail.adomainIsetupmailon.com:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/smtp_pass
smtp_sasl_security_options = noanonymous
myorigin = mycoopdomainname.orgNext, create the files etc/postfix/sasl_passwd and
etc/postfix/smtp_pass and add the following line to them:someaddress@adomainIsetupmailon.com:password
Again, keep the brackets.
Next, run
postmap /etc/postfix/smtp_pass
and
postmap /etc/postfix/sasl_passwd
Next you create config/environments/$RAILS_ENV.rb (keep single
quotation marks):config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: ‘mail.adomainIsetupmailon.com’,
port: 587,
domain: ‘adomainIsetupmailon.com’,
user_name: ‘someaddress@adomainIsetupmailon.com’,
password: ‘password’,
authentication: ‘plain’,
}Now make the changes to config/app_config.yml (note the commenting
out of port:3000):http config for this host
Required for action mailer
protocol: http
host: internet ip address of VMport: 3000
email address to be used as sender
email_sender: someaddress@adomainIsetupmailon.com
contact info will be used as email from, but you can override it here
email_from: someaddress@adomainIsetupmailon.com
reply-to address for all emails (not set by default)
#email_replyto: someaddress@adomainIsetupmailon.com
MOST IMPORTANTLY: if you are using the turnkey linux version of
foodsoft, you will need to install libsasl2-modules and restart postfix.As for SPF, it did not end up helping in the non-relay use case. As
you hinted at in your earlier message, while the standards are still
changing and percolating through user communities, use of a good,
honest, maintained email server will cover the myriad minute issues
with email certificates, authentication etc.
I’ll see if I can add these things to the wiki.
Another tkl question. Can you get phpmyadmin to work? We have had no luck.
Is there another tool you use?
That’s inconvenient - we use it sometimes. Though I’m not using the Turnkey Linux appliance in production at the moment. But phpmyadmin may not be too useful, since there are a lot of joins happening. OrderArticles referring to articles, GroupOrderArticles referring to OrderArticles and GroupOrders, etc. Ruby on Rails easily works with these joins, but in plain SQL it can be a bit cumbersome. Something else I often use (in case of problems), is the rails console. In /var/www/foodsoft (iirc), run . You’d need to know a bit about Rails, but you may do, for example: What are you trying to achieve?
I’m trying to automate the updating of pricing and availability information from our biggest supplier. They have a csv that they make available, so we were going have a routne to copy it into a blank table, manipulate it, then copy it to the production database. Maybe weekly, or biweekly. We were going to use SQL.