Re: VM appliance I can download

classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Everyone on gmail is receiving the messages, but no one else is.

wvengen
Administrator
That was tricky!
If you have the time to list them, I'd love to hear what steps you needed to take.

- Willem

On 10-09-14 00:55, angelo [via foodsoft] wrote:
I have been working on this solidly since last we checked in.  In the end I used relay with a mailserver maintained by dreamhost, but I kept on getting "no mechanism available" errors from postfix.  

Nothing worked except installing a missing sasl component.

http://www.turnkeylinux.org/forum/general/20120916/configure-php-mail-lamp-appliance-gmail#comment-21239

Now all users are getting mail.


If you reply to this email, your message will be added to the discussion below:
http://foodsoft.51229.x6.nabble.com/Re-VM-appliance-I-can-download-tp863p898.html
To start a new topic under foodsoft-discuss, email [hidden email]
To unsubscribe from foodsoft-discuss, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Everyone on gmail is receiving the messages, but no one else is.

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.

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):

# http config for this host
# Required for action mailer
protocol: http
host: internet ip address of VM
# port: 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.
Reply | Threaded
Open this post in threaded view
|

Re: Everyone on gmail is receiving the messages, but no one else is.

wvengen
Administrator
Thanks, Angelo!

On 10-09-14 23:11, angelo [via foodsoft] wrote:
> 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.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
> [hidden email]: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:            '[hidden email]',
> 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 VM
> # port: 3000
>
>
> # email address to be used as sender
> email_sender: [hidden email]
> # contact info will be used as email from, but you can override it here
> email_from: [hidden email]
> # reply-to address for all emails (not set by default)
> #email_replyto: [hidden email]
>
> 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.

- Willem

Reply | Threaded
Open this post in threaded view
|

Re: Everyone on gmail is receiving the messages, but no one else is.

angelo
Another tkl question.  Can you get phpmyadmin to work?  We have had no luck.
Is there another tool you use?
Reply | Threaded
Open this post in threaded view
|

Re: Everyone on gmail is receiving the messages, but no one else is.

wvengen
Administrator
On 27-09-14 08:40, angelo [via foodsoft] wrote:
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 RAILS_ENV=production rails console. You'd need to know a bit about Rails, but you may do, for example:
User.find(5).ordergroup.name
Order.last.order_articles.count
Ordergroup.find_by_name('The House').group_orders.in_open_orders.max(:price)

What are you trying to achieve?
Reply | Threaded
Open this post in threaded view
|

Re: Everyone on gmail is receiving the messages, but no one else is.

Angelo
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.
12