develooper Front page | perl.qpsmtpd | Postings from January 2007

Re: How to get started with qpsmtpd?

Thread Previous | Thread Next
Hans Salvisberg
January 23, 2007 15:37
Re: How to get started with qpsmtpd?
Message ID:
Please bear with me -- I have to take this one step at a time...

Peter seems to favor the distributed (make install) approach and Michael 
the all-in-one-place. I think I have a better chance to get up and 
running with the latter, at least initially. If I have a user smtpd with 
a home directory of /home/smtpd, should the tmp directory and the source 
files (e.g. qpsmtpd-forkserver) both go into /home/smtpd, or should the 
source files go one level lower into /home/smtpd/qpsmtpd ? Or does it 
matter at all?

Michael Holzt wrote:
>> # ./qpsmtpd-forkserver
>> without the -u parameter (which is supposed to default to smtpd) results in the message:
>> Could not create spool_dir /root/tmp/: Permission denied at lib/ line 464.
>> Why would it try to create /root/tmp, if it's supposed to run as smtpd?
> Because you run it out of "/root" and it is supposed to used ~/tmp if not
> told otherwise. You might want to create a special directory for qpsmtpd,
> e.g. /opt/qpsmtpd and move qpsmtpd to there. If you then create
> /opt/qpsmtpd/tmp and make it owned by the smtpd-user, it should work.

Line 448 in calls  Qpsmtpd::Utils::tildeexp('~/tmp/');

This returns "/root/tmp/" when running as root, i.e. it uses the current 
user, no matter which  -u user  is set. If I hard-wire

    $Spool_dir = "/home/smtpd/tmp/";

on the next line, then I can run  ./qpstmpd-forkserver  successfully.

Without that hack, I can only run it with  -u root  -- is this a bug in


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About