# Re: VM appliance I can download

**URL:** <https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347>\
**Category:** Foodsoft Help\
**Created:** [August 19, 2014, 4:40pm UTC](https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347 "2014-08-19T16:40:57Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![wvengen](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/wvengen/32/4_2.png) [@wvengen](https://forum.foodcoops.net/u/wvengen)\
**Post date:** [August 19, 2014, 4:40pm UTC](https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347/1 "2014-08-19T16:40:57Z")

</div>

Hi Yann,

Thanks for your interest! I’m building an image with the latest releases  
(you can choose between the standard and foodcoop-adam fork on first  
boot), will provide a download link for an ISO when that’s done. Please  
not that the virtual machine image is going through testing, but it  
should be ok.

Cheers,

- Willem

p.s. feel free to use the mailing-list at  
[http://foodsoft.51229.x6.nabble.com/foodsoft-discuss-f5.html](http://foodsoft.51229.x6.nabble.com/foodsoft-discuss-f5.html) 🙂

---

<div class="post-metadata">

**Author:** ![yanncarlier](https://forum.foodcoops.net/letter_avatar_proxy/v4/letter/y/278dde/32.png) [@yanncarlier](https://forum.foodcoops.net/u/yanncarlier)\
**Post date:** [August 20, 2014, 3:12am UTC](https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347/2 "2014-08-20T03:12:37Z")

</div>

Hi Willem

Thank you,  
My plan is to test it first before deploying a production environment.  
Can you point the main differences between this version and foodcoop-adam fork?

Thank you, Yann

---

<div class="post-metadata">

**Author:** ![wvengen](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/wvengen/32/4_2.png) [@wvengen](https://forum.foodcoops.net/u/wvengen)\
**Post date:** [August 20, 2014, 3:24pm UTC](https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347/3 "2014-08-20T15:24:23Z")

</div>

Hi Yann,

Sounds good.

Standard foodsoft is what most people use. In the foodcoop-adam fork a  
number of things have changed:

- User-interface cleanup, hide elements that aren’t really relevant  
(for us right now).  
o removed: foodcoop, invoices, stock (menu items only)  
o member ordering screen was changed (doesn’t show all details though)
- Plugins  
o signup: allow prospective members to signup for an account  
o mollie: online payment (including handling membership fee)  
o current\_orders: to work on all open-but-not-yet-closed orders  
(e.g. printing a single list from different suppliers)  
o mailall: get email addresses from all members  
o userinfo: allow to login into other systems (phpBB) using  
foodsoft account  
o demo: can auto-create users on login, for a demonstration website  
o uservoice
- Allow to directly send order email to supplier when closing an order.
- Support direct import of Excel/OpenOffice.org files
- Allow different price\_markup percentages for different ordergroups
- and much more

The VM image currently contains standard foodsoft, and foodcoop-adam’s  
master branch.  
At some point, I want to merge foodcoop-adam’s branches to standard  
foodsoft, but that still requires some work.

Ok, I’ve built a virtual machine image:  
[https://order.foodcoop.nl/foodsoft/turnkeylinux-foodsoft.iso](https://order.foodcoop.nl/foodsoft/turnkeylinux-foodsoft.iso)  
Please note that (a) it is still in testing phase, please report and  
issues you might find; and (b) this is only a temporary location until  
the next version of TurnKey Linux, which will include Foodsoft henceforth.

After you’ve downloaded the image, create a virtual machine with the ISO  
attached, run from CD and install the Foodsoft app to hard drive. Answer  
the questions on next bootup, and you have a working Foodsoft  
installation. Then you probably want to log into the appliance, and edit  
/var/www/foodsoft/config/app\_config.yml (after which you’d want to  
restart the webserver).  
The only relevant data is the database, so if you want to migrate just  
store the database dump (or use TKLBAM).

Hope that gets you going!

Best,

- Willem

p.s. Most of foodcoop-adam’s plugins will also work on standard  
foodsoft. Read more… [https://github.com/foodcoops/foodsoft/wiki/Plugins](https://github.com/foodcoops/foodsoft/wiki/Plugins)

p.p.s. In addition to the two versions mentioned, there is  
foodcoop-adam’s feature-group\_order\_ajax-adam branch where most of my  
work is happening right now. This is sometimes a bit experimental code,  
though. Additional features here:

- Totally revamped member ordering view with articles from all  
non-closed orders (example  
[https://order.foodcoop.nl/kleingemaakt/demo](https://order.foodcoop.nl/kleingemaakt/demo), manuals  
[http://foodcoop-adam.github.io/](http://foodcoop-adam.github.io/) and member manual  
[http://foodsoft.51229.x6.nabble.com/attachment/517/0/foodsoft-handleiding-leden-kleingemaakt.pdf](http://foodsoft.51229.x6.nabble.com/attachment/517/0/foodsoft-handleiding-leden-kleingemaakt.pdf)).

- Plugins  
o payorder: members pay directly after ordering (more like a webshop)  
o multishared: support for a group of foodcoops working together

p.p.p.s. thanks for continuing the discussion on the mailing-list, so  
that everyone can participate.

---

<div class="post-metadata">

**Author:** ![angelo](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/angelo/32/5_2.png) [@angelo](https://forum.foodcoops.net/u/angelo)\
**Post date:** [August 29, 2014, 11:33pm UTC](https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347/4 "2014-08-29T23:33:36Z")

</div>

Thanks so much. It is really good to have it working in production.  
So far the only problems are with the invitation email.

there are character signifiers (’&lt’, ‘&quot’) in the email body, and this seems to happen as a result of irregularities in, and the url does not work because it includes the port number 3000.

I think that comes from config/initializers/load\_app\_config.rb because it contains references to “FoodsoftConfig[:host]” (which is also found in /app/mailers/mailer.rb) as well as the following:

url\_options.merge!({:port =\> FoodsoftConfig[:port]}) if FoodsoftConfig[:port]

other possibly relevant references I could find were

“@link” in /app/views/mailer/invite.text.haml

which seems to be defined in

“@link = accept\_invitation\_url(token: @invite.token)” in /app/mailers/mailer.rb

---

<div class="post-metadata">

**Author:** ![wvengen](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/wvengen/32/4_2.png) [@wvengen](https://forum.foodcoops.net/u/wvengen)\
**Post date:** [August 30, 2014, 11:22am UTC](https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347/5 "2014-08-30T11:22:06Z")

</div>

Hi Angelo,

I’m glad it’s useful to you!

As for the wrong url (port), there is configuration in  
config/app\_config.yml that sets this. What happens if you remove or  
comment port line altogether? You may also need to set the host at the  
same place.

Regarding the character siginifiers, would you like to send the raw  
mail? (anonymised is ok)

- Willem

---

<div class="post-metadata">

**Author:** ![angelo](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/angelo/32/5_2.png) [@angelo](https://forum.foodcoops.net/u/angelo)\
**Post date:** [August 30, 2014, 4:16pm UTC](https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347/6 "2014-08-30T16:16:04Z")

</div>

I would think taking out the action mailer port number in config.yml would break the outgoing mail capability, but I’ll try it!

Before I do, I’ll send you an invitation to the email address I have for you.

---

<div class="post-metadata">

**Author:** ![angelo](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/angelo/32/5_2.png) [@angelo](https://forum.foodcoops.net/u/angelo)\
**Post date:** [August 31, 2014, 5:27am UTC](https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347/7 "2014-08-31T05:27:07Z")

</div>

After eliminating the port number in app\_config.yml the invites are no longer received….Oh, wait. It just came in. but it took 5 minutes. Ok good.

I looked into removing the lt and rt signifiers in the mailer file I found the emails templates in (can’t remember where, now), but the quoting was too complicated, and the email is working after all, so I’m happy.

---

<div class="post-metadata">

**Author:** ![angelo](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/angelo/32/5_2.png) [@angelo](https://forum.foodcoops.net/u/angelo)\
**Post date:** [August 31, 2014, 8:35am UTC](https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347/8 "2014-08-31T08:35:13Z")

</div>

Now that the emails are going out, I would like for them not to trigger spam filters. One way to reliably do this is to configure action mailer to send email through gmail as per instructions here:  
[http://guides.rubyonrails.org/action\_mailer\_basics.html#action-mailer-configuration-for-gmail](http://guides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration-for-gmail)  
The instructions say to modify config/environments/$RAILS\_ENV.rb which unfortunately does not exist. (Can I just create it?)

Gmail seems to not like that the email address specified in app\_config.yml does not match where the email is really coming from. How does this work? What can I enter as the sender email in app\_config.yml that will not make receiving filters think its a spoof email? Do I just make up an email address@myserveripaddress?

---

<div class="post-metadata">

**Author:** ![wvengen](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/wvengen/32/4_2.png) [@wvengen](https://forum.foodcoops.net/u/wvengen)\
**Post date:** [September 1, 2014, 9:11am UTC](https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347/9 "2014-09-01T09:11:33Z")

</div>

Hi Angelo,

Thanks, I received the mail you forwarded (but not the invite). There is  
indeed a bug in Foodsoft, which I just fixed.  
The easiest way to fix that on your existing VM right now, is to apply  
the patch manually - if you are comfortable with that.  
[https://github.com/foodcoops/foodsoft/commit/0b08d461fa8d2e9e78aeb5fc5ed037415e901e29](https://github.com/foodcoops/foodsoft/commit/0b08d461fa8d2e9e78aeb5fc5ed037415e901e29)  
which just adds “raw” in front of the lines starting with “t”. This  
avoids the escaping.

If you’d rather have a new VM image, let me know.

- Willem

---

<div class="post-metadata">

**Author:** ![wvengen](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/wvengen/32/4_2.png) [@wvengen](https://forum.foodcoops.net/u/wvengen)\
**Post date:** [September 1, 2014, 9:28am UTC](https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347/10 "2014-09-01T09:28:46Z")

</div>

Hi Angelo,

Great you found instructions for using an external mail transport agent.  
With recent spam measures by providers, it is no luxury to set the  
“From” header to something that can be verified (see, for example,  
[http://www.dmarc.org/](http://www.dmarc.org/) ). This can be done in the foodcoop config in  
config/app\_config.yml with the email\_from option. When using GMail, set  
this to your GMail address. When using your own domain, you may want to  
include your server’s ip-address in the SPF record for the email domain.

Using noreply@my.ser.ver.ip may work, but I’m not sure of the (eventual)  
consequences when you’re not running a (fully maintained) mailserver  
(e.g. the effects of repeated bounces, dialup/consumer lists that some  
mail providers use). I’d say using GMail is the easiest. As long as  
you’re not exceeding mail volume limits (e.g. mass invitations, messages  
to all members and order result mails).

Cheers,

- Willem

---

<div class="post-metadata">

**Author:** ![angelo](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/angelo/32/5_2.png) [@angelo](https://forum.foodcoops.net/u/angelo)\
**Post date:** [September 2, 2014, 10:43am UTC](https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347/11 "2014-09-02T10:43:50Z")

</div>

Thanks again. It appears I will not be required to use external mail transport agent since SPF authorizes my email at the DNS level. For anyone reading this, here’s the gist:

And thanks for the fix on the escaping text in the emails. I’ll just do the manual fix.

---

<div class="post-metadata">

**Author:** ![wvengen](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/wvengen/32/4_2.png) [@wvengen](https://forum.foodcoops.net/u/wvengen)\
**Post date:** [September 2, 2014, 11:33am UTC](https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347/12 "2014-09-02T11:33:47Z")

</div>

Good to hear it’s working out. I’m curious to hear how you’ll be doing.

Cheers,

- Willem

---

<div class="post-metadata">

**Author:** ![angelo](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/angelo/32/5_2.png) [@angelo](https://forum.foodcoops.net/u/angelo)\
**Post date:** [September 3, 2014, 5:28am UTC](https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347/13 "2014-09-03T05:28:33Z")

</div>

Okay. So the SPF specification made it so gmail users receive their invites, but yahoo completely rejects them. They aren’t even in spam.

---

<div class="post-metadata">

**Author:** ![wvengen](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/wvengen/32/4_2.png) [@wvengen](https://forum.foodcoops.net/u/wvengen)\
**Post date:** [September 3, 2014, 9:20am UTC](https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347/14 "2014-09-03T09:20:10Z")

</div>

Did you set the From header to your address with the SPF record?  
Note that it may take up to a couple of days for DNS changes to  
propagate (even with small TTL).

---

<div class="post-metadata">

**Author:** ![angelo](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/angelo/32/5_2.png) [@angelo](https://forum.foodcoops.net/u/angelo)\
**Post date:** [September 3, 2014, 4:41pm UTC](https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347/15 "2014-09-03T16:41:10Z")

</div>

> Did you set the From header to your address with the SPF record? Note that it may take up to a couple of days for DNS changes to propagate (even with small TTL).

I did set the from header and SPF header as you instructed. When I did, Gmail instantly stopped marking as spam, but yahoo (and your mail) still rejects. I’ll give it a couple days.

---

<div class="post-metadata">

**Author:** ![angelo](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/angelo/32/5_2.png) [@angelo](https://forum.foodcoops.net/u/angelo)\
**Post date:** [September 3, 2014, 5:05pm UTC](https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347/16 "2014-09-03T17:05:28Z")

</div>

> set the From header to your address with the SPF record

Oh wait. No. I did not do that, exactly. I set the SPF record to the ipv6 server address and the From header to a the .org email address I write to you with… It makes sense that it works with google because the .org email address I write you with is done through gmail servers.

---

<div class="post-metadata">

**Author:** ![angelo](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/angelo/32/5_2.png) [@angelo](https://forum.foodcoops.net/u/angelo)\
**Post date:** [September 4, 2014, 8:55pm UTC](https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347/17 "2014-09-04T20:55:58Z")

</div>

Before I added any spf record, gmail users were receiving the mail from the system as spam. Right after I created the spf record, gmail users all started getting their mail. At that point I decided to check with yahoo users (and @foodcoop.nl uses), and they are not. When I check the full message of the messages that the gmail users are receiving, I see that the spf record is working (Received-SPF: pass …see below).

I tried setting the From header to “postmaster@serveripaddress”, so that there was complete agreement between the SPF record and the From header. That made it so that gmail users could not receive their messages, and it did not help with the others either, so I put it back to the same address I write you with (hereafter [sender@myactualcoop.org](mailto:sender@myactualcoop.org))

I then tried setting the DNS for our coop website to point to the local VM in case that’s the problem, but no results.

The next thing I tried was adding google to the spf record ([https://support.google.com/a/answer/4568483?hl=en&ref\_topic=2759192](https://support.google.com/a/answer/4568483?hl=en&ref_topic=2759192)), since [sender@myactualcoop.org](mailto:sender@myactualcoop.org) is handles through gmail servers.

Here’s the full message from one of the successful emails:

Delivered-To: [receive@gmail.com](mailto:receive@gmail.com)  
Received: by 10.202.50.69 with SMTP id y66csp925763oiy;  
Thu, 4 Sep 2014 12:32:16 -0700 (PDT)  
X-Received: by 10.182.137.195 with SMTP id qk3mr7815649obb.5.1409859136446;  
Thu, 04 Sep 2014 12:32:16 -0700 (PDT)  
Return-Path: [sender@myactualcoop.org](mailto:sender@myactualcoop.org)  
Received: from localhost ([my:ip6:addr:ess:000:0000:0000])  
by [mx.google.com](http://mx.google.com) with ESMTP id ki2si3889565oeb.90.2014.09.04.12.32.16  
for [receive@gmail.com](mailto:receive@gmail.com);  
Thu, 04 Sep 2014 12:32:16 -0700 (PDT)  
Received-SPF: pass ([google.com](http://google.com): domain of [sender@myactualcoop.org](mailto:sender@myactualcoop.org) designates my:ip6:addr:ess:000:0000:0000 as permitted sender) client-ip=my:ip6:addr:ess:000:0000:0000;  
Authentication-Results: [mx.google.com](http://mx.google.com);  
spf=pass ([google.com](http://google.com): domain of [sender@myactualcoop.org](mailto:sender@myactualcoop.org) designates my:ip6:addr:ess:000:0000:0000 as permitted sender) [smtp.mail=sender@myactualcoop.org](mailto:smtp.mail=sender@myactualcoop.org)  
Received: by localhost (Postfix, from userid 33)  
id CFEDE6DFA; Thu, 4 Sep 2014 07:58:40 +0000 (UTC)  
Date: Thu, 04 Sep 2014 07:58:40 +0000  
From: FoodSoft [sender@myactualcoop.org](mailto:sender@myactualcoop.org)  
Sender: [sender@myactualcoop.org](mailto:sender@myactualcoop.org)  
To: [receive@gmail.com](mailto:receive@gmail.com)  
Message-ID: [54081bb0cb13a\_c2d35051248286d@foodsoft.mail](mailto:54081bb0cb13a_c2d35051248286d@foodsoft.mail)  
Subject: Invitation to the Foodcoop  
Mime-Version: 1.0  
Content-Type: text/plain;  
charset=UTF-8  
Content-Transfer-Encoding: 7bit  
errors-to: [sender@myactualcoop.org](mailto:sender@myactualcoop.org)

Perhaps yahoo doesn’t like the message-ID?

I am out of guesses

---

<div class="post-metadata">

**Author:** ![wvengen](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/wvengen/32/4_2.png) [@wvengen](https://forum.foodcoops.net/u/wvengen)\
**Post date:** [September 5, 2014, 11:10am UTC](https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347/18 "2014-09-05T11:10:47Z")

</div>

Short question: why didn’t you add the ipv4 address?

---

<div class="post-metadata">

**Author:** ![angelo](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/angelo/32/5_2.png) [@angelo](https://forum.foodcoops.net/u/angelo)\
**Post date:** [September 5, 2014, 5:15pm UTC](https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347/19 "2014-09-05T17:15:11Z")

</div>

I did not use the ip4 address because google would compare it to the ipv6 address and it would fail SPF. So I just copied the address google was comparing it to into the SPF record and it passed.

Since I’m trying everything under the sun, it might be fun to put the ipv4 address in the SPF record as well, although such methods are deemed “common mistakes” at [openspf.org](http://openspf.org). There is some discrepancy on the matter of whether to use “-all” or “~all” in the record.

---

<div class="post-metadata">

**Author:** ![angelo](https://forum.foodcoops.net/user_avatar/forum.foodcoops.net/angelo/32/5_2.png) [@angelo](https://forum.foodcoops.net/u/angelo)\
**Post date:** [September 9, 2014, 10:55pm UTC](https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347/20 "2014-09-09T22:55:12Z")

</div>

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](http://www.turnkeylinux.org/forum/general/20120916/configure-php-mail-lamp-appliance-gmail#comment-21239)

Now all users are getting mail.

[Next page](https://forum.foodcoops.net/t/re-vm-appliance-i-can-download/347.md?page=2)
