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
b944f483
...
b944f483f908502d74f6444326ba480a9b30ffbe
authored
2002-12-24 08:25:36 +0000
by
Wojciech Polak
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Added NLS (guimb/imap4d/mailutils-config/sieve)
1 parent
50f245bf
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
217 additions
and
180 deletions
ChangeLog
guimb/collect.c
guimb/guimb.h
guimb/main.c
guimb/util.c
imap4d/auth_gss.c
imap4d/authenticate.c
imap4d/bye.c
imap4d/imap4d.c
imap4d/imap4d.h
imap4d/list.c
imap4d/login.c
imap4d/search.c
imap4d/signal.c
imap4d/util.c
mailbox/mailutils-config.c
po/POTFILES.in
sieve/Makefile.am
sieve/sieve.c
ChangeLog
View file @
b944f48
2002
-
12
-
24
Wojciech
Polak
<
polak
@gnu
.
org
>
*
po
/
POTFILES
.
in
:
Updated
.
*
imap4d
/*: Added NLS.
* guimb/*: Likewise.
* sieve/sieve.c: Likewise.
2002-12-23 Wojciech Polak <polak@gnu.org>
* po/: New directory.
...
...
guimb/collect.c
View file @
b944f48
/* GNU
mailutils
- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
/* GNU
Mailutils -
- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001
, 2002
Free Software Foundation, Inc.
This program
is free software; you can redistribute it and/or modify
GNU Mailutils
is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program
is distributed in the hope that it will be useful,
GNU Mailutils
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with
this program
; if not, write to the Free Software
along with
GNU Mailutils
; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "guimb.h"
...
...
@@ -31,14 +31,14 @@ collect_open_default ()
asprintf
(
&
default_mailbox
,
"%s%s"
,
mu_path_maildir
,
user_name
);
if
(
!
default_mailbox
)
{
util_error
(
"not enough memory"
);
util_error
(
_
(
"not enough memory"
)
);
exit
(
1
);
}
}
if
(
mailbox_create
(
&
mbox
,
default_mailbox
)
!=
0
||
mailbox_open
(
mbox
,
MU_STREAM_RDWR
)
!=
0
)
{
util_error
(
"can't open default mailbox %s: %s"
,
util_error
(
_
(
"can't open default mailbox %s: %s"
)
,
default_mailbox
,
mu_errstring
(
errno
));
exit
(
1
);
}
...
...
@@ -82,7 +82,7 @@ collect_append_file (char *name)
fp
=
fopen
(
name
,
"r"
);
if
(
!
fp
)
{
util_error
(
"can't open input file %s: %s"
,
name
,
strerror
(
errno
));
util_error
(
_
(
"can't open input file %s: %s"
)
,
name
,
strerror
(
errno
));
return
-
1
;
}
}
...
...
@@ -110,7 +110,7 @@ collect_create_mailbox ()
if
(
mailbox_create
(
&
mbox
,
temp_filename
)
!=
0
||
mailbox_open
(
mbox
,
MU_STREAM_READ
)
!=
0
)
{
util_error
(
"can't create temp mailbox %s: %s"
,
util_error
(
_
(
"can't create temp mailbox %s: %s"
)
,
temp_filename
,
strerror
(
errno
));
unlink
(
temp_filename
);
exit
(
1
);
...
...
@@ -121,7 +121,7 @@ collect_create_mailbox ()
if
(
nmesg
==
0
)
{
util_error
(
"input format not recognized"
);
util_error
(
_
(
"input format not recognized"
)
);
exit
(
1
);
}
}
...
...
@@ -146,7 +146,7 @@ collect_output ()
||
mailbox_open
(
outbox
,
MU_STREAM_RDWR
|
MU_STREAM_CREAT
)
!=
0
)
{
mailbox_destroy
(
&
outbox
);
fprintf
(
stderr
,
"guimb: can't open output mailbox %s: %s
\n
"
,
fprintf
(
stderr
,
_
(
"guimb: can't open output mailbox %s: %s
\n
"
)
,
default_mailbox
,
strerror
(
errno
));
return
1
;
}
...
...
guimb/guimb.h
View file @
b944f48
/* GNU
mailutils
- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
/* GNU
Mailutils -
- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001
, 2002
Free Software Foundation, Inc.
This program
is free software; you can redistribute it and/or modify
GNU Mailutils
is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program
is distributed in the hope that it will be useful,
GNU Mailutils
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with
this program
; if not, write to the Free Software
along with
GNU Mailutils
; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#if defined(HAVE_CONFIG_H)
...
...
@@ -35,6 +35,7 @@
#include <mailutils/error.h>
#include <mailutils/address.h>
#include <mailutils/registrar.h>
#include <mailutils/nls.h>
#include <mu_asprintf.h>
#include <libguile.h>
...
...
guimb/main.c
View file @
b944f48
/* GNU
mailutils
- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
/* GNU
Mailutils -
- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001
, 2002
Free Software Foundation, Inc.
This program
is free software; you can redistribute it and/or modify
GNU Mailutils
is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program
is distributed in the hope that it will be useful,
GNU Mailutils
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with
this program
; if not, write to the Free Software
along with
GNU Mailutils
; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "guimb.h"
...
...
@@ -42,7 +42,7 @@ append_arg (char *arg)
g_argv
=
realloc
(
g_argv
,
g_size
*
sizeof
(
g_argv
[
0
]));
if
(
!
g_argv
)
{
util_error
(
"not enough memory"
);
util_error
(
_
(
"not enough memory"
)
);
exit
(
1
);
}
}
...
...
@@ -51,23 +51,23 @@ append_arg (char *arg)
static
struct
argp_option
options
[]
=
{
{
NULL
,
0
,
NULL
,
0
,
"The following switches stop argument processing, and pass all
\n
"
"remaining arguments as the value of (command-line):"
,
1
},
{
"code"
,
'c'
,
"EXPR"
,
0
,
"Execute given scheme expression."
,
1
},
N_
(
"The following switches stop argument processing, and pass all
\n
"
"remaining arguments as the value of (command-line):"
)
,
1
},
{
"code"
,
'c'
,
"EXPR"
,
0
,
N_
(
"Execute given scheme expression."
)
,
1
},
{
"source"
,
's'
,
"PROGFILE"
,
0
,
"Load Scheme source code from PROGFILE, and exit"
,
1
},
N_
(
"Load Scheme source code from PROGFILE, and exit"
)
,
1
},
{
NULL
,
0
,
NULL
,
0
,
"The following options do not change the order of options parsing:"
,
2
},
{
"expression"
,
'e'
,
"EXPR"
,
0
,
"Execute given scheme expression."
,
2
},
N_
(
"The following options do not change the order of options parsing:"
)
,
2
},
{
"expression"
,
'e'
,
"EXPR"
,
0
,
N_
(
"Execute given scheme expression."
)
,
2
},
{
"file"
,
'f'
,
"PROGFILE"
,
0
,
"Load Scheme source code from PROGFILE, and exit"
,
2
},
{
NULL
,
0
,
NULL
,
0
,
"Other options:"
,
3
},
{
"debug"
,
'd'
,
NULL
,
0
,
"Start with debugging evaluator and backtraces."
,
3
},
N_
(
"Load Scheme source code from PROGFILE, and exit"
)
,
2
},
{
NULL
,
0
,
NULL
,
0
,
N_
(
"Other options:"
)
,
3
},
{
"debug"
,
'd'
,
NULL
,
0
,
N_
(
"Start with debugging evaluator and backtraces."
)
,
3
},
{
"guile-arg"
,
'g'
,
"ARG"
,
0
,
"Append ARG to the command line passed to Guile"
,
3
},
{
"mailbox"
,
'M'
,
"NAME"
,
0
,
"Set default mailbox name"
,
3
},
N_
(
"Append ARG to the command line passed to Guile"
)
,
3
},
{
"mailbox"
,
'M'
,
"NAME"
,
0
,
N_
(
"Set default mailbox name"
)
,
3
},
{
"user"
,
'u'
,
"NAME"
,
OPTION_ARG_OPTIONAL
,
"Act as local MDA for user NAME"
,
3
},
N_
(
"Act as local MDA for user NAME"
)
,
3
},
{
0
,
0
,
0
,
0
}
};
...
...
@@ -120,9 +120,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
const
char
*
argp_program_version
=
"guimb ("
PACKAGE_STRING
")"
;
static
char
doc
[]
=
"GNU guimb -- Process the contents of the specified mailboxes
\n
"
"using a Scheme program or expression."
;
static
char
args_doc
[]
=
"[mailbox...]"
;
N_
(
"GNU guimb -- Process the contents of the specified mailboxes
\n
"
"using a Scheme program or expression."
)
;
static
char
args_doc
[]
=
N_
(
"[mailbox...]"
)
;
static
struct
argp
argp
=
{
options
,
...
...
@@ -147,6 +147,9 @@ main (int argc, char *argv[])
guimb_param_t
param
;
struct
guimb_data
gd
;
/* Native Language Support */
mu_init_nls
();
append_arg
(
""
);
mu_argp_parse
(
&
argp
,
&
argc
,
&
argv
,
0
,
guimb_argp_capa
,
NULL
,
&
c
);
...
...
@@ -160,7 +163,7 @@ main (int argc, char *argv[])
g_argv
[
0
]
=
program_file
;
else
if
(
!
program_expr
)
{
mu_error
(
"At least one of -fecs must be used. Try guimb --help for more info"
);
mu_error
(
_
(
"At least one of -fecs must be used. Try guimb --help for more info."
)
);
exit
(
0
);
}
...
...
guimb/util.c
View file @
b944f48
/* GNU
mailutils
- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
/* GNU
Mailutils -
- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001
, 2002
Free Software Foundation, Inc.
This program
is free software; you can redistribute it and/or modify
GNU Mailutils
is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program
is distributed in the hope that it will be useful,
GNU Mailutils
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with
this program
; if not, write to the Free Software
along with
GNU Mailutils
; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "guimb.h"
...
...
@@ -47,14 +47,14 @@ util_get_sender (int msgno)
if
(
envelope_sender
(
env
,
buffer
,
sizeof
(
buffer
),
NULL
)
||
address_create
(
&
addr
,
buffer
))
{
util_error
(
"can't determine sender name (msg %d)"
,
msgno
);
util_error
(
_
(
"can't determine sender name (msg %d)"
)
,
msgno
);
return
NULL
;
}
}
if
(
address_get_email
(
addr
,
1
,
buffer
,
sizeof
(
buffer
),
NULL
))
{
util_error
(
"can't determine sender name (msg %d)"
,
msgno
);
util_error
(
_
(
"can't determine sender name (msg %d)"
)
,
msgno
);
address_destroy
(
&
addr
);
return
NULL
;
}
...
...
@@ -62,3 +62,4 @@ util_get_sender (int msgno)
address_destroy
(
&
addr
);
return
strdup
(
buffer
);
}
...
...
imap4d/auth_gss.c
View file @
b944f48
/* GNU
mailutils
- a suite of utilities for electronic mail
Copyright (C) 1999, 2001 Free Software Foundation, Inc.
/* GNU
Mailutils -
- a suite of utilities for electronic mail
Copyright (C) 1999, 2001
, 2002
Free Software Foundation, Inc.
This program
is free software; you can redistribute it and/or modify
GNU Mailutils
is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program
is distributed in the hope that it will be useful,
GNU Mailutils
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with
this program
; if not, write to the Free Software
along with
GNU Mailutils
; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* GSSAPI authentication for imap (rfc 1731).
...
...
@@ -49,7 +49,7 @@ display_status_1 (char *m, OM_uint32 code, int type)
type
,
GSS_C_NULL_OID
,
&
msg_ctx
,
&
msg
);
syslog
(
LOG_ERR
,
"GSS-API error %s: %s
\n
"
,
m
,
_
(
"GSS-API error %s: %s
\n
"
)
,
m
,
(
char
*
)
msg
.
value
);
gss_release_buffer
(
&
min_stat
,
&
msg
);
}
...
...
@@ -220,7 +220,7 @@ auth_gssapi (struct imap4d_command *command, char **username)
if
((
mech
&
SUPPORTED_P_MECH
)
==
0
)
{
syslog
(
LOG_NOTICE
,
"client requested unsupported protection mechanism (%d)"
,
_
(
"client requested unsupported protection mechanism (%d)"
)
,
mech
);
gss_release_buffer
(
&
min_stat
,
&
outbuf
);
maj_stat
=
gss_delete_sec_context
(
&
min_stat
,
&
context
,
&
outbuf
);
...
...
@@ -250,7 +250,7 @@ auth_gssapi (struct imap4d_command *command, char **username)
if
(
imap4d_gss_userok
(
&
client_name
,
*
username
))
{
syslog
(
LOG_NOTICE
,
"GSSAPI user %s is NOT authorized as %s"
,
syslog
(
LOG_NOTICE
,
_
(
"GSSAPI user %s is NOT authorized as %s"
)
,
(
char
*
)
client_name
.
value
,
*
username
);
util_finish
(
command
,
RESP_NO
,
"GSSAPI user %s is NOT authorized as %s"
,
...
...
@@ -263,7 +263,7 @@ auth_gssapi (struct imap4d_command *command, char **username)
}
else
{
syslog
(
LOG_NOTICE
,
"GSSAPI user %s is authorized as %s"
,
syslog
(
LOG_NOTICE
,
_
(
"GSSAPI user %s is authorized as %s"
)
,
(
char
*
)
client_name
.
value
,
*
username
);
}
...
...
imap4d/authenticate.c
View file @
b944f48
...
...
@@ -71,7 +71,7 @@ imap4d_authenticate (struct imap4d_command *command, char *arg)
/* FIXME: Check for errors. */
chdir
(
homedir
);
namespace_init
(
homedir
);
syslog
(
LOG_INFO
,
"User '%s' logged in"
,
username
);
syslog
(
LOG_INFO
,
_
(
"User '%s' logged in"
)
,
username
);
return
0
;
}
...
...
imap4d/bye.c
View file @
b944f48
/* GNU
mailutils
- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
/* GNU
Mailutils -
- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001
, 2002
Free Software Foundation, Inc.
This program
is free software; you can redistribute it and/or modify
GNU Mailutils
is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program
is distributed in the hope that it will be useful,
GNU Mailutils
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with
this program
; if not, write to the Free Software
along with
GNU Mailutils
; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
...
...
@@ -40,39 +40,39 @@ imap4d_bye0 (int reason, struct imap4d_command *command)
{
case
ERR_NO_MEM
:
util_out
(
RESP_BYE
,
"Server terminating no more resources."
);
syslog
(
LOG_ERR
,
"Out of memory"
);
syslog
(
LOG_ERR
,
_
(
"Out of memory"
)
);
break
;
case
ERR_SIGNAL
:
if
(
ofile
)
util_out
(
RESP_BYE
,
"Quitting on signal"
);
syslog
(
LOG_ERR
,
"Quitting on signal"
);
syslog
(
LOG_ERR
,
_
(
"Quitting on signal"
)
);
break
;
case
ERR_TIMEOUT
:
util_out
(
RESP_BYE
,
"Session timed out"
);
if
(
state
==
STATE_NONAUTH
)
syslog
(
LOG_INFO
,
"Session timed out for no user"
);
syslog
(
LOG_INFO
,
_
(
"Session timed out for no user"
)
);
else
syslog
(
LOG_INFO
,
"Session timed out for user: %s"
,
auth_data
->
name
);
syslog
(
LOG_INFO
,
_
(
"Session timed out for user: %s"
)
,
auth_data
->
name
);
break
;
case
ERR_NO_OFILE
:
syslog
(
LOG_INFO
,
"No socket to send to"
);
syslog
(
LOG_INFO
,
_
(
"No socket to send to"
)
);
break
;
case
OK
:
util_out
(
RESP_BYE
,
"Session terminating."
);
if
(
state
==
STATE_NONAUTH
)
syslog
(
LOG_INFO
,
"Session terminating"
);
syslog
(
LOG_INFO
,
_
(
"Session terminating"
)
);
else
syslog
(
LOG_INFO
,
"Session terminating for user: %s"
,
auth_data
->
name
);
syslog
(
LOG_INFO
,
_
(
"Session terminating for user: %s"
)
,
auth_data
->
name
);
status
=
EXIT_SUCCESS
;
break
;
default:
util_out
(
RESP_BYE
,
"Quitting (reason unknown)"
);
syslog
(
LOG_ERR
,
"Unknown quit"
);
syslog
(
LOG_ERR
,
_
(
"Unknown quit"
)
);
break
;
}
...
...
@@ -82,4 +82,3 @@ imap4d_bye0 (int reason, struct imap4d_command *command)
exit
(
status
);
}
...
...
imap4d/imap4d.c
View file @
b944f48
/* GNU
mailutils
- a suite of utilities for electronic mail
Copyright (C) 1999, 2001 Free Software Foundation, Inc.
/* GNU
Mailutils -
- a suite of utilities for electronic mail
Copyright (C) 1999, 2001
, 2002
Free Software Foundation, Inc.
This program
is free software; you can redistribute it and/or modify
GNU Mailutils
is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program
is distributed in the hope that it will be useful,
GNU Mailutils
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with
this program
; if not, write to the Free Software
along with
GNU Mailutils
; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "imap4d.h"
...
...
@@ -37,14 +37,14 @@ struct daemon_param daemon_param = {
volatile
size_t
children
;
const
char
*
argp_program_version
=
"imap4d ("
PACKAGE_STRING
")"
;
static
char
doc
[]
=
"GNU imap4d -- the IMAP4D daemon"
;
static
char
doc
[]
=
N_
(
"GNU imap4d -- the IMAP4D daemon"
)
;
static
struct
argp_option
options
[]
=
{
{
"other-namespace"
,
'O'
,
"PATHLIST"
,
0
,
"set the `other' namespace"
,
0
},
N_
(
"set the `other' namespace"
)
,
0
},
{
"shared-namespace"
,
'S'
,
"PATHLIST"
,
0
,
"set the `shared' namespace"
,
0
},
N_
(
"set the `shared' namespace"
)
,
0
},
{
NULL
,
0
,
NULL
,
0
,
NULL
,
0
}
};
...
...
@@ -103,6 +103,9 @@ main (int argc, char **argv)
struct
group
*
gr
;
int
status
=
EXIT_SUCCESS
;
/* Native Language Support */
mu_init_nls
();
state
=
STATE_NONAUTH
;
/* Starting state in non-auth. */
MU_AUTH_REGISTER_ALL_MODULES
();
...
...
@@ -125,13 +128,13 @@ main (int argc, char **argv)
gr
=
getgrnam
(
"mail"
);
if
(
gr
==
NULL
)
{
perror
(
"Error getting mail group"
);
perror
(
_
(
"Error getting mail group"
)
);
exit
(
1
);
}
if
(
setgid
(
gr
->
gr_gid
)
==
-
1
)
{
perror
(
"Error setting mail group"
);
perror
(
_
(
"Error setting mail group"
)
);
exit
(
1
);
}
}
...
...
@@ -210,17 +213,17 @@ imap4d_mainloop (int infile, int outfile)
struct
sockaddr_in
cs
;
int
len
=
sizeof
cs
;
syslog
(
LOG_INFO
,
"Incoming connection opened"
);
syslog
(
LOG_INFO
,
_
(
"Incoming connection opened"
)
);
if
(
getpeername
(
infile
,
(
struct
sockaddr
*
)
&
cs
,
&
len
)
<
0
)
syslog
(
LOG_ERR
,
"can't obtain IP address of client: %s"
,
syslog
(
LOG_ERR
,
_
(
"can't obtain IP address of client: %s"
)
,
strerror
(
errno
));
else
syslog
(
LOG_INFO
,
"connect from %s"
,
inet_ntoa
(
cs
.
sin_addr
));
syslog
(
LOG_INFO
,
_
(
"connect from %s"
)
,
inet_ntoa
(
cs
.
sin_addr
));
text
=
"IMAP4rev1"
;
}
else
{
syslog
(
LOG_INFO
,
"Started in debugging mode"
);
syslog
(
LOG_INFO
,
_
(
"Started in debugging mode"
)
);
text
=
"IMAP4rev1 Debugging mode"
;
}
...
...
@@ -253,7 +256,7 @@ imap4d_daemon_init (void)
first three one, in, out, err */
if
(
daemon
(
0
,
0
)
<
0
)
{
perror
(
"fork failed:"
);
perror
(
_
(
"fork failed:"
)
);
exit
(
1
);
}
...
...
@@ -313,7 +316,7 @@ imap4d_daemon (unsigned int maxchildren, unsigned int port)
{
if
(
children
>
maxchildren
)
{
syslog
(
LOG_ERR
,
"too many children (%lu)"
,
syslog
(
LOG_ERR
,
_
(
"too many children (%lu)"
)
,
(
unsigned
long
)
children
);
pause
();
continue
;
...
...
@@ -347,5 +350,3 @@ imap4d_daemon (unsigned int maxchildren, unsigned int port)
}
}
...
...
imap4d/imap4d.h
View file @
b944f48
/* GNU
mailutils
- a suite of utilities for electronic mail
Copyright (C) 1999, 2001 Free Software Foundation, Inc.
/* GNU
Mailutils -
- a suite of utilities for electronic mail
Copyright (C) 1999, 2001
, 2002
Free Software Foundation, Inc.
This program
is free software; you can redistribute it and/or modify
GNU Mailutils
is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program
is distributed in the hope that it will be useful,
GNU Mailutils
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with
this program
; if not, write to the Free Software
along with
GNU Mailutils
; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifndef _IMAP4D_H
...
...
@@ -87,6 +87,7 @@
#include <mailutils/stream.h>
#include <mailutils/mu_auth.h>
#include <mailutils/url.h>
#include <mailutils/nls.h>
#ifdef __cplusplus
extern
"C"
{
...
...
imap4d/list.c
View file @
b944f48
/* GNU
mailutils
- a suite of utilities for electronic mail
Copyright (C) 1999, 2001 Free Software Foundation, Inc.
/* GNU
Mailutils -
- a suite of utilities for electronic mail
Copyright (C) 1999, 2001
, 2002
Free Software Foundation, Inc.
This program
is free software; you can redistribute it and/or modify
GNU Mailutils
is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program
is distributed in the hope that it will be useful,
GNU Mailutils
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with
this program
; if not, write to the Free Software
along with
GNU Mailutils
; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "imap4d.h"
...
...
@@ -243,7 +243,7 @@ list_file (const char *cwd, const char *ref, const char *pattern,
if
(
stat
(
entry
,
&
st
))
{
mu_error
(
"can't stat %s: %s"
,
mu_error
(
_
(
"can't stat %s: %s"
)
,
entry
,
strerror
(
errno
));
continue
;
}
...
...
imap4d/login.c
View file @
b944f48
/* GNU
mailutils
- a suite of utilities for electronic mail
Copyright (C) 1999, 2001 Free Software Foundation, Inc.
/* GNU
Mailutils -
- a suite of utilities for electronic mail
Copyright (C) 1999, 2001
, 2002
Free Software Foundation, Inc.
This program
is free software; you can redistribute it and/or modify
GNU Mailutils
is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program
is distributed in the hope that it will be useful,
GNU Mailutils
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with
this program
; if not, write to the Free Software
along with
GNU Mailutils
; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "imap4d.h"
...
...
@@ -39,7 +39,7 @@ imap4d_login (struct imap4d_command *command, char *arg)
if
(
auth_data
==
NULL
)
{
syslog
(
LOG_INFO
,
"User '%s': nonexistent"
,
arg
);
syslog
(
LOG_INFO
,
_
(
"User '%s': nonexistent"
)
,
arg
);
return
util_finish
(
command
,
RESP_NO
,
"User name or passwd rejected"
);
}
...
...
@@ -47,7 +47,7 @@ imap4d_login (struct imap4d_command *command, char *arg)
openlog
(
"gnu-imap4d"
,
LOG_PID
,
log_facility
);
if
(
rc
)
{
syslog
(
LOG_INFO
,
"Login failed: %s"
,
arg
);
syslog
(
LOG_INFO
,
_
(
"Login failed: %s"
)
,
arg
);
return
util_finish
(
command
,
RESP_NO
,
"User name or passwd rejected"
);
}
...
...
@@ -57,7 +57,7 @@ imap4d_login (struct imap4d_command *command, char *arg)
homedir
=
mu_normalize_path
(
strdup
(
auth_data
->
dir
),
"/"
);
chdir
(
homedir
);
namespace_init
(
homedir
);
syslog
(
LOG_INFO
,
"User '%s' logged in"
,
username
);
syslog
(
LOG_INFO
,
_
(
"User '%s' logged in"
)
,
username
);
return
util_finish
(
command
,
RESP_OK
,
"Completed"
);
}
...
...
imap4d/search.c
View file @
b944f48
/* GNU
mailutils
- a suite of utilities for electronic mail
Copyright (C) 1999, 2001 Free Software Foundation, Inc.
/* GNU
Mailutils -
- a suite of utilities for electronic mail
Copyright (C) 1999, 2001
, 2002
Free Software Foundation, Inc.
This program
is free software; you can redistribute it and/or modify
GNU Mailutils
is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program
is distributed in the hope that it will be useful,
GNU Mailutils
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with
this program
; if not, write to the Free Software
along with
GNU Mailutils
; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "imap4d.h"
...
...
@@ -481,7 +481,7 @@ parse_equiv_key (struct parsebuf *pb)
if
(
parse_search_key_list
(
pb
))
{
/* shouldn't happen */
syslog
(
LOG_CRIT
,
"%s:%d: INTERNAL ERROR"
,
__FILE__
,
__LINE__
);
syslog
(
LOG_CRIT
,
_
(
"%s:%d: INTERNAL ERROR"
)
,
__FILE__
,
__LINE__
);
abort
();
}
...
...
@@ -568,7 +568,7 @@ parse_simple_key (struct parsebuf *pb)
put_code
(
pb
,
(
inst_t
)
parse_regmem
(
pb
,
set
));
break
;
default:
syslog
(
LOG_CRIT
,
"%s:%d: INTERNAL ERROR"
,
__FILE__
,
__LINE__
);
syslog
(
LOG_CRIT
,
_
(
"%s:%d: INTERNAL ERROR"
)
,
__FILE__
,
__LINE__
);
abort
();
/* should never happen */
}
}
...
...
@@ -635,7 +635,7 @@ _search_pop (struct parsebuf *pb)
{
if
(
pb
->
tos
==
0
)
{
syslog
(
LOG_CRIT
,
"%s:%d: INTERNAL ERROR"
,
__FILE__
,
__LINE__
);
syslog
(
LOG_CRIT
,
_
(
"%s:%d: INTERNAL ERROR"
)
,
__FILE__
,
__LINE__
);
abort
();
/* shouldn't happen */
}
return
pb
->
stack
[
--
pb
->
tos
];
...
...
imap4d/signal.c
View file @
b944f48
/* GNU
mailutils
- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
/* GNU
Mailutils -
- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001
, 2002
Free Software Foundation, Inc.
This program
is free software; you can redistribute it and/or modify
GNU Mailutils
is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program
is distributed in the hope that it will be useful,
GNU Mailutils
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with
this program
; if not, write to the Free Software
along with
GNU Mailutils
; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
...
...
@@ -39,11 +39,11 @@ imap4d_sigchld (int signo)
RETSIGTYPE
imap4d_signal
(
int
signo
)
{
syslog
(
LOG_CRIT
,
"got signal %s"
,
strsignal
(
signo
));
syslog
(
LOG_CRIT
,
_
(
"got signal %s"
)
,
strsignal
(
signo
));
/* Master process. */
if
(
!
ofile
)
{
syslog
(
LOG_CRIT
,
"MASTER: exiting on signal"
);
syslog
(
LOG_CRIT
,
_
(
"MASTER: exiting on signal"
)
);
exit
(
1
);
/* abort(); */
}
...
...
imap4d/util.c
View file @
b944f48
/* GNU
mailutils
- a suite of utilities for electronic mail
Copyright (C) 1999, 2001 Free Software Foundation, Inc.
/* GNU
Mailutils -
- a suite of utilities for electronic mail
Copyright (C) 1999, 2001
, 2002
Free Software Foundation, Inc.
This program
is free software; you can redistribute it and/or modify
GNU Mailutils
is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program
is distributed in the hope that it will be useful,
GNU Mailutils
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with
this program
; if not, write to the Free Software
along with
GNU Mailutils
; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "imap4d.h"
...
...
@@ -447,9 +447,9 @@ imap4d_readline (FILE *fp)
if
(
fgets
(
buffer
,
sizeof
(
buffer
),
fp
)
==
NULL
)
{
if
(
feof
(
fp
))
syslog
(
LOG_INFO
,
"unexpected eof on input"
);
syslog
(
LOG_INFO
,
_
(
"unexpected eof on input"
)
);
else
if
(
errno
)
syslog
(
LOG_INFO
,
"error reading from input file: %m"
);
syslog
(
LOG_INFO
,
_
(
"error reading from input file: %m"
)
);
else
continue
;
imap4d_bye
(
ERR_NO_OFILE
);
...
...
@@ -979,7 +979,7 @@ util_localname ()
}
if
(
status
)
{
syslog
(
LOG_CRIT
,
"Can't find out my own hostname"
);
syslog
(
LOG_CRIT
,
_
(
"Can't find out my own hostname"
)
);
exit
(
1
);
}
...
...
mailbox/mailutils-config.c
View file @
b944f48
/* GNU
mailutils
- a suite of utilities for electronic mail
/* GNU
Mailutils -
- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This program
is free software; you can redistribute it and/or modify
GNU Mailutils
is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program
is distributed in the hope that it will be useful,
GNU Mailutils
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with
this program
; if not, write to the Free Software
along with
GNU Mailutils
; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifdef HAVE_CONFIG_H
...
...
@@ -22,22 +22,22 @@
#include <mailutils/argp.h>
const
char
*
argp_program_version
=
"mailutils-config ("
PACKAGE_STRING
")"
;
static
char
doc
[]
=
"GNU mailutils-config -- Display compiler and loader options needed for building a program with mailutils"
;
static
char
args_doc
[]
=
"[arg...]"
;
static
char
doc
[]
=
N_
(
"GNU mailutils-config -- Display compiler and loader options needed for building a program with mailutils"
)
;
static
char
args_doc
[]
=
N_
(
"[arg...]"
)
;
static
struct
argp_option
options
[]
=
{
{
"compile"
,
'c'
,
NULL
,
0
,
"print C compiler flags to compile with"
,
0
},
{
"compile"
,
'c'
,
NULL
,
0
,
N_
(
"print C compiler flags to compile with"
)
,
0
},
{
"link"
,
'l'
,
NULL
,
0
,
"print libraries to link with. Up to two args can be given. Arguments are: "
N_
(
"print libraries to link with. Up to two args can be given. Arguments are: "
"auth, to display libraries needed for linking against libmuauth, and "
"guile, to display libraries needed for linking against libmu_scm. "
"Both can be given simultaneously"
,
0
},
"Both can be given simultaneously"
)
,
0
},
{
"info"
,
'i'
,
NULL
,
0
,
"print a list of compilation options used to build mailutils. If arguments "
N_
(
"print a list of compilation options used to build mailutils. If arguments "
"are given, they are interpreted as a list of compilation options to check "
"for. In this case the program prints those options from this list that "
"have been defined. It exits with zero status if all of the "
"specified options are defined. Otherwise, the exit status is 1."
,
0
},
"specified options are defined. Otherwise, the exit status is 1."
)
,
0
},
{
0
,
0
,
0
,
0
}
};
...
...
po/POTFILES.in
View file @
b944f48
...
...
@@ -9,6 +9,23 @@ comsat/comsat.c
frm/frm.c
guimb/collect.c
guimb/main.c
guimb/util.c
imap4d/auth_gss.c
imap4d/authenticate.c
imap4d/imap4d.c
imap4d/bye.c
imap4d/list.c
imap4d/login.c
imap4d/search.c
imap4d/signal.c
imap4d/util.c
lib/getopt.c
lib/xmalloc.c
mail/alias.c
mail/alt.c
mail/copy.c
...
...
@@ -35,6 +52,7 @@ mail/var.c
mail/z.c
mailbox/argp-parse.c
mailbox/mailutils-config.c
messages/messages.c
...
...
@@ -48,5 +66,7 @@ pop3d/user.c
readmsg/readmsg.c
sieve/sieve.c
# EOF
...
...
sieve/Makefile.am
View file @
b944f48
...
...
@@ -4,8 +4,8 @@
INCLUDES
=
-I
${
top_srcdir
}
/include -I
${
top_srcdir
}
/lib
SUBDIRS
=
testsuite
bin_PROGRAMS
=
sieve
bin_PROGRAMS
=
sieve
sieve_SOURCES
=
sieve.c
sieve_LDADD
=
../libsieve/libsieve.la ../mailbox/libmailbox.la ../lib/libmailutils.la
sieve_LDFLAGS
=
-export-dynamic
...
...
sieve/sieve.c
View file @
b944f48
/* GNU
mailutils
- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
/* GNU
Mailutils -
- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001
, 2002
Free Software Foundation, Inc.
This program
is free software; you can redistribute it and/or modify
GNU Mailutils
is free software; you can redistribute it and/or modify
it under the terms of the GNU General Library Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program
is distributed in the hope that it will be useful,
GNU Mailutils
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with
this program
; if not, write to the Free Software
along with
GNU Mailutils
; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifdef HAVE_CONFIG_H
...
...
@@ -41,51 +41,52 @@
#include <mailutils/mutil.h>
#include <mailutils/registrar.h>
#include <mailutils/stream.h>
#include <mailutils/nls.h>
void
mutil_register_all_mbox_formats
(
void
);
const
char
*
argp_program_version
=
"sieve ("
PACKAGE_STRING
")"
;
static
char
doc
[]
=
"GNU sieve -- a mail filtering tool
\n
"
N_
(
"GNU sieve -- a mail filtering tool
\n
"
"
\v
"
"Debug flags:
\n
"
" g - main parser traces
\n
"
" T - mailutil traces (MU_DEBUG_TRACE)
\n
"
" P - network protocols (MU_DEBUG_PROT)
\n
"
" t - sieve trace (MU_SIEVE_DEBUG_TRACE)
\n
"
" i - sieve instructions trace (MU_SIEVE_DEBUG_INSTR)
\n
"
;
" i - sieve instructions trace (MU_SIEVE_DEBUG_INSTR)
\n
"
)
;
#define D_DEFAULT "TPt"
static
struct
argp_option
options
[]
=
{
{
"no-actions"
,
'n'
,
0
,
0
,
"No actions executed, just print what would be done"
,
0
},
N_
(
"No actions executed, just print what would be done"
)
,
0
},
{
"keep-going"
,
'k'
,
0
,
0
,
"Keep on going if execution fails on a message"
,
0
},
N_
(
"Keep on going if execution fails on a message"
)
,
0
},
{
"compile-only"
,
'c'
,
0
,
0
,
"Compile script and exit"
,
0
},
N_
(
"Compile script and exit"
)
,
0
},
{
"dump"
,
'D'
,
0
,
0
,
"Compile script, dump disassembled sieve code to terminal and exit"
,
0
},
N_
(
"Compile script, dump disassembled sieve code to terminal and exit"
)
,
0
},
{
"mbox-url"
,
'f'
,
"MBOX"
,
0
,
"Mailbox to sieve (defaults to user's mail spool)"
,
0
},
N_
(
"Mailbox to sieve (defaults to user's mail spool)"
)
,
0
},
{
"ticket"
,
't'
,
"TICKET"
,
0
,
"Ticket file for mailbox authentication"
,
0
},
N_
(
"Ticket file for mailbox authentication"
)
,
0
},
{
"debug"
,
'd'
,
"FLAGS"
,
OPTION_ARG_OPTIONAL
,
"Debug flags (defaults to
\"
"
D_DEFAULT
"
\"
)"
,
0
},
N_
(
"Debug flags (defaults to
\"
"
D_DEFAULT
"
\"
)"
)
,
0
},
{
"verbose"
,
'v'
,
NULL
,
0
,
"Log all actions"
,
0
},
N_
(
"Log all actions"
)
,
0
},
{
"email"
,
'e'
,
"ADDRESS"
,
0
,
"Override user email address"
,
0
},
N_
(
"Override user email address"
)
,
0
},
{
0
}
};
...
...
@@ -120,7 +121,7 @@ parser (int key, char *arg, struct argp_state *state)
case
'e'
:
rc
=
mu_set_user_email
(
arg
);
if
(
rc
)
argp_error
(
state
,
"invalid email: %s"
,
mu_errstring
(
rc
));
argp_error
(
state
,
_
(
"invalid email: %s"
)
,
mu_errstring
(
rc
));
break
;
case
'n'
:
...
...
@@ -141,7 +142,7 @@ parser (int key, char *arg, struct argp_state *state)
case
'f'
:
if
(
opts
->
mbox
)
argp_error
(
state
,
"only one MBOX can be specified"
);
argp_error
(
state
,
_
(
"only one MBOX can be specified"
)
);
opts
->
mbox
=
strdup
(
arg
);
break
;
...
...
@@ -178,7 +179,7 @@ parser (int key, char *arg, struct argp_state *state)
break
;
default:
argp_error
(
state
,
"%c is not a valid debug flag"
,
*
arg
);
argp_error
(
state
,
_
(
"%c is not a valid debug flag"
)
,
*
arg
);
break
;
}
}
...
...
@@ -190,12 +191,12 @@ parser (int key, char *arg, struct argp_state *state)
case
ARGP_KEY_ARG
:
if
(
opts
->
script
)
argp_error
(
state
,
"only one SCRIPT can be specified"
);
argp_error
(
state
,
_
(
"only one SCRIPT can be specified"
)
);
opts
->
script
=
mu_tilde_expansion
(
arg
,
"/"
,
NULL
);
break
;
case
ARGP_KEY_NO_ARGS
:
argp_error
(
state
,
"SCRIPT must be specified"
);
argp_error
(
state
,
_
(
"SCRIPT must be specified"
)
);
default:
return
ARGP_ERR_UNKNOWN
;
...
...
@@ -262,7 +263,7 @@ stdout_action_log (void *unused,
message_get_uid
(
msg
,
&
uid
);
fprintf
(
stdout
,
"%s on msg uid %lu"
,
action
,
(
unsigned
long
)
uid
);
fprintf
(
stdout
,
_
(
"%s on msg uid %lu"
)
,
action
,
(
unsigned
long
)
uid
);
if
(
fmt
&&
strlen
(
fmt
))
{
fprintf
(
stdout
,
": "
);
...
...
@@ -281,7 +282,7 @@ syslog_action_log (void *unused,
message_get_uid
(
msg
,
&
uid
);
asprintf
(
&
text
,
"%s on msg uid %d"
,
action
,
uid
);
asprintf
(
&
text
,
_
(
"%s on msg uid %d"
)
,
action
,
uid
);
if
(
fmt
&&
strlen
(
fmt
))
{
char
*
diag
=
NULL
;
...
...
@@ -306,6 +307,9 @@ main (int argc, char *argv[])
struct
options
opts
=
{
0
};
int
(
*
debugfp
)
__P
((
mu_debug_t
,
size_t
level
,
const
char
*
,
va_list
));
/* Native Language Support */
/* mu_init_nls (); */
sieve_argp_init
();
rc
=
mu_argp_parse
(
&
argp
,
&
argc
,
&
argv
,
ARGP_IN_ORDER
,
sieve_argp_capa
,
0
,
&
opts
);
...
...
@@ -319,7 +323,7 @@ main (int argc, char *argv[])
rc
=
sieve_machine_init
(
&
mach
,
NULL
);
if
(
rc
)
{
mu_error
(
"can't initialize sieve machine: %s"
,
mu_errstring
(
rc
));
mu_error
(
_
(
"can't initialize sieve machine: %s"
)
,
mu_errstring
(
rc
));
return
1
;
}
...
...
@@ -357,13 +361,13 @@ main (int argc, char *argv[])
{
if
((
rc
=
wicket_create
(
&
wicket
,
opts
.
tickets
))
!=
0
)
{
mu_error
(
"wicket create <%s> failed: %s
\n
"
,
mu_error
(
_
(
"wicket create <%s> failed: %s
\n
"
)
,
opts
.
tickets
,
mu_errstring
(
rc
));
goto
cleanup
;
}
if
((
rc
=
wicket_get_ticket
(
wicket
,
&
ticket
,
0
,
0
))
!=
0
)
{
mu_error
(
"ticket get failed: %s
\n
"
,
mu_errstring
(
rc
));
mu_error
(
_
(
"ticket get failed: %s
\n
"
)
,
mu_errstring
(
rc
));
goto
cleanup
;
}
sieve_set_ticket
(
mach
,
ticket
);
...
...
@@ -374,18 +378,18 @@ main (int argc, char *argv[])
{
if
((
rc
=
mu_debug_create
(
&
debug
,
mach
)))
{
mu_error
(
"mu_debug_create failed: %s
\n
"
,
mu_errstring
(
rc
));
mu_error
(
_
(
"mu_debug_create failed: %s
\n
"
)
,
mu_errstring
(
rc
));
goto
cleanup
;
}
if
((
rc
=
mu_debug_set_level
(
debug
,
opts
.
debug_level
)))
{
mu_error
(
"mu_debug_set_level failed: %s
\n
"
,
mu_error
(
_
(
"mu_debug_set_level failed: %s
\n
"
)
,
mu_errstring
(
rc
));
goto
cleanup
;
}
if
((
rc
=
mu_debug_set_print
(
debug
,
debugfp
,
mach
)))
{
mu_error
(
"mu_debug_set_print failed: %s
\n
"
,
mu_error
(
_
(
"mu_debug_set_print failed: %s
\n
"
)
,
mu_errstring
(
rc
));
goto
cleanup
;
}
...
...
@@ -396,14 +400,14 @@ main (int argc, char *argv[])
/* Create, give a ticket to, and open the mailbox. */
if
((
rc
=
mailbox_create_default
(
&
mbox
,
opts
.
mbox
))
!=
0
)
{
mu_error
(
"mailbox create <%s> failed: %s
\n
"
,
opts
.
mbox
?
opts
.
mbox
:
"default"
,
mu_errstring
(
rc
));
mu_error
(
_
(
"mailbox create <%s> failed: %s
\n
"
)
,
opts
.
mbox
?
opts
.
mbox
:
_
(
"default"
)
,
mu_errstring
(
rc
));
goto
cleanup
;
}
if
(
debug
&&
(
rc
=
mailbox_set_debug
(
mbox
,
debug
)))
{
mu_error
(
"mailbox_set_debug failed: %s
\n
"
,
mu_errstring
(
rc
));
mu_error
(
_
(
"mailbox_set_debug failed: %s
\n
"
)
,
mu_errstring
(
rc
));
goto
cleanup
;
}
...
...
@@ -414,14 +418,14 @@ main (int argc, char *argv[])
if
((
rc
=
mailbox_get_folder
(
mbox
,
&
folder
)))
{
mu_error
(
"mailbox_get_folder failed: %s"
,
mu_error
(
_
(
"mailbox_get_folder failed: %s"
)
,
mu_errstring
(
rc
));
goto
cleanup
;
}
if
((
rc
=
folder_get_authority
(
folder
,
&
auth
)))
{
mu_error
(
"folder_get_authority failed: %s"
,
mu_error
(
_
(
"folder_get_authority failed: %s"
)
,
mu_errstring
(
rc
));
goto
cleanup
;
}
...
...
@@ -429,7 +433,7 @@ main (int argc, char *argv[])
/* Authentication-less folders don't have authorities. */
if
(
auth
&&
(
rc
=
authority_set_ticket
(
auth
,
ticket
)))
{
mu_error
(
"authority_set_ticket failed: %s"
,
mu_error
(
_
(
"authority_set_ticket failed: %s"
)
,
mu_errstring
(
rc
));
goto
cleanup
;
}
...
...
@@ -443,8 +447,8 @@ main (int argc, char *argv[])
if
(
rc
!=
0
)
{
mu_error
(
"open on %s failed: %s
\n
"
,
opts
.
mbox
?
opts
.
mbox
:
"default"
,
mu_errstring
(
rc
));
mu_error
(
_
(
"open on %s failed: %s
\n
"
)
,
opts
.
mbox
?
opts
.
mbox
:
_
(
"default"
)
,
mu_errstring
(
rc
));
goto
cleanup
;
}
...
...
@@ -461,8 +465,8 @@ cleanup:
any messages that were marked DELETED even if execution failed
on a later message. */
if
((
e
=
mailbox_expunge
(
mbox
))
!=
0
)
mu_error
(
"expunge on %s failed: %s
\n
"
,
opts
.
mbox
?
opts
.
mbox
:
"default"
,
mu_errstring
(
e
));
mu_error
(
_
(
"expunge on %s failed: %s
\n
"
)
,
opts
.
mbox
?
opts
.
mbox
:
_
(
"default"
)
,
mu_errstring
(
e
));
if
(
e
&&
!
rc
)
rc
=
e
;
...
...
Please
register
or
sign in
to post a comment