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
d3d9b4fd
...
d3d9b4fd9644927658c0f61fe6b6c4b01afd8659
authored
2002-12-16 10:16:19 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fixed use of @deffn
1 parent
fbb790c3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
150 additions
and
150 deletions
doc/texinfo/libmu_scm.texi
doc/texinfo/libmuauth.texi
doc/texinfo/libsieve.texi
doc/texinfo/libmu_scm.texi
View file @
d3d9b4f
...
...
@@ -30,108 +30,108 @@ Using libmu_scm
@node
Address
Functions
@section
Address
Functions
@deffn
Function
mu
-
address
-
get
-
personal
ADDRESS
NUM
@deffn
{
Scheme
Function
}
mu
-
address
-
get
-
personal
ADDRESS
NUM
Return
personal
part
of
an
email
address
.
@end
deffn
@deffn
Function
mu
-
address
-
get
-
comments
ADDRESS
NUM
@deffn
{
Scheme
Function
}
mu
-
address
-
get
-
comments
ADDRESS
NUM
@end
deffn
@deffn
Function
mu
-
address
-
get
-
email
ADDRESS
NUM
@deffn
{
Scheme
Function
}
mu
-
address
-
get
-
email
ADDRESS
NUM
Return
email
part
of
an
email
address
.
@end
deffn
@deffn
Function
mu
-
address
-
get
-
domain
ADDRESS
NUM
@deffn
{
Scheme
Function
}
mu
-
address
-
get
-
domain
ADDRESS
NUM
Return
domain
part
of
an
email
address
@end
deffn
@deffn
Function
mu
-
address
-
get
-
local
ADDRESS
NUM
@deffn
{
Scheme
Function
}
mu
-
address
-
get
-
local
ADDRESS
NUM
Return
local
part
of
an
email
address
.
@end
deffn
@deffn
Function
mu
-
address
-
get
-
count
ADDRESS
@deffn
{
Scheme
Function
}
mu
-
address
-
get
-
count
ADDRESS
Return
number
of
parts
in
email
address
.
@end
deffn
@node
Mailbox
Functions
@section
Mailbox
Functions
@deffn
Function
mu
-
mailbox
-
open
URL
MODE
@deffn
{
Scheme
Function
}
mu
-
mailbox
-
open
URL
MODE
Opens
a
mailbox
specified
by
URL
.
@end
deffn
@deffn
Function
mu
-
mailbox
-
close
MBOX
@deffn
{
Scheme
Function
}
mu
-
mailbox
-
close
MBOX
Closes
mailbox
MBOX
@end
deffn
@deffn
Function
mu
-
mailbox
-
get
-
url
MBOX
@deffn
{
Scheme
Function
}
mu
-
mailbox
-
get
-
url
MBOX
Returns
the
URL
of
the
mailbox
.
@end
deffn
@deffn
Function
mu
-
mailbox
-
get
-
port
MBOX
MODE
@deffn
{
Scheme
Function
}
mu
-
mailbox
-
get
-
port
MBOX
MODE
Returns
a
port
associated
with
the
contents
of
the
MBOX
.
MODE
is
a
string
defining
operation
mode
of
the
stream
.
It
may
contain
any
of
the
two
characters
:
@samp
{
r
}
for
reading
,
@samp
{
w
}
for
writing
.
@end
deffn
@deffn
Function
mu
-
mailbox
-
get
-
message
MBOX
MSGNO
@deffn
{
Scheme
Function
}
mu
-
mailbox
-
get
-
message
MBOX
MSGNO
Retrieve
from
MBOX
message
#
MSGNO
.
@end
deffn
@deffn
Function
mu
-
mailbox
-
messages
-
count
MBOX
@deffn
{
Scheme
Function
}
mu
-
mailbox
-
messages
-
count
MBOX
Returns
number
of
messages
in
the
mailbox
.
@end
deffn
@deffn
Function
mu
-
mailbox
-
expunge
MBOX
@deffn
{
Scheme
Function
}
mu
-
mailbox
-
expunge
MBOX
Expunges
deleted
messages
from
the
mailbox
.
@end
deffn
@deffn
Function
mu
-
mailbox
-
url
MBOX
@deffn
{
Scheme
Function
}
mu
-
mailbox
-
url
MBOX
Returns
the
URL
of
the
mailbox
@end
deffn
@deffn
Function
mu
-
mailbox
-
append
-
message
MBOX
MESG
@deffn
{
Scheme
Function
}
mu
-
mailbox
-
append
-
message
MBOX
MESG
Appends
the
message
to
the
mailbox
@end
deffn
@node
Message
Functions
@section
Message
Functions
@deffn
Function
mu
-
message
-
copy
MESG
@deffn
{
Scheme
Function
}
mu
-
message
-
copy
MESG
Creates
the
copy
of
the
given
message
.
@end
deffn
@deffn
Function
mu
-
message
-
set
-
header
MESG
HEADER
VALUE
REPLACE
@deffn
{
Scheme
Function
}
mu
-
message
-
set
-
header
MESG
HEADER
VALUE
REPLACE
Sets
new
VALUE
to
the
header
HEADER
of
the
message
MESG
.
If
the
HEADER
is
already
present
in
the
message
its
value
is
replaced
with
the
supplied
one
if
the
optional
REPLACE
is
#t. Otherwise new header is created and appended.
@end
deffn
@deffn
Function
mu
-
message
-
get
-
size
MESG
@deffn
{
Scheme
Function
}
mu
-
message
-
get
-
size
MESG
Returns
the
size
of
the
given
message
.
@end
deffn
@deffn
Function
mu
-
message
-
get
-
lines
MESG
@deffn
{
Scheme
Function
}
mu
-
message
-
get
-
lines
MESG
Returns
number
of
lines
in
the
given
message
.
@end
deffn
@deffn
Function
mu
-
message
-
get
-
sender
MESG
@deffn
{
Scheme
Function
}
mu
-
message
-
get
-
sender
MESG
Returns
the
sender
email
address
for
the
message
MESG
.
@end
deffn
@deffn
Function
mu
-
message
-
get
-
header
MESG
HEADER
@deffn
{
Scheme
Function
}
mu
-
message
-
get
-
header
MESG
HEADER
Returns
the
header
value
of
the
HEADER
in
the
MESG
.
@end
deffn
@deffn
Function
mu
-
message
-
get
-
header
-
fields
MESG
HEADERS
@deffn
{
Scheme
Function
}
mu
-
message
-
get
-
header
-
fields
MESG
HEADERS
Returns
the
list
of
headers
in
the
MESG
.
If
optional
HEADERS
is
specified
it
should
be
a
list
of
header
names
to
restrict
return
value
to
.
@end
deffn
@deffn
Function
mu
-
message
-
set
-
header
-
fields
MESG
LIST
REPLACE
@deffn
{
Scheme
Function
}
mu
-
message
-
set
-
header
-
fields
MESG
LIST
REPLACE
Set
the
headers
in
the
message
MESG
from
LIST
LIST
is
a
list
of
(
cons
HEADER
VALUE
)
Optional
parameter
REPLACE
specifies
whether
the
new
header
...
...
@@ -139,30 +139,30 @@ values should replace the headers already present in the
message
.
@end
deffn
@deffn
Function
mu
-
message
-
delete
MESG
FLAG
@deffn
{
Scheme
Function
}
mu
-
message
-
delete
MESG
FLAG
Mark
given
message
as
deleted
.
Optional
FLAG
allows
to
toggle
deleted
mark
The
message
is
deleted
if
it
is
#
t
and
undeleted
if
it
is
#
f
@end
deffn
@deffn
Function
mu
-
message
-
get
-
flag
MESG
FLAG
@deffn
{
Scheme
Function
}
mu
-
message
-
get
-
flag
MESG
FLAG
Return
value
of
the
attribute
FLAG
.
@end
deffn
@deffn
Function
mu
-
message
-
set
-
flag
MESG
FLAG
VALUE
@deffn
{
Scheme
Function
}
mu
-
message
-
set
-
flag
MESG
FLAG
VALUE
Set
the
given
attribute
of
the
message
.
If
optional
VALUE
is
#
f
,
the
attribute
is
unset
.
@end
deffn
@deffn
Function
mu
-
message
-
get
-
user
-
flag
MESG
FLAG
@deffn
{
Scheme
Function
}
mu
-
message
-
get
-
user
-
flag
MESG
FLAG
Returns
value
of
the
user
attribute
FLAG
.
@end
deffn
@deffn
Function
mu
-
message
-
set
-
user
-
flag
MESG
FLAG
VALUE
@deffn
{
Scheme
Function
}
mu
-
message
-
set
-
user
-
flag
MESG
FLAG
VALUE
Set
the
given
user
attribute
of
the
message
.
If
optional
VALUE
is
#f, the attribute is unset.
@end
deffn
@deffn
Function
mu
-
message
-
get
-
port
MESG
MODE
FULL
@deffn
{
Scheme
Function
}
mu
-
message
-
get
-
port
MESG
MODE
FULL
Returns
a
port
associated
with
the
given
MESG
.
MODE
is
a
string
defining
operation
mode
of
the
stream
.
It
may
contain
any
of
the
two
characters
:
@samp
{
r
}
for
reading
,
@samp
{
w
}
for
writing
.
...
...
@@ -172,11 +172,11 @@ part of the message (including headers). If it is #f then the port
accesses
only
the
message
body
(
the
default
).
@end
deffn
@deffn
Function
mu
-
message
-
get
-
body
MESG
@deffn
{
Scheme
Function
}
mu
-
message
-
get
-
body
MESG
Returns
the
message
body
for
the
message
MESG
.
@end
deffn
@deffn
Function
mu
-
message
-
send
MESG
MAILER
@deffn
{
Scheme
Function
}
mu
-
message
-
send
MESG
MAILER
Sends
the
message
MESG
.
Optional
MAILER
overrides
default
mailer
settings
in
mu
-
mailer
.
@end
deffn
...
...
@@ -184,42 +184,42 @@ mailer settings in mu-mailer.
@node
MIME
Functions
@section
MIME
Functions
@deffn
Function
mu
-
mime
-
create
FLAGS
MESG
@deffn
{
Scheme
Function
}
mu
-
mime
-
create
FLAGS
MESG
Creates
a
new
MIME
object
.
@end
deffn
@deffn
Function
mu
-
mime
-
multipart
?
MIME
@deffn
{
Scheme
Function
}
mu
-
mime
-
multipart
?
MIME
Returns
#
t
if
MIME
is
a
multipart
object
.
@end
deffn
@deffn
Function
mu
-
mime
-
get
-
num
-
parts
MIME
@deffn
{
Scheme
Function
}
mu
-
mime
-
get
-
num
-
parts
MIME
Returns
number
of
parts
in
a
MIME
object
.
@end
deffn
@deffn
Function
mu
-
mime
-
get
-
part
MIME
PART
@deffn
{
Scheme
Function
}
mu
-
mime
-
get
-
part
MIME
PART
Returns
part
number
PART
from
a
MIME
object
.
@end
deffn
@deffn
Function
mu
-
mime
-
add
-
part
MIME
MESG
@deffn
{
Scheme
Function
}
mu
-
mime
-
add
-
part
MIME
MESG
Adds
MESG
to
the
MIME
object
.
@end
deffn
@deffn
Function
mu
-
mime
-
get
-
message
MIME
@deffn
{
Scheme
Function
}
mu
-
mime
-
get
-
message
MIME
Converts
MIME
object
to
a
message
.
@end
deffn
@node
Log
Functions
@section
Log
Functions
@deffn
Function
mu
-
openlog
IDENT
OPTION
FACILITY
@deffn
{
Scheme
Function
}
mu
-
openlog
IDENT
OPTION
FACILITY
Opens
a
connection
to
the
system
logger
for
Guile
program
.
@end
deffn
@deffn
Function
mu
-
logger
PRIO
TEXT
@deffn
{
Scheme
Function
}
mu
-
logger
PRIO
TEXT
Generates
a
log
message
to
be
distributed
via
syslogd
.
@end
deffn
@deffn
Function
mu
-
closelog
@deffn
{
Scheme
Function
}
mu
-
closelog
Closes
the
channel
to
the
system
logger
open
by
mu
-
openlog
.
@end
deffn
...
...
doc/texinfo/libmuauth.texi
View file @
d3d9b4f
...
...
@@ -117,44 +117,44 @@ struct mu_auth_module @{
@node
Initializing
the
libmuauth
@section
Initializing
the
libmuauth
@deftypefn
void
mu_auth_init
(
void
)
@deftypef
u
n
void
mu_auth_init
(
void
)
This
function
registers
the
command
line
capability
``
auth
''
.
It
must
be
called
after
registering
@file
{
libmuauth
}
modules
and
before
calling
@code
{
mu_agrp_parse
()}.
If
an
error
occurs
,
this
function
prints
diagnostic
message
and
aborts
the
program
.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
void
MU_AUTH_REGISTER_ALL_MODULES
(
void
)
@deftypef
u
n
void
MU_AUTH_REGISTER_ALL_MODULES
(
void
)
This
macro
registers
all
default
modules
and
calls
@code
{
mu_auth_init
()}.
@end
deftypefn
@end
deftypef
u
n
@node
Module
Creation
and
Destruction
@section
Module
Creation
and
Destruction
@deftypefn
int
mu_auth_data_alloc
(
struct
mu_auth_data
**
ptr
,
const
char
*
name
,
const
char
*
passwd
,
uid_t
uid
,
gid_t
gid
,
const
char
*
gecos
,
const
char
*
dir
,
const
char
*
shell
,
const
char
*
mailbox
,
int
change_uid
)
@deftypef
u
n
int
mu_auth_data_alloc
(
struct
mu_auth_data
**
ptr
,
const
char
*
name
,
const
char
*
passwd
,
uid_t
uid
,
gid_t
gid
,
const
char
*
gecos
,
const
char
*
dir
,
const
char
*
shell
,
const
char
*
mailbox
,
int
change_uid
)
Create
a
@code
{
mu_auth_data
}
structure
and
initialize
it
with
the
given
values
.
Returns
0
on
success
and
1
otherwise
.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
void
mu_auth_data_free
(
struct
mu_auth_data
*
@var
{
ptr
})
@deftypef
u
n
void
mu_auth_data_free
(
struct
mu_auth_data
*
@var
{
ptr
})
Free
the
@code
{
mu_auth_data
}
structure
allocated
by
a
call
to
@code
{
mu_auth_data_alloc
()}.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
void
mu_auth_register_module
(
struct
mu_auth_module
*
@var
{
mod
})
@deftypef
u
n
void
mu_auth_register_module
(
struct
mu_auth_module
*
@var
{
mod
})
Register
the
module
defined
by
the
@var
{
mod
}
argument
.
@end
deftypefn
@end
deftypef
u
n
@node
Obtaining
Authorization
Information
@section
Obtaining
Authorization
Information
@cindex
libmuauth
,
obtaining
authorization
information
@deftypefn
int
mu_auth_runlist
(
list_t
@var
{
flist
},
void
*
@var
{
return_data
},
void
*
@var
{
key
},
void
*
@var
{
call_data
});
@deftypef
u
n
int
mu_auth_runlist
(
list_t
@var
{
flist
},
void
*
@var
{
return_data
},
void
*
@var
{
key
},
void
*
@var
{
call_data
});
The
list
is
expected
to
contain
@code
{
mu_auth_fp
}
pointers
.
Each
of
them
is
dereferenced
and
executed
until
either
the
list
is
exhausted
or
any
...
...
@@ -167,34 +167,34 @@ parameter.
The
function
returns
0
if
none
of
the
functions
from
@code
{
list
}
succeeded
,
i
.
e
.
returned
non
-
zero
value
.
Otherwise
it
returns
the
return
code
from
the
succeeded
function
.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
{
struct
mu_auth_data
*
}
mu_get_auth_by_name
(
const
char
*
@var
{
username
})
@deftypef
u
n
{
struct
mu_auth_data
*
}
mu_get_auth_by_name
(
const
char
*
@var
{
username
})
Search
the
information
about
given
user
by
its
username
.
Similar
to
system
'
s
@code
{
getpwnam
}
call
).
@end
deftypefn
@end
deftypef
u
n
@deftypefn
{
struct
mu_auth_data
*
}
mu_get_auth_by_uid
(
uid_t
@var
{
uid
})
@deftypef
u
n
{
struct
mu_auth_data
*
}
mu_get_auth_by_uid
(
uid_t
@var
{
uid
})
Search
the
information
about
given
user
by
its
uid
.
Similar
to
system
'
s
@code
{
getpwuid
}
call
).
@end
deftypefn
@end
deftypef
u
n
@deftypefn
int
mu_authenticate
(
struct
mu_auth_data
*
@var
{
auth_data
},
char
*
@var
{
pass
})
@deftypef
u
n
int
mu_authenticate
(
struct
mu_auth_data
*
@var
{
auth_data
},
char
*
@var
{
pass
})
Authenticate
the
user
whose
data
are
in
@var
{
auth_data
}
using
password
@var
{
pass
}.
Return
0
if
the
user
is
authenticated
.
@end
deftypefn
@end
deftypef
u
n
@node
Existing
Modules
@section
Existing
Modules
@cindex
libmuauth
modules
@deftypefn
int
mu_auth_nosupport
(
void
*
return_data
,
void
*
key
,
void
*
func_data
,
void
*
call_data
);
@deftypef
u
n
int
mu_auth_nosupport
(
void
*
return_data
,
void
*
key
,
void
*
func_data
,
void
*
call_data
);
The
``
not
-
supported
''
module
.
Always
returns
@code
{
ENOSYS
}.
@end
deftypefn
@end
deftypef
u
n
@defvar
mu_auth_system_module
...
...
doc/texinfo/libsieve.texi
View file @
d3d9b4f
...
...
@@ -75,7 +75,7 @@ It is created by @code{sieve_machine_create()} and destroyed by
type
are
described
in
@ref
{
Manipulating
the
Sieve
Machine
}.
@end
deftp
@deftp
{
Enumeration
}
sieve_data_type
@deftp
{
Data
Type
}
sieve_data_type
This
enumeration
keeps
the
possible
types
of
sieve
data
.
These
are
:
@table
@code
...
...
@@ -105,7 +105,7 @@ An opaque pointer.
@end
table
@end
deftp
@deftp
{
Structur
e
}
sieve_value_t
@deftp
{
Data
Typ
e
}
sieve_value_t
The
@code
{
sieve_value_t
}
keeps
an
instance
of
sieve
data
.
It
is
defined
as
follows
:
...
...
@@ -153,7 +153,7 @@ The data are pointed to by @code{ptr} member.
@end
deftp
@deftp
{
Structur
e
}
sieve_tag_def_t
@deftp
{
Data
Typ
e
}
sieve_tag_def_t
This
structure
represents
a
definition
of
a
tagged
(
optional
)
argument
to
a
sieve
action
or
test
.
It
is
defined
as
follows
:
...
...
@@ -171,7 +171,7 @@ colon}. The @code{argtype} is set to @code{SVT_VOID} if the tag does
not
take
argument
,
or
to
the
type
of
the
argument
otherwise
.
@end
deftp
@deftp
{
Structur
e
}
sieve_runtime_tag_t
@deftp
{
Data
Typ
e
}
sieve_runtime_tag_t
This
structure
represents
the
tagged
(
optional
)
argument
at
a
runtime
.
It
is
defined
as
:
...
...
@@ -187,7 +187,7 @@ struct sieve_runtime_tag @{
The
@code
{
arg
}
member
is
@code
{
NULL
}
if
the
tag
does
not
take
an
argument
.
@end
deftp
@deftp
{
Function
Type
}
sieve_handler_t
@deftp
{
Data
Type
}
sieve_handler_t
This
is
a
pointer
to
function
handler
for
a
sieve
action
or
test
.
It
is
defined
as
follows
:
...
...
@@ -208,7 +208,7 @@ A list of required arguments to the handler
A
list
of
optional
arguments
(
tags
).
@end
table
@deftp
{
Function
Type
}
sieve_printf_t
@deftp
{
Data
Type
}
sieve_printf_t
A
pointer
to
a
diagnostic
output
function
.
It
is
defined
as
follows
:
@example
typedef
int
(
*
sieve_printf_t
)
(
void
*
@var
{
data
},
const
char
*
@var
{
fmt
},
va_list
@var
{
ap
});
...
...
@@ -225,7 +225,7 @@ Printf-like format string.
Other
arguments
.
@end
table
@deftp
{
Function
Type
}
sieve_parse_error_t
@deftp
{
Data
Type
}
sieve_parse_error_t
This
data
type
is
declared
as
follows
:
@example
typedef
int
(
*
sieve_parse_error_t
)
(
void
*
@var
{
data
},
...
...
@@ -240,7 +240,7 @@ argument. Arguments @var{filename} and @var{line} indicate the location
of
the
error
in
the
source
text
,
while
@var
{
fmt
}
and
@var
{
ap
}
give
verbose
description
of
the
error
.
@deftp
{
Function
Type
}
sieve_action_log_t
@deftp
{
Data
Type
}
sieve_action_log_t
A
pointer
to
the
application
-
specific
logging
function
:
@example
...
...
@@ -274,7 +274,7 @@ The name of the action.
These
two
arguments
give
the
detailed
description
of
the
action
.
@end
table
@deftp
{
Function
Type
}
sieve_comparator_t
@deftp
{
Data
Type
}
sieve_comparator_t
@example
typedef
int
(
*
sieve_comparator_t
)
(
const
char
*
,
const
char
*
);
@end
example
...
...
@@ -286,7 +286,7 @@ in comparison with most standard libc functions like @code{stcmp()}, etc.
@end
deftp
@deftp
{
Function
Type
}
sieve_retrieve_t
@deftp
{
Data
Type
}
sieve_retrieve_t
@example
typedef
int
(
*
sieve_retrieve_t
)
(
void
*
item
,
void
*
data
,
int
idx
,
char
**
pval
);
...
...
@@ -296,7 +296,7 @@ A pointer to generic retriever function. See description of
@code
{
sieve_vlist_compare
()}
for
details
of
its
usage
.
@end
deftp
@deftp
{
Function
Type
}
sieve_destructor_t
@deftp
{
Data
Type
}
sieve_destructor_t
@example
typedef
void
(
*
sieve_destructor_t
)
(
void
*
data
);
@end
example
...
...
@@ -306,7 +306,7 @@ associated with @code{data}. See the description of
@code
{
sieve_machine_add_destructor
()}
for
more
information
.
@end
deftp
@deftp
{
Function
Type
}
sieve_tag_checker_t
@deftp
{
Data
Type
}
sieve_tag_checker_t
@example
typedef
int
(
*
sieve_tag_checker_t
)
(
const
char
*
@var
{
name
},
list_t
@var
{
tags
},
...
...
@@ -341,25 +341,25 @@ case. [FIXME: describe how to do that]
This
subsection
describes
functions
used
to
create
an
instance
of
the
sieve
machine
,
read
or
alter
its
internal
fields
and
destroy
it
.
@deftypefn
int
sieve_machine_init
(
sieve_machine_t
*
@var{
mach
}
,
void
*
@var{
data
}
)
@deftypef
u
n
int
sieve_machine_init
(
sieve_machine_t
*
@var{
mach
}
,
void
*
@var{
data
}
)
The
@code{
sieve_machine_init
()
}
function
creates
an
instance
of
a
sieve
machine
.
A
pointer
to
the
instance
itself
is
returned
in
the
argument
@var{
mach
}
.
The
user
-
specific
data
to
be
associated
with
the
new
machine
are
passed
in
@var{
data
}
argument
.
The
function
returns
0
on
success
,
non
-
zero
error
code
otherwise
,
@end
deftypefn
@end
deftypef
u
n
@deftypefn
void
sieve_machine_destroy
(
sieve_machine_t
*
@var{
pmach
}
)
@deftypef
u
n
void
sieve_machine_destroy
(
sieve_machine_t
*
@var{
pmach
}
)
This
function
destroys
the
instance
of
sieve
machine
pointed
to
by
@var{
mach
}
parameter
.
After
execution
of
@code{
sieve_machine_destroy
()
}
@var{
pmach
}
contains
@code{
NULL
}
.
The
destructors
registered
with
@code{
sieve_machine_add_destructor
()
}
are
executed
in
@sc{
lifo
}
order
.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
int
sieve_machine_add_destructor
(
sieve_machine_t
@var{
mach
}
,
sieve_destructor_t
@var{
destr
}
,
void
*
@var{
ptr
}
)
;
@deftypef
u
n
int
sieve_machine_add_destructor
(
sieve_machine_t
@var{
mach
}
,
sieve_destructor_t
@var{
destr
}
,
void
*
@var{
ptr
}
)
;
This
function
registers
a
destructor
function
@var{
dest
}
.
The
purpose
of
the
destructor
is
to
free
any
resources
associated
with
the
item
...
...
@@ -392,44 +392,44 @@ match_part_checker (const char *name, list_t tags, list_t args)
@
}
@end
group
@end
example
@end
deftypefn
@end
deftypef
u
n
@deftypefn
void
*
sieve_get_data
(
sieve_machine_t
@var
{
mach
})
@deftypef
u
n
void
*
sieve_get_data
(
sieve_machine_t
@var
{
mach
})
This
function
returns
the
application
-
specific
data
associated
with
the
instance
of
sieve
machine
.
See
@code
{
sieve_machine_init
()}.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
message_t
sieve_get_message
(
sieve_machine_t
@var
{
mach
})
@deftypef
u
n
message_t
sieve_get_message
(
sieve_machine_t
@var
{
mach
})
This
function
returns
the
current
message
.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
size_t
sieve_get_message_num
(
sieve_machine_t
@var
{
mach
});
@deftypef
u
n
size_t
sieve_get_message_num
(
sieve_machine_t
@var
{
mach
});
This
function
returns
the
current
message
number
in
the
mailbox
.
If
there
are
no
mailbox
,
i
.
e
.
the
execution
of
the
sieve
code
is
started
with
@code
{
sieve_message
},
this
function
returns
1
.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
int
sieve_get_debug_level
(
sieve_machine_t
@var
{
mach
})
@deftypef
u
n
int
sieve_get_debug_level
(
sieve_machine_t
@var
{
mach
})
Returns
the
debug
level
set
for
this
instance
of
sieve
machine
.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
ticket_t
sieve_get_ticket
(
sieve_machine_t
@var
{
mach
})
@deftypef
u
n
ticket_t
sieve_get_ticket
(
sieve_machine_t
@var
{
mach
})
Returns
the
authentication
ticket
for
this
machine
.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
mailer_t
sieve_get_mailer
(
sieve_machine_t
@var
{
mach
})
@deftypef
u
n
mailer_t
sieve_get_mailer
(
sieve_machine_t
@var
{
mach
})
Returns
the
mailer
.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
{
char
*
}
sieve_get_daemon_email
__P
((
sieve_machine_t
@var
{
mach
})
@deftypef
u
n
{
char
*
}
sieve_get_daemon_email
__P
((
sieve_machine_t
@var
{
mach
})
This
function
returns
the
@dfn
{
daemon
email
}
associated
with
this
instance
of
sieve
machine
.
The
daemon
email
is
an
email
address
used
in
envelope
from
addresses
of
automatic
reply
messages
.
By
default
its
local
part
is
@samp
{
<
MAILER
-
DAEMON
>
}
and
the
domain
part
is
the
machine
name
.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
void
sieve_set_error
(
sieve_machine_t
@var
{
mach
},
sieve_printf_t
@var
{
error_printer
})
@deftypef
u
n
void
sieve_set_error
(
sieve_machine_t
@var
{
mach
},
sieve_printf_t
@var
{
error_printer
})
This
function
sets
the
error
printer
function
for
the
machine
.
If
it
is
not
set
,
the
default
error
printer
will
be
used
.
It
is
defined
as
follows
:
...
...
@@ -442,9 +442,9 @@ _sieve_default_error_printer (void *unused, const char *fmt,
return
mu_verror
(
fmt
,
ap
)
;
@
}
@end
example
@end
deftypefn
@end
deftypef
u
n
@deftypefn
void
sieve_set_parse_error
(
sieve_machine_t
@var
{
mach
},
sieve_parse_error_t
@var
{
p
})
@deftypef
u
n
void
sieve_set_parse_error
(
sieve_machine_t
@var
{
mach
},
sieve_parse_error_t
@var
{
p
})
This
function
sets
the
parse
error
printer
function
for
the
machine
.
If
it
is
not
set
,
the
default
parse
error
printer
will
be
used
.
It
is
defined
as
follows
:
...
...
@@ -464,15 +464,15 @@ _sieve_default_parse_error (void *unused,
@
}
@end
group
@end
example
@end
deftypefn
@end
deftypef
u
n
@deftypefn
void
sieve_set_debug
(
sieve_machine_t
@var
{
mach
},
sieve_printf_t
@var
{
debug
}));
@deftypef
u
n
void
sieve_set_debug
(
sieve_machine_t
@var
{
mach
},
sieve_printf_t
@var
{
debug
}));
This
function
sets
the
debug
printer
function
for
the
machine
.
If
it
is
not
set
,
the
default
debug
printer
is
@code
{
NULL
}
which
means
no
debugging
information
will
be
displayed
.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
void
sieve_set_debug_level
(
sieve_machine_t
@var
{
mach
},
mu_debug_t
@var
{
dbg
},
int
@var
{
level
})
@deftypef
u
n
void
sieve_set_debug_level
(
sieve_machine_t
@var
{
mach
},
mu_debug_t
@var
{
dbg
},
int
@var
{
level
})
This
function
sets
the
debug
level
for
the
given
instance
of
sieve
machine
.
The
@var
{
dbg
}
argument
is
the
@code
{
mu_debug_t
}
object
to
be
used
with
mailutils
library
,
the
@var
{
level
}
argument
specifies
the
...
...
@@ -492,85 +492,85 @@ Dump the disassembled code of the sieve machine. Do not run it.
@item
MU_SIEVE_DRY_RUN
Do
not
executed
the
actions
,
only
show
what
would
have
been
done
.
@end
table
@end
deftypefn
@end
deftypef
u
n
@deftypefn
void
sieve_set_logger
(
sieve_machine_t
@var
{
mach
},
sieve_action_log_t
@var
{
logger
})
@deftypef
u
n
void
sieve_set_logger
(
sieve_machine_t
@var
{
mach
},
sieve_action_log_t
@var
{
logger
})
This
function
sets
the
logger
function
.
By
default
the
logger
function
is
@code
{
NULL
},
which
means
that
the
executed
actions
are
not
logged
.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
void
sieve_set_ticket
(
sieve_machine_t
@var
{
mach
},
ticket_t
@var
{
ticket
})
@deftypef
u
n
void
sieve_set_ticket
(
sieve_machine_t
@var
{
mach
},
ticket_t
@var
{
ticket
})
This
function
sets
the
authentication
ticket
to
be
used
with
this
machine
.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
void
sieve_set_mailer
(
sieve_machine_t
@var
{
mach
},
mailer_t
@var
{
mailer
})
@deftypef
u
n
void
sieve_set_mailer
(
sieve_machine_t
@var
{
mach
},
mailer_t
@var
{
mailer
})
This
function
sets
the
mailer
.
The
default
mailer
is
@code
{
"sendmail:"
}.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
void
sieve_set_daemon_email
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
email
})
@deftypef
u
n
void
sieve_set_daemon_email
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
email
})
This
functions
sets
the
@dfn
{
daemon
email
}
for
@code
{
reject
}
and
@code
{
redirect
}
actions
.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
int
sieve_is_dry_run
(
sieve_machine_t
@var
{
mach
})
@deftypef
u
n
int
sieve_is_dry_run
(
sieve_machine_t
@var
{
mach
})
The
@code
{
sieve_is_dry_run
()}
returns
1
if
the
machine
is
in
@dfn
{
dry
run
}
state
,
i
.
e
.
it
will
only
log
the
actions
that
would
have
been
executed
without
actually
executing
them
.
The
dry
run
state
is
set
by
calling
@code
{
sieve_set_debug_level
()}
if
its
last
argument
has
the
@code
{
MU_SIEVE_DRY_RUN
}
bit
set
.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
{
const
char
*
}
sieve_type_str
(
sieve_data_type
@var
{
type
})
@deftypef
u
n
{
const
char
*
}
sieve_type_str
(
sieve_data_type
@var
{
type
})
Returns
the
string
representation
for
the
given
sieve
data
type
.
The
return
value
is
a
pointer
to
a
static
constant
string
.
@end
deftypefn
@end
deftypef
u
n
@node
Logging
and
Diagnostic
Functions
@subsection
Logging
and
Diagnostic
Functions
@deftypefn
void
sieve_error
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
fmt
},
@dots
{})
@deftypef
u
n
void
sieve_error
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
fmt
},
@dots
{})
Format
and
output
an
error
message
using
error
printer
of
the
machine
@var
{
mach
}.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
void
sieve_debug
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
fmt
},
@dots
{})
@deftypef
u
n
void
sieve_debug
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
fmt
},
@dots
{})
Format
and
output
a
debug
message
using
debug
printer
of
the
machine
@var
{
mach
}.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
void
sieve_log_action
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
action
},
const
char
*
@var
{
fmt
},
@dots
{})
@deftypef
u
n
void
sieve_log_action
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
action
},
const
char
*
@var
{
fmt
},
@dots
{})
Log
a
sieve
action
using
logger
function
associated
with
the
machine
@var
{
mach
}.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
void
sieve_abort
(
sieve_machine_t
@var
{
mach
})
@deftypef
u
n
void
sieve_abort
(
sieve_machine_t
@var
{
mach
})
Immediately
abort
the
execution
of
the
script
.
@end
deftypefn
@end
deftypef
u
n
@node
Symbol
Space
Functions
@subsection
Symbol
Space
Functions
@deftypefn
{
sieve_register_t
*
}
sieve_test_lookup
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
name
})
@deftypef
u
n
{
sieve_register_t
*
}
sieve_test_lookup
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
name
})
Find
a
register
object
describing
the
test
@var
{
name
}.
Returns
@code
{
NULL
}
if
no
such
test
exists
.
@end
deftypefn
@end
deftypef
u
n
@deftypef
n
sieve_register_t
*
sieve_action_lookup
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
name
})
@deftypef
un
{
sieve_register_t
*
}
sieve_action_lookup
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
name
})
Find
a
register
object
describing
the
action
@var
{
name
}.
Returns
@code
{
NULL
}
if
no
such
action
exists
.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
int
sieve_register_test
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
name
},
sieve_handler_t
@var
{
handler
},
sieve_data_type
*
@var
{
arg_types
},
sieve_tag_group_t
*
@var
{
tags
},
int
@var
{
required
})
@end
deftypefn
@deftypef
u
n
int
sieve_register_test
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
name
},
sieve_handler_t
@var
{
handler
},
sieve_data_type
*
@var
{
arg_types
},
sieve_tag_group_t
*
@var
{
tags
},
int
@var
{
required
})
@end
deftypef
u
n
@deftypefn
int
sieve_register_action
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
name
},
sieve_handler_t
@var
{
handler
},
sieve_data_type
*
@var
{
arg_types
},
sieve_tag_group_t
*
@var
{
tags
},
int
@var
{
required
})
@end
deftypefn
@deftypef
u
n
int
sieve_register_action
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
name
},
sieve_handler_t
@var
{
handler
},
sieve_data_type
*
@var
{
arg_types
},
sieve_tag_group_t
*
@var
{
tags
},
int
@var
{
required
})
@end
deftypef
u
n
@deftypefn
int
sieve_register_comparator
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
name
},
int
@var
{
required
},
sieve_comparator_t
@var
{
is
},
sieve_comparator_t
@var
{
contains
},
sieve_comparator_t
@var
{
matches
},
sieve_comparator_t
@var
{
regex
})
@end
deftypefn
@deftypef
u
n
int
sieve_register_comparator
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
name
},
int
@var
{
required
},
sieve_comparator_t
@var
{
is
},
sieve_comparator_t
@var
{
contains
},
sieve_comparator_t
@var
{
matches
},
sieve_comparator_t
@var
{
regex
})
@end
deftypef
u
n
@deftypefn
int
sieve_tag_lookup
(
list_t
@var
{
taglist
},
char
*
@var
{
name
},
sieve_value_t
**
@var
{
arg
})
@end
deftypefn
@deftypef
u
n
int
sieve_tag_lookup
(
list_t
@var
{
taglist
},
char
*
@var
{
name
},
sieve_value_t
**
@var
{
arg
})
@end
deftypef
u
n
@deftypefn
int
sieve_load_ext
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
name
})
@end
deftypefn
@deftypef
u
n
int
sieve_load_ext
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
name
})
@end
deftypef
u
n
@node
Memory
Allocation
@subsection
Memory
Allocation
...
...
@@ -579,16 +579,16 @@ The following functions act as their libc counterparts. The allocated
memory
is
associated
with
the
@var
{
mach
}
argument
and
is
automatically
freed
upon
the
call
to
@code
{
sieve_machine_destroy
(
@var
{
mach
})}.
@deftypefn
{
void
*
}
sieve_malloc
(
sieve_machine_t
@var
{
mach
},
size_t
@var
{
size
})
@deftypef
u
n
{
void
*
}
sieve_malloc
(
sieve_machine_t
@var
{
mach
},
size_t
@var
{
size
})
Allocates
@var
{
size
}
bytes
and
returns
a
pointer
to
the
allocated
memory
.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
{
char
*
}
sieve_mstrdup
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
str
})
@deftypef
u
n
{
char
*
}
sieve_mstrdup
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
str
})
This
function
returns
a
pointer
to
a
new
string
which
is
a
duplicate
of
the
string
@var
{
str
}.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
{
void
*
}
sieve_mrealloc
(
sieve_machine_t
@var
{
mach
},
void
*
@var
{
ptr
},
size_t
@var
{
size
})
@deftypef
u
n
{
void
*
}
sieve_mrealloc
(
sieve_machine_t
@var
{
mach
},
void
*
@var
{
ptr
},
size_t
@var
{
size
})
Changes
the
size
of
the
memory
block
pointed
to
by
@var
{
ptr
}
to
@var
{
size
}
bytes
.
The
contents
will
be
unchanged
to
the
minimum
of
the
old
and
new
sizes
;
newly
allocated
memory
will
be
uninitialized
.
If
...
...
@@ -597,9 +597,9 @@ old and new sizes; newly allocated memory will be uninitialized. If
zero
,
the
call
is
equivalent
to
@code
{
sieve_mfree
(
@var
{
ptr
})}.
Unless
@var
{
ptr
}
is
@code
{
NULL
},
it
must
have
been
returned
by
an
earlier
call
to
@code
{
sieve_malloc
()}
or
@code
{
sieve_mrealloc
()}.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
void
sieve_mfree
(
sieve_machine_t
@var
{
mach
},
void
*
@var
{
ptr
})
@deftypef
u
n
void
sieve_mfree
(
sieve_machine_t
@var
{
mach
},
void
*
@var
{
ptr
})
@code
{
sieve_mfree
()}
frees
the
memory
space
pointed
to
by
@var
{
ptr
}
and
detaches
it
from
the
destructor
list
of
@var
{
mach
}.
The
@var
{
ptr
}
must
have
been
returned
by
a
previous
call
to
@code
{
sieve_malloc
()}
or
...
...
@@ -607,28 +607,28 @@ have been returned by a previous call to @code{sieve_malloc()} or
has
already
been
called
before
,
undefined
behaviour
occurs
.
If
@var
{
ptr
}
is
@code
{
NULL
},
no
operation
is
performed
.
@end
deftypefn
@end
deftypef
u
n
@node
Compiling
and
Executing
the
Script
@subsection
Compiling
and
Executing
the
Script
@deftypefn
int
sieve_compile
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
name
})
@deftypef
u
n
int
sieve_compile
(
sieve_machine_t
@var
{
mach
},
const
char
*
@var
{
name
})
Compile
the
sieve
script
from
the
file
@var
{
name
}.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
int
sieve_mailbox
(
sieve_machine_t
@var
{
mach
},
mailbox_t
@var
{
mbox
})
@deftypef
u
n
int
sieve_mailbox
(
sieve_machine_t
@var
{
mach
},
mailbox_t
@var
{
mbox
})
Execute
the
code
from
the
given
instance
of
sieve
machine
@var
{
mach
}
over
each
message
in
the
mailbox
@var
{
mbox
}.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
int
sieve_message
(
sieve_machine_t
@var
{
mach
},
message_t
@var
{
message
})
@deftypef
u
n
int
sieve_message
(
sieve_machine_t
@var
{
mach
},
message_t
@var
{
message
})
Execute
the
code
from
the
given
instance
of
sieve
machine
@var
{
mach
}
over
the
@var
{
message
}.
@end
deftypefn
@end
deftypef
u
n
@deftypefn
int
sieve_disass
(
sieve_machine_t
@var
{
mach
})
@deftypef
u
n
int
sieve_disass
(
sieve_machine_t
@var
{
mach
})
Dump
the
disassembled
code
of
the
sieve
machine
@var
{
mach
}.
@end
deftypefn
@end
deftypef
u
n
@node
Input
Language
@section
Input
Language
...
...
Please
register
or
sign in
to post a comment