WebDAV Woes with Nginx, Sabre/Dav

I’m in the process of moving my hosting to a new server,
because I wanted one that offers me more flexibility, and the ability to grow
the server and add resources to it during spikes in demand. I’ve chosen to go
with Vultr (I recorded
a screencast
about six weeks ago showing how easy it is to set up a new
server on their platform). I’ve also moved some non-essential hosting duties to
another provider altogether, CloudAtCost.

Anyway, this is not really my point.

One of the things on the server I’m going to be decommissioning
is a private WebDAV store. I don’t use it for much, just moving the occasional
file between computers and “publishing” my work Outlook calendar so that I can subsequently
synchronize it back to my Google calendar and get notifications
on my wrist
. It’s the WebDAV server that I’ve been setting up this week.

Most of the stuff that I’m moving to new servers is being
moved as-is: this is not an exercise in updating stuff, it’s about making sure
I’m done with the old server by the time my lease on it expires, but there were
some things about the WebDAV share that I really wanted to update, so I took
the opportunity.

The main thing I wanted to achieve was to use my Windows
domain username and password
on the site. Most of my password-protected web
tools are already set up that way, but the WebDAV share was lagging behind.
Since this means I have to use “basic”
authentication instead of the “digest” authentication
I previously had set
up this posed another problem. Windows’ built-in WebDAV client doesn’t allow
basic authentication on unencrypted connections (because that means the
password is sent in the clear), so I had an SSL certificate issued. Then I
found out that the Windows WebDAV client doesn’t support server name
, which meant some additional reconfiguration, and since I
was doing that I figured I may as well take the opportunity to update to the
latest version of sabre/dav, which is the
PHP-based WebDAV server I use (I find it much easier to set this up than to use
the built-in WebDAV functionality on web server software, which I’ve never been
able to get working no matter which server software I’m using).

I set all this up this week, tested it out by adding
it as a network location
on my personal and work laptops, and, once I was
satisfied it was all working well, pointed the domain name at the new server
and deleted the files from the old one.

Then I fired up Outlook, and hit the button to publish my

It didn’t work.

It ended up creating a file with the right name, but a size
of zero bytes. A quick google search revealed there could be many reasons for this, and since I’d
made the rookie mistake of changing everything
I really didn’t know where to start, not to mention that by this time I’d
deleted the original files and so I couldn’t go backward. I tried everything,
with no success. I spent a good chunk of my day on Tuesday troubleshooting.

All along I’d been convinced that the issue was with sabre/dav.
After all, all the other server functionality was working, so what other
explanation could there be for the one bit of it that sabre/dav was responsible
for being non-functional?

After a few hours though I was pretty sure that I had it set
up correctly, and I was convinced that I’d either found a bug in sabre/dav or nginx. I checked the nginx logs.

2015/06/23 16:24:41 [error] 18736#0: *33 client intended to
send too large body: 1945486 bytes, client: 75.159.xxx.xxx, server: xxxxxx.jnf.me, request: "PUT /Calendars/Williams_Jason_Calendar.ics HTTP/1.1", host: "xxxxxx.jnf.me"


All the files I’d tested the share with were very small, but
my published calendar with 30 days history and 60 days of future events was
1.85mb. The server was configured to accept uploads with a maximum size of 1mb.

I added a single line to my nginx server configuration:

client_max_body_size 100m;

Done! It’s so obvious when you know how.

Prevent Forwarding, Replying or Reply-All in Outlook

About a month ago I wrote a post that detailed how to prevent attendees from forwarding your Outlook meetings to other people.

Since then I’ve expanded upon it slightly on my own computer: in addition to the option to prevent meetings from being forwarded, I’ve added similar buttons to the new email toolbar that can prevent forwarding, replying or replies to all.

Preventing people from hitting “reply all” is sometimes a great tactic if you’re sending an email to particularly large group and you don’t want everybody to get caught up in any follow-up. By contrast, preventing replies (thus forcing people to use “reply all” instead) is great if you want the opposite, and for everyone to be kept in the loop.

My previous post details the process of setting all this up, but below is the code for the four macros. The first disables forwarding, the second disables replies, the third disables reply all and the final re-enables all response options. By default, nothing is disabled on new items unless you hit the relevant button to run the macro.


Sub DisableForwarding()
    ActiveInspector.CurrentItem.Actions("Forward").Enabled = False
    X = MsgBox("Forwarding of this item has been disabled", vbInformation, "Forwarding Disabled")
End Sub

Sub DisableReply()
    ActiveInspector.CurrentItem.Actions("Reply").Enabled = False
    X = MsgBox("Replies to this item have been disabled", vbInformation, "Forwarding Disabled")
End Sub

Sub DisableReplyAll()
    ActiveInspector.CurrentItem.Actions("Reply to All").Enabled = False
    X = MsgBox("Reply All has been disabled for this item", vbInformation, "Forwarding Disabled")
End Sub

Sub EnableAllResponses()
    ActiveInspector.CurrentItem.Actions("Forward").Enabled = True
    ActiveInspector.CurrentItem.Actions("Reply").Enabled = True
    ActiveInspector.CurrentItem.Actions("Reply to All").Enabled = True
    X = MsgBox("Forwarding, Replies and Reply All have been enabled for this item", vbInformation, "Forwarding Disabled")
End Sub

Prevent Forwarding of Outlook Meetings

The ability to quickly and easily forward an Outlook meeting
to another recipient is an essential feature. Maybe you can’t make it and you
need to send a delegate. Maybe you identify from the invite that bringing along
a colleague who’s a subject matter expert would be beneficial. There are
probably many other scenarios.

As a meeting organizer though, it’s possible that you don’t
want people to be able to forward your meetings. Perhaps the location you have
booked is of a limited size. Perhaps the meeting content is sensitive and
discussion restricted to a particular group. There are probably many other
scenarios for wanting to keep tight control over the recipient list too.

Well, good news! I’ve recently discovered this is possible,
and with just a few lines of VBA you can create meetings that have the
“forward” button disabled. If a recipient wants to extend the invite to someone
else, they have to come back to you and ask that you do it for them.

It’s worth pointing out right at the top that this technique
only works in the Microsoft Outlook desktop client. You have to be using it,
and so do the meeting recipients. If your recipients also have their
email/calendar available to them on another client (including mobile devices
and webmail) then
they can use the other client to
forward the meeting.

It’s also worth pointing out that full credit for this goes
to user GranEYb
on Microsoft’s TechNet
. I have merely tidied up his/her instructions, and turned them into
a quick screencast. The instructions are for Outlook 2013. I know the code also
works in Outlook 2010. I haven’t tested it with other versions. YMMV.



First, enable developer tools in Outlook:

  1. Open Outlook 2013
  2. Click File
    -> Options -> Customize Ribbon
  3. In the right-hand pane, place a checkmark next
    to the Developer group and click OK

Open Visual Basic for Applications and write the code:

  1. Navigate to the Developer tab on the ribbon, and
    select Visual Basic
  2. In the Visual Basic for Applications window,
    click Insert -> Module
  3. Copy the code from below, and choose File -> Save, or click the Save
  4. Close the Visual Basic for Applications window

The code:

Sub DisableForwarding()
    ActiveInspector.CurrentItem.Actions("Forward").Enabled = False
    MsgBox "Forwarding of this item has been disabled"
End Sub

Sub EnableForwarding()
    ActiveInspector.CurrentItem.Actions("Forward").Enabled = True
    MsgBox "Forwarding of this item has been enabled"
End Sub

Create the
buttons in Outlook:

  1. Open
    Outlook calendar
  2. Click
    New Appointment
  3. Click
    File -> Options -> Customize
  4. In
    the right-hand pane, select the Appointment tab and click New Group
  5. Select
    the New Group (Custom) item and click Rename
  6. In
    the Display Name box, enter Forward
    . Click OK
  7. In
    the left-hand pane, select the Choose Commands From: dropdown and select Macros
  8. Select
    Project1.DisableForwarding and click the Add
    button between the panes
  9. Select
    Project1.EnableForwarding and click the Add
    button between the panes
  10. In
    the right-hand pane, select Project1.DisableFowarding and click Rename
  11. In
    the Display Name box, enter Disable
    . Click OK
  12. In
    the right-hand pane, select Project1.EnableForwarding and click Rename
  13. In
    the Display Name box, enter Enable
    . Click OK
  14. Click
    OK at the bottom of the Outlook
    Options window

All done!
If you wish, you can now hide the developer tab that we enabled with the first
three steps.

To use the
tool, create a new meeting invite as you normally would, but before hitting the
send button hit the Disable Forwarding button first. Recipients of your invite
will find that the Forward button is disabled.


Meetings do
not have forwarding disabled by default, but if you need to re-enable
forwarding for any reason then the Enable Forwarding button is your friend.