maildump
maildump copied to clipboard
virtual hosting in subfolders
we're using maildump for testing emails send by our web application.
i'm running it with /maildumpctl --http-ip 0.0.0.0
i'd like to have access to the webinterface via http://yourproject.com/maildump with the following nginx rule
location /maildump {
rewrite ^/maildump/?(.*)$ /$1 break;
proxy_pass http://internal.server:1080;
}
unfortunately maildump tries to fetches all other resources directly from / (eg /static/*, messages, socket.io)
so we need the following additional rules that might clash with our webapplication:
location /static/ {
proxy_pass http://internal.server:1080;
}
location /messages/ {
proxy_pass http://internal.server:1080;
}
location /socket.io/ {
proxy_pass http://internal.server:1080;
}
any plans to support virtual hosting via a -vhost-path=maildump argument?
I wonder if there's a cleaner way.. in a typical wsgi app there are env vars available to handle it automatically but I guess here that's not possible.
Anyway, if you submit a pull request to add this functionality using a new commandline argument I wouldn't mind adding it.