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
c9ecb01d
...
c9ecb01d64d9355b72545fbd40edfc0a1aeb302e
authored
2010-10-08 10:29:23 +0300
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
maidag: remove `default' mode (superseded by --mda).
1 parent
51d1695e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
29 deletions
maidag/maidag.c
maidag/maidag.h
maidag/maidag.c
View file @
c9ecb01
...
...
@@ -18,7 +18,7 @@
#include "maidag.h"
enum
maidag_mode
maidag_mode
=
mode_
default
;
enum
maidag_mode
maidag_mode
=
mode_
mda
;
int
multiple_delivery
;
/* Don't return errors when delivering to multiple
recipients */
int
ex_quota_tempfail
;
/* Return temporary failure if mailbox quota is
...
...
@@ -420,7 +420,6 @@ static int
cb_delivery_mode
(
mu_debug_t
debug
,
void
*
data
,
mu_config_value_t
*
val
)
{
static
mu_kwd_t
mode_tab
[]
=
{
{
"default"
,
mode_default
},
{
"mda"
,
mode_mda
},
{
"url"
,
mode_url
},
{
"lmtp"
,
mode_lmtp
},
...
...
@@ -443,7 +442,7 @@ cb_delivery_mode (mu_debug_t debug, void *data, mu_config_value_t *val)
struct
mu_cfg_param
maidag_cfg_param
[]
=
{
{
"delivery-mode"
,
mu_cfg_callback
,
NULL
,
0
,
cb_delivery_mode
,
N_
(
"Set delivery mode"
),
N_
(
"mode: {
default |
mda | url | lmtp}"
)
},
N_
(
"mode: {mda | url | lmtp}"
)
},
{
"exit-multiple-delivery-success"
,
mu_cfg_bool
,
&
multiple_delivery
,
0
,
NULL
,
N_
(
"In case of multiple delivery, exit with code 0 if at least one "
"delivery succeeded."
)
},
...
...
@@ -574,8 +573,6 @@ main (int argc, char *argv[])
exit
(
EX_CONFIG
);
current_uid
=
getuid
();
if
(
maidag_mode
==
mode_default
&&
current_uid
==
0
)
maidag_mode
=
mode_mda
;
if
(
log_to_stderr
==
-
1
)
log_to_stderr
=
maidag_mode
==
mode_url
;
...
...
@@ -606,29 +603,6 @@ main (int argc, char *argv[])
}
return
maidag_lmtp_server
();
case
mode_default
:
{
static
char
*
s_argv
[
2
];
struct
mu_auth_data
*
auth
=
mu_get_auth_by_uid
(
current_uid
);
if
(
!
auth
)
{
mu_error
(
_
(
"cannot get username"
));
return
EX_UNAVAILABLE
;
}
if
(
argc
>
0
&&
strcmp
(
auth
->
name
,
argv
[
0
]))
{
mu_error
(
_
(
"recipients given when running as non-root"
));
return
EX_USAGE
;
}
s_argv
[
0
]
=
auth
->
name
;
argv
=
s_argv
;
argc
=
1
;
}
delivery_fun
=
deliver_to_user
;
break
;
case
mode_url
:
/* FIXME: Verify if the urls are deliverable? */
delivery_fun
=
deliver_to_url
;
...
...
maidag/maidag.h
View file @
c9ecb01
...
...
@@ -120,7 +120,6 @@ extern int debug_level;
enum
maidag_mode
{
mode_default
,
mode_mda
,
mode_url
,
mode_lmtp
...
...
Please
register
or
sign in
to post a comment