WebFaction
Community site: login faq

I am trying to install imapproxy but I encounter a strange behavior.

I Created a custom app named imapproxy with assigned port 24923.

I downloaded and extracted the source files of squirrelmail-imap_proxy-1.2.7. Then:

./configure --prefix=$HOME --exec-prefix=$HOME
# I am a sed newbie, but these fix the wrong permissions and path hardcoded in the Makefile
sed -i s@'-o bin -g bin'@"-o $USER -g $USER"@ Makefile
sed -i s@'-o root -g sys'@"-o $USER -g $USER"@ Makefile
sed -i s@'-o root -g bin'@"-o $USER -g $USER"@ Makefile
sed -i s@'ETC =  /etc'@'ETC =  $(prefix)/etc/'@ Makefile
sed -i '92 i \\tmkdir -p $(ETC)' Makefile
sed -i s@'./scripts/imapproxy.conf $(ETC)'@'./scripts/imapproxy.conf $(ETC)/imapproxy.conf'@ Makefile
sed -i s@'$(sbindir)'@'$(bindir)'@ Makefile
make
make install
make install-conf

The make command only generates a warning:

src/main.c: In function ‘main’:
src/main.c:696: warning: cast to pointer from integer of different size

The make install and make-install config commands correctly place the following files:

imapproxy.conf in $HOME/etc
in.imapproxyd and pimpstat in $HOME/bin

Then, I edit imapproxy.conf and edit what I think are the relevant variables:

server_hostname mail.webfaction.com
listen_port 24923
proc_username dgraziotin
proc_groupname dgraziotin
stat_filename /home/dgraziotin/run/pimpstat
protocol_log_filename /home/dgraziotin/log/imapproxy_protocol.log

I make sure that run/ and log/ exist, of course.

Then I try to run the program:

 ~/bin/in.imapproxyd  -f$HOME/etc/imapproxy.conf -p$HOME/run/imapproxy.run

The command returns nothing. ps aux |grep imap returns nothing. run/ and log/ are empty.

May someone help me, please?

asked 23 May '12, 11:43

dgraziotin
123
accept rate: 0%


You may submit a support ticket if you would like us to take a look at the account directly. It is hard to say where the failure may be from this alone.

permanent link

answered 23 May '12, 19:51

johns
5.4k312
accept rate: 23%

imapproxy won't run as is, because it assumes it is being launched as root, and then tries to change the process user and group to what you specify in the config. Since regular users aren't allowed to do that, it fails to run.

To work around that, I forked imapproxy over to Github and wrapped that part of the code in a condition that doesn't try to change the process user and group if it's already running as a non-root user. The repo and documentation are here: imapproxy-nonroot

Hope that helps!

permanent link

answered 18 Mar '16, 23:05

seanf
12.2k42136
accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×25
×22
×21
×1

question asked: 23 May '12, 11:43

question was seen: 2,785 times

last updated: 18 Mar '16, 23:05

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM