Hi,

On Fri, Mar 01, 2024 at 07:32:02PM +0530, Sagar Acharya wrote:
> How do I change the Home directory of popa3d. I am using the Maildir 
> extension and it seems it uses the env variables. How do I change this to 
> incorporate my custom Dir
> 
> /home/mail/{user}/Maildir

The code does not use env variables.  It supports two kinds of pathnames:

1. MAIL_SPOOL_PATH followed by username, e.g. "/var/spool/mail/user".

2. User home directory path followed by a "Mailbox" or (in your case)
"Maildir", e.g., "/home/user/Maildir".

As I understand, you want it to access "/home/mail/user/Maildir" with
the extra "/mail" component in the pathname.

The simplest way to do this would be to change the user's home directory
to be "/home/mail/user".

If you don't want to do the above, you'll have to modify popa3d's code.
You can change this line in pop_root.c:

        spool = pw->pw_dir;

to:

        spool = concat("/home/mail/", user, NULL);

and add:

#include "misc.h"

to the beginning of pop_root.c.

I assume this will be on top of the Maildir support patch and changes we
discussed in here in October last year.  I haven't tested this.

Alexander

Reply via email to