Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
84de61a4
...
84de61a48d89a05c13e7f5e6056246d08de8112b
authored
2002-02-27 11:54:47 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Use mu_path_maildir instead of maildir.
1 parent
425d200a
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
17 deletions
comsat/comsat.c
guimb/collect.c
imap4d/select.c
lib/mu_argp.c
mail.local/main.c
pop3d/apop.c
pop3d/user.c
comsat/comsat.c
View file @
84de61a
...
...
@@ -585,9 +585,9 @@ mailbox_path (const char *user)
if
(
!
mu_virtual_domain
)
{
mailbox_name
=
calloc
(
strlen
(
m
aildir
)
+
1
+
strlen
(
pw
->
pw_name
)
+
1
,
1
);
sprintf
(
mailbox_name
,
"%s%s"
,
maildir
,
pw
->
pw_name
);
mailbox_name
=
calloc
(
strlen
(
m
u_path_maildir
)
+
1
+
strlen
(
pw
->
pw_name
)
+
1
,
1
);
sprintf
(
mailbox_name
,
"%s%s"
,
m
u_path_m
aildir
,
pw
->
pw_name
);
}
else
{
...
...
guimb/collect.c
View file @
84de61a
...
...
@@ -28,7 +28,7 @@ collect_open_default ()
if
(
!
default_mailbox
)
{
asprintf
(
&
default_mailbox
,
"%s%s"
,
maildir
,
user_name
);
asprintf
(
&
default_mailbox
,
"%s%s"
,
m
u_path_m
aildir
,
user_name
);
if
(
!
default_mailbox
)
{
util_error
(
"not enough memory"
);
...
...
imap4d/select.c
View file @
84de61a
...
...
@@ -62,13 +62,14 @@ imap4d_select0 (struct imap4d_command *command, char *arg, int flags)
pw
=
mu_getpwuid
(
getuid
());
if
(
pw
)
{
mailbox_name
=
malloc
(
strlen
(
maildir
)
+
strlen
(
pw
->
pw_name
)
+
1
);
mailbox_name
=
malloc
(
strlen
(
mu_path_maildir
)
+
strlen
(
pw
->
pw_name
)
+
1
);
if
(
!
mailbox_name
)
{
syslog
(
LOG_ERR
,
"Not enough memory"
);
return
util_finish
(
command
,
RESP_NO
,
"Not enough memory"
);
}
sprintf
(
mailbox_name
,
"%s%s"
,
maildir
,
pw
->
pw_name
);
sprintf
(
mailbox_name
,
"%s%s"
,
m
u_path_m
aildir
,
pw
->
pw_name
);
}
else
mailbox_name
=
strdup
(
"/dev/null"
);
...
...
lib/mu_argp.c
View file @
84de61a
...
...
@@ -125,7 +125,6 @@ struct argp_child mu_daemon_argp_child[] =
{
NULL
,
0
,
NULL
,
0
}
};
char
*
maildir
=
MU_PATH_MAILDIR
;
int
log_facility
=
LOG_FACILITY
;
int
mu_argp_error_code
=
1
;
...
...
@@ -198,7 +197,7 @@ mu_common_argp_parser (int key, char *arg, struct argp_state *state)
switch
(
key
)
{
case
'm'
:
maildir
=
arg
;
m
u_path_m
aildir
=
arg
;
break
;
case
'L'
:
...
...
@@ -255,13 +254,13 @@ mu_common_argp_parser (int key, char *arg, struct argp_state *state)
#endif
case
ARGP_KEY_FINI
:
p
=
mu_normalize_maildir
(
maildir
);
p
=
mu_normalize_maildir
(
m
u_path_m
aildir
);
if
(
!
p
)
{
mu_error
(
"Badly formed maildir: %s"
,
maildir
);
mu_error
(
"Badly formed maildir: %s"
,
m
u_path_m
aildir
);
exit
(
mu_argp_error_code
);
}
maildir
=
p
;
m
u_path_m
aildir
=
p
;
break
;
default:
...
...
mail.local/main.c
View file @
84de61a
...
...
@@ -447,13 +447,13 @@ deliver (FILE *fp, char *name)
return
;
}
path
=
malloc
(
strlen
(
maildir
)
+
strlen
(
name
)
+
1
);
path
=
malloc
(
strlen
(
m
u_path_m
aildir
)
+
strlen
(
name
)
+
1
);
if
(
!
path
)
{
mailer_err
(
"Out of memory"
);
return
;
}
sprintf
(
path
,
"%s%s"
,
maildir
,
name
);
sprintf
(
path
,
"%s%s"
,
m
u_path_m
aildir
,
name
);
if
((
status
=
mailbox_create
(
&
mbox
,
path
))
!=
0
)
{
...
...
pop3d/apop.c
View file @
84de61a
...
...
@@ -216,9 +216,9 @@ pop3d_apop (const char *arg)
if
(
setuid
(
pw
->
pw_uid
)
==
-
1
)
return
ERR_BAD_LOGIN
;
mailbox_name
=
calloc
(
strlen
(
maildir
)
+
1
mailbox_name
=
calloc
(
strlen
(
m
u_path_m
aildir
)
+
1
+
strlen
(
pw
->
pw_name
)
+
1
,
1
);
sprintf
(
mailbox_name
,
"%s%s"
,
maildir
,
pw
->
pw_name
);
sprintf
(
mailbox_name
,
"%s%s"
,
m
u_path_m
aildir
,
pw
->
pw_name
);
if
((
status
=
mailbox_create
(
&
mbox
,
mailbox_name
))
!=
0
||
(
status
=
mailbox_open
(
mbox
,
MU_STREAM_RDWR
))
!=
0
)
...
...
pop3d/user.c
View file @
84de61a
...
...
@@ -197,13 +197,14 @@ pop3d_user (const char *arg)
if
(
pw
->
pw_uid
>
0
&&
!
mu_virtual_domain
)
{
setuid
(
pw
->
pw_uid
);
mailbox_name
=
malloc
(
strlen
(
maildir
)
+
strlen
(
pw
->
pw_name
)
+
1
);
mailbox_name
=
malloc
(
strlen
(
mu_path_maildir
)
+
strlen
(
pw
->
pw_name
)
+
1
);
if
(
!
mailbox_name
)
{
syslog
(
LOG_ERR
,
"Not enough memory"
);
return
ERR_UNKNOWN
;
}
sprintf
(
mailbox_name
,
"%s%s"
,
maildir
,
pw
->
pw_name
);
sprintf
(
mailbox_name
,
"%s%s"
,
m
u_path_m
aildir
,
pw
->
pw_name
);
}
else
if
(
mu_virtual_domain
)
{
...
...
Please
register
or
sign in
to post a comment