v1.6
846
COPYING
@ -1,285 +1,626 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
0. Definitions.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
1. Source Code.
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
14. Revised Versions of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
NO WARRANTY
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
@ -287,15 +628,15 @@ free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
This program 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 of the License, or
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
@ -304,37 +645,32 @@ the "copyright" line and a pointer to where the full notice is found.
|
||||
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
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
|
20
ChangeLog
@ -1,6 +1,26 @@
|
||||
E-MailRelay Change Log
|
||||
======================
|
||||
|
||||
1.5 -> 1.6
|
||||
----------
|
||||
* GPLv3 licence (see "http://gplv3.fsf.org").
|
||||
* New "--prompt-timeout" switch for the timeout when waiting for the initial 220 prompt from the SMTP server.
|
||||
* Fix for flow-control assertion error when the POP server sends a very long list of spooled messages.
|
||||
* Wildcard matching for trusted IP addresses in the authentication secrets file can now use CIDR notation.
|
||||
* More fine-grained switching of effective user-id to read files and directories when running as root.
|
||||
* Fewer new client connections when proxying.
|
||||
* The server drops the connection if a remote SMTP client causes too many protocol errors.
|
||||
* More complete implementation of "--hidden" on Windows.
|
||||
* Scanner switch ("--scanner") replaced by a more general "--filter" and "--client-filter" switch syntax.
|
||||
* Support for address verification ("--verifier") over the network.
|
||||
* Better support for running as a Windows service ("emailrelay-service --install").
|
||||
* Utility filter program "emailrelay-filter-copy" exits with 100 if it deletes the envelope file.
|
||||
* Windows "cscript.exe" wrapper is added automatically to non-bat/exe "--filter" command-lines.
|
||||
* Installation GUI makes backups of the files it edits and preserves authentication secrets.
|
||||
* Installation GUI can install "init.d" links.
|
||||
* Experimental SpamAssassin spamc/spamd protocol support.
|
||||
* Acceptance tests added to the distribution.
|
||||
|
||||
1.4 -> 1.5
|
||||
----------
|
||||
* New installation and configuration GUI using TrollTech Qt 4.x ("./configure --enable-gui")
|
||||
|
41
INSTALL
@ -1,31 +1,34 @@
|
||||
Introduction
|
||||
============
|
||||
|
||||
With the exception of this introduction this document contains generic
|
||||
With the exception of this introduction section this document contains generic
|
||||
installation instructions for doing a GNU-style
|
||||
"./configure; make; sudo make install" installation from source under Linux,
|
||||
FreeBSD etc. The Windows installation instructions are in a separate document,
|
||||
"doc/windows.txt".
|
||||
FreeBSD etc. Windows specific installation instructions are in a separate
|
||||
document, "doc/windows.txt".
|
||||
|
||||
The E-MailRelay "configure" script provides a few extra confiruation
|
||||
switches, which are shown in the output of "./configure --help". The
|
||||
most important of these is "--enable-fhs", which overrides all other
|
||||
directory modifiers, forcing compliance with the File Hierarchy
|
||||
Standard.
|
||||
The E-MailRelay "configure" script provides a few extra confiruation switches,
|
||||
which are shown in the output of "./configure --help". The most important of
|
||||
these is "--enable-fhs", which overrides all other directory modifiers, forcing
|
||||
compliance with the File Hierarchy Standard.
|
||||
|
||||
There are also a set of variables which can be defined on the
|
||||
"configure" command line for controlling all the installation
|
||||
directories in more detail, augmenting the standard command-line
|
||||
switches like "--sbindir" and "--libexecdir". For more information
|
||||
refer to the E-MailRelay reference document under "Files and directories".
|
||||
There are also a set of variables which can be defined on the "configure"
|
||||
command line for controlling all the installation directories in more detail,
|
||||
augmenting the standard command-line switches like "--sbindir" and
|
||||
"--libexecdir". For more information refer to the E-MailRelay reference document
|
||||
under "Files and directories".
|
||||
|
||||
If compiling with something other than "gcc" then check for any
|
||||
compiler-specific help in the relevant lib/<compiler> directory.
|
||||
If compiling with something other than "gcc" then check for any
|
||||
compiler-specific help in the relevant "lib/<compiler>" directory.
|
||||
|
||||
The E-MailRelay user guide describes what needs to be done after the
|
||||
"make install" in order to get the emailrelay daemon to start up at boot-time,
|
||||
automatically forward e-mail and bounce failed mail. You could also try running
|
||||
the configuration GUI program, "emailrelay-gui", if available.
|
||||
If you want to install a package rather than running "make install" you could
|
||||
try building an RPM pacakge with "rpmbuild" using the RPM spec file provided in
|
||||
the distribution, and if necessary then making a ".deb" package from that using
|
||||
"alien".
|
||||
|
||||
Finally, you could try running the configuration GUI program "emailrelay-gui"
|
||||
(if available) after doing the installation to help with the initial
|
||||
configuration.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
22
Makefile.am
@ -1,11 +1,10 @@
|
||||
#
|
||||
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
##
|
||||
## This program 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 of the License, or (at your option) any later
|
||||
## version.
|
||||
## This program 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 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,15 +12,10 @@
|
||||
## 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
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
##
|
||||
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
EXTRA_DIST = emailrelay.spec ChangeLog
|
||||
SUBDIRS = src bin lib etc doc
|
||||
e_doc_DATA = NEWS README changelog.gz
|
||||
CLEANFILES = changelog.gz
|
||||
changelog.gz: ChangeLog
|
||||
if test -n "$(GZIP)" ; then $(GZIP) -c $(top_srcdir)/ChangeLog > changelog.tmp && mv changelog.tmp changelog.gz ; fi
|
||||
EXTRA_DIST = emailrelay.spec ChangeLog README.windows
|
||||
SUBDIRS = src bin lib etc doc test
|
||||
e_doc_DATA = NEWS README ChangeLog
|
||||
uninstall-local:
|
||||
-rmdir $(DESTDIR)$(e_docdir) 2>/dev/null
|
||||
|
13
Makefile.in
@ -131,7 +131,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
POPLIB = @POPLIB@
|
||||
QT_CFLAGS = @QT_CFLAGS@
|
||||
QT_LIBS = @QT_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
@ -160,8 +159,10 @@ dvidir = @dvidir@
|
||||
e_docdir = @e_docdir@
|
||||
e_examplesdir = @e_examplesdir@
|
||||
e_initdir = @e_initdir@
|
||||
e_libexecdir = @e_libexecdir@
|
||||
e_qtmoc = @e_qtmoc@
|
||||
e_spooldir = @e_spooldir@
|
||||
e_sysconfdir = @e_sysconfdir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
@ -189,10 +190,9 @@ top_srcdir = @top_srcdir@
|
||||
|
||||
#
|
||||
#
|
||||
EXTRA_DIST = emailrelay.spec ChangeLog
|
||||
SUBDIRS = src bin lib etc doc
|
||||
e_doc_DATA = NEWS README changelog.gz
|
||||
CLEANFILES = changelog.gz
|
||||
EXTRA_DIST = emailrelay.spec ChangeLog README.windows
|
||||
SUBDIRS = src bin lib etc doc test
|
||||
e_doc_DATA = NEWS README ChangeLog
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
@ -563,7 +563,6 @@ install-strip:
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
@ -647,8 +646,6 @@ uninstall-am: uninstall-e_docDATA uninstall-local
|
||||
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
|
||||
uninstall-e_docDATA uninstall-local
|
||||
|
||||
changelog.gz: ChangeLog
|
||||
if test -n "$(GZIP)" ; then $(GZIP) -c $(top_srcdir)/ChangeLog > changelog.tmp && mv changelog.tmp changelog.gz ; fi
|
||||
uninstall-local:
|
||||
-rmdir $(DESTDIR)$(e_docdir) 2>/dev/null
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
|
10
README
@ -10,7 +10,7 @@ messages as they pass through. When running as a store-and-forward MTA incoming
|
||||
messages are stored in a local spool directory, and then forwarded to the next
|
||||
SMTP server on request.
|
||||
|
||||
Because of its functional simplicity E-MailRelay is easy to configure, typically
|
||||
Because of its functional simplicity E-MailRelay is easy to configure, often
|
||||
only requiring the address of the target SMTP server to be put on the command
|
||||
line.
|
||||
|
||||
@ -18,7 +18,7 @@ E-MailRelay can also run as a POP3 server. Messages received over SMTP can be
|
||||
automatically dropped into several independent POP3 mailboxes.
|
||||
|
||||
C++ source code is available for Linux, FreeBSD, MacOS X etc, and Windows.
|
||||
Distribution is under the GNU General Public License.
|
||||
Distribution is under the GNU General Public License V3.
|
||||
|
||||
Quick start
|
||||
-----------
|
||||
@ -86,9 +86,9 @@ Source code documentation will be generated when building from source if
|
||||
|
||||
Configurations
|
||||
--------------
|
||||
Recent releases were developed on Ubuntu Linux 7.04 using:
|
||||
* linux 2.6.20
|
||||
* gcc 4.1.2
|
||||
Recent releases were developed on Ubuntu Linux 7.10 using:
|
||||
* linux 2.6.22
|
||||
* gcc 4.1.3
|
||||
* autoconf 2.61
|
||||
|
||||
and on Windows NT4 SP6 using:
|
||||
|
1
README.windows
Normal file
@ -0,0 +1 @@
|
||||
See doc/windows.txt
|
68
acinclude.m4
@ -1,10 +1,9 @@
|
||||
dnl Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
dnl
|
||||
dnl This program is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU General Public License
|
||||
dnl as published by the Free Software Foundation; either
|
||||
dnl version 2 of the License, or (at your option) any later
|
||||
dnl version.
|
||||
dnl This program is free software: you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation, either version 3 of the License, or
|
||||
dnl (at your option) any later version.
|
||||
dnl
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -12,9 +11,7 @@ dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with this program; if not, write to the Free Software
|
||||
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
dnl
|
||||
dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
dnl ===
|
||||
|
||||
dnl socketlen_t
|
||||
@ -31,9 +28,9 @@ AC_DEFUN([ACLOCAL_TYPE_SOCKLEN_T],
|
||||
aclocal_cv_type_socklen_t=no )
|
||||
])
|
||||
if test $aclocal_cv_type_socklen_t = yes; then
|
||||
AC_DEFINE(HAVE_SOCKLEN_T, 1,[Define if socklen_t type definition in sys/socket.h])
|
||||
AC_DEFINE(HAVE_SOCKLEN_T, 1,[Define to 1 if socklen_t type definition in sys/socket.h])
|
||||
else
|
||||
AC_DEFINE(HAVE_SOCKLEN_T, 0,[Define if socklen_t type definition in sys/socket.h])
|
||||
AC_DEFINE(HAVE_SOCKLEN_T, 0,[Define to 1 if socklen_t type definition in sys/socket.h])
|
||||
fi
|
||||
])
|
||||
|
||||
@ -52,9 +49,9 @@ AC_DEFUN([ACLOCAL_CHECK_IPV6],
|
||||
aclocal_cv_ipv6=no )
|
||||
])
|
||||
if test $aclocal_cv_ipv6 = yes; then
|
||||
AC_DEFINE(HAVE_IPV6,1,[Define if ipv6 is available])
|
||||
AC_DEFINE(HAVE_IPV6,1,[Define to 1 if ipv6 is available])
|
||||
else
|
||||
AC_DEFINE(HAVE_IPV6,0,[Define if ipv6 is available])
|
||||
AC_DEFINE(HAVE_IPV6,0,[Define to 1 if ipv6 is available])
|
||||
fi
|
||||
])
|
||||
|
||||
@ -74,9 +71,9 @@ AC_DEFUN([ACLOCAL_CHECK_GETIPNODEBYNAME],
|
||||
aclocal_cv_getipnodebyname=no )
|
||||
])
|
||||
if test $aclocal_cv_getipnodebyname = yes; then
|
||||
AC_DEFINE(HAVE_GETIPNODEBYNAME,1,[Define if getipnodebyname() is available])
|
||||
AC_DEFINE(HAVE_GETIPNODEBYNAME,1,[Define to 1 if getipnodebyname() is available])
|
||||
else
|
||||
AC_DEFINE(HAVE_GETIPNODEBYNAME,0,[Define if getipnodebyname() is available])
|
||||
AC_DEFINE(HAVE_GETIPNODEBYNAME,0,[Define to 1 if getipnodebyname() is available])
|
||||
fi
|
||||
])
|
||||
|
||||
@ -94,9 +91,9 @@ AC_DEFUN([ACLOCAL_CHECK_SIN6_LEN],
|
||||
aclocal_cv_sin6_len=no )
|
||||
])
|
||||
if test $aclocal_cv_sin6_len = yes; then
|
||||
AC_DEFINE(HAVE_SIN6_LEN,1,[Define if sockaddr_in6 has a sin6_len member])
|
||||
AC_DEFINE(HAVE_SIN6_LEN,1,[Define to 1 if sockaddr_in6 has a sin6_len member])
|
||||
else
|
||||
AC_DEFINE(HAVE_SIN6_LEN,0,[Define if sockaddr_in6 has a sin6_len member])
|
||||
AC_DEFINE(HAVE_SIN6_LEN,0,[Define to 1 if sockaddr_in6 has a sin6_len member])
|
||||
fi
|
||||
])
|
||||
|
||||
@ -114,9 +111,9 @@ AC_DEFUN([ACLOCAL_CHECK_SETGROUPS],
|
||||
aclocal_cv_setgroups=no )
|
||||
])
|
||||
if test $aclocal_cv_setgroups = yes; then
|
||||
AC_DEFINE(HAVE_SETGROUPS,1,[Define if setgroups is available])
|
||||
AC_DEFINE(HAVE_SETGROUPS,1,[Define to 1 if setgroups is available])
|
||||
else
|
||||
AC_DEFINE(HAVE_SETGROUPS,0,[Define if setgroups is available])
|
||||
AC_DEFINE(HAVE_SETGROUPS,0,[Define to 1 if setgroups is available])
|
||||
fi
|
||||
])
|
||||
|
||||
@ -132,9 +129,9 @@ AC_DEFUN([ACLOCAL_CHECK_GMTIME_R],
|
||||
aclocal_cv_gmtime_r=no )
|
||||
])
|
||||
if test $aclocal_cv_gmtime_r = yes; then
|
||||
AC_DEFINE(HAVE_GMTIME_R,1,[Define if gmtime_r in time.h])
|
||||
AC_DEFINE(HAVE_GMTIME_R,1,[Define to 1 if gmtime_r in time.h])
|
||||
else
|
||||
AC_DEFINE(HAVE_GMTIME_R,0,[Define if gmtime_r in time.h])
|
||||
AC_DEFINE(HAVE_GMTIME_R,0,[Define to 1 if gmtime_r in time.h])
|
||||
fi
|
||||
])
|
||||
|
||||
@ -150,9 +147,9 @@ AC_DEFUN([ACLOCAL_CHECK_LOCALTIME_R],
|
||||
aclocal_cv_localtime_r=no )
|
||||
])
|
||||
if test $aclocal_cv_localtime_r = yes; then
|
||||
AC_DEFINE(HAVE_LOCALTIME_R,1,[Define if localtime_r in time.h])
|
||||
AC_DEFINE(HAVE_LOCALTIME_R,1,[Define to 1 if localtime_r in time.h])
|
||||
else
|
||||
AC_DEFINE(HAVE_LOCALTIME_R,0,[Define if localtime_r in time.h])
|
||||
AC_DEFINE(HAVE_LOCALTIME_R,0,[Define to 1 if localtime_r in time.h])
|
||||
fi
|
||||
])
|
||||
|
||||
@ -170,9 +167,9 @@ AC_DEFUN([ACLOCAL_CHECK_BUGGY_CTIME],
|
||||
aclocal_cv_buggy_ctime=yes )
|
||||
])
|
||||
if test $aclocal_cv_buggy_ctime = yes; then
|
||||
AC_DEFINE(HAVE_BUGGY_CTIME,1,[Define if <ctime> requires <time.h>])
|
||||
AC_DEFINE(HAVE_BUGGY_CTIME,1,[Define to 1 if <ctime> requires <time.h>])
|
||||
else
|
||||
AC_DEFINE(HAVE_BUGGY_CTIME,0,[Define if <ctime> requires <time.h>])
|
||||
AC_DEFINE(HAVE_BUGGY_CTIME,0,[Define to 1 if <ctime> requires <time.h>])
|
||||
fi
|
||||
])
|
||||
|
||||
@ -210,7 +207,7 @@ qt4="no"
|
||||
qt4moc="no"
|
||||
if test "$enable_gui" = "no"
|
||||
then
|
||||
AC_DEFINE(HAVE_GUI,0,[Define to enable gui code])
|
||||
AC_DEFINE(HAVE_GUI,0,[Define to 1 to enable gui code])
|
||||
else
|
||||
PKG_CHECK_MODULES(QT,QtGui >= 4.0.1,[qt4=yes],[AC_MSG_RESULT([no])])
|
||||
if test "$qt4" = "yes"
|
||||
@ -232,27 +229,14 @@ else
|
||||
fi
|
||||
if test "$qt4moc" = "yes"
|
||||
then
|
||||
AC_DEFINE(HAVE_GUI,1,[Define to enable gui code])
|
||||
AC_DEFINE(HAVE_GUI,1,[Define to 1 to enable gui code])
|
||||
else
|
||||
AC_DEFINE(HAVE_GUI,0,[Define to enable gui code])
|
||||
AC_DEFINE(HAVE_GUI,0,[Define to 1 to enable gui code])
|
||||
fi
|
||||
AC_SUBST(MOC)
|
||||
AM_CONDITIONAL(GUI,test x$enable_gui != xno -a x$qt4moc = xyes )
|
||||
])
|
||||
|
||||
dnl enable-pop
|
||||
dnl
|
||||
AC_DEFUN([ENABLE_POP],
|
||||
[
|
||||
if test "$enable_pop" = "no"
|
||||
then
|
||||
POPLIB="libgnopop.a"
|
||||
else
|
||||
POPLIB="libgpop.a"
|
||||
fi
|
||||
AC_SUBST(POPLIB)
|
||||
])
|
||||
|
||||
dnl enable-ipv6
|
||||
dnl
|
||||
AC_DEFUN([ENABLE_IPV6],
|
||||
@ -351,13 +335,11 @@ AC_DEFUN([FHS_COMPLIANCE],
|
||||
#infodir=
|
||||
#
|
||||
# emailrelay-specific
|
||||
e_sbindir="$sbindir"
|
||||
e_libexecdir="$libexecdir/$PACKAGE"
|
||||
e_docdir="$datadir/doc/$PACKAGE"
|
||||
e_initdir="/etc/init.d"
|
||||
e_spooldir="$localstatedir/spool/$PACKAGE"
|
||||
e_man1dir="$datadir/man/man1"
|
||||
e_examplesdir="$datadir/doc/$PACKAGE/examples"
|
||||
e_examplesdir="$libexecdir/$PACKAGE/examples"
|
||||
e_sysconfdir="$sysconfdir"
|
||||
])
|
||||
|
||||
|
2
aclocal.m4
vendored
@ -164,7 +164,7 @@ path to pkg-config.
|
||||
|
||||
_PKG_TEXT
|
||||
|
||||
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
|
||||
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
|
||||
[$4])
|
||||
else
|
||||
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
|
||||
|
@ -1,11 +1,10 @@
|
||||
#
|
||||
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
##
|
||||
## This program 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 of the License, or (at your option) any later
|
||||
## version.
|
||||
## This program 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 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,26 +12,21 @@
|
||||
## 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
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
##
|
||||
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
EXTRA_DIST = emailrelay-test.sh_ emailrelay-soak.sh_ emailrelay.sh_ txt2html.sh_ txt2mu.sh_ mu2html.sh_ mu2docbook.sh_ expand.sh_ emailrelay-notify.sh_ emailrelay-resubmit.sh_ emailrelay-deliver.sh_ emailrelay-process.sh_ emailrelay-runperl.js emailrelay-resubmit.js emailrelay-submit.sh_
|
||||
noinst_cleanup = emailrelay-test.sh emailrelay-soak.sh
|
||||
noinst_SCRIPTS = emailrelay-test.sh emailrelay-soak.sh emailrelay-runperl.js emailrelay-resubmit.js
|
||||
EXTRA_DIST = emailrelay.sh_ txt2html.sh_ txt2mu.sh_ mu2html.sh_ mu2docbook.sh_ expand.sh_ emailrelay-notify.sh_ emailrelay-resubmit.sh_ emailrelay-deliver.sh_ emailrelay-process.sh_ emailrelay-runperl.js emailrelay-resubmit.js emailrelay-submit.sh_
|
||||
work_scripts = txt2mu.sh mu2html.sh mu2docbook.sh expand.sh txt2html.sh emailrelay.sh
|
||||
noinst_SCRIPTS = emailrelay-runperl.js emailrelay-resubmit.js $(work_scripts)
|
||||
e_init_SCRIPTS = emailrelay
|
||||
e_examples_DATA = emailrelay-process.sh emailrelay-notify.sh emailrelay-deliver.sh emailrelay-resubmit.sh emailrelay-submit.sh
|
||||
work_scripts = txt2mu.sh mu2html.sh mu2docbook.sh expand.sh txt2html.sh emailrelay.sh
|
||||
|
||||
CLEANFILES = $(noinst_cleanup) $(e_init_SCRIPTS) $(e_examples_DATA) $(work_scripts)
|
||||
|
||||
TESTS = emailrelay-test.sh
|
||||
CLEANFILES = $(e_init_SCRIPTS) $(e_examples_DATA) $(work_scripts)
|
||||
|
||||
SUFFIXES = .sh_ .sh
|
||||
|
||||
.sh_.sh:
|
||||
cat $(srcdir)/../bin/$*.sh_ | sed "s%__SPOOL_DIR__%${e_spooldir}%g;s%__SBIN_DIR__%${sbindir}%g" > $*.tmp && mv $*.tmp $*.sh
|
||||
cat $(srcdir)/../bin/$*.sh_ | sed "s%__SPOOL_DIR__%${e_spooldir}%g;s%__SBIN_DIR__%${sbindir}%g;"'s/\[:digit:\]/0-9/g;s/\[:space:\]/ \\t/g' > $*.tmp && mv $*.tmp $*.sh
|
||||
chmod ugo+x $*.sh
|
||||
|
||||
emailrelay: emailrelay.sh
|
||||
|
@ -111,7 +111,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
POPLIB = @POPLIB@
|
||||
QT_CFLAGS = @QT_CFLAGS@
|
||||
QT_LIBS = @QT_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
@ -140,8 +139,10 @@ dvidir = @dvidir@
|
||||
e_docdir = @e_docdir@
|
||||
e_examplesdir = @e_examplesdir@
|
||||
e_initdir = @e_initdir@
|
||||
e_libexecdir = @e_libexecdir@
|
||||
e_qtmoc = @e_qtmoc@
|
||||
e_spooldir = @e_spooldir@
|
||||
e_sysconfdir = @e_sysconfdir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
@ -166,14 +167,12 @@ sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRA_DIST = emailrelay-test.sh_ emailrelay-soak.sh_ emailrelay.sh_ txt2html.sh_ txt2mu.sh_ mu2html.sh_ mu2docbook.sh_ expand.sh_ emailrelay-notify.sh_ emailrelay-resubmit.sh_ emailrelay-deliver.sh_ emailrelay-process.sh_ emailrelay-runperl.js emailrelay-resubmit.js emailrelay-submit.sh_
|
||||
noinst_cleanup = emailrelay-test.sh emailrelay-soak.sh
|
||||
noinst_SCRIPTS = emailrelay-test.sh emailrelay-soak.sh emailrelay-runperl.js emailrelay-resubmit.js
|
||||
EXTRA_DIST = emailrelay.sh_ txt2html.sh_ txt2mu.sh_ mu2html.sh_ mu2docbook.sh_ expand.sh_ emailrelay-notify.sh_ emailrelay-resubmit.sh_ emailrelay-deliver.sh_ emailrelay-process.sh_ emailrelay-runperl.js emailrelay-resubmit.js emailrelay-submit.sh_
|
||||
work_scripts = txt2mu.sh mu2html.sh mu2docbook.sh expand.sh txt2html.sh emailrelay.sh
|
||||
noinst_SCRIPTS = emailrelay-runperl.js emailrelay-resubmit.js $(work_scripts)
|
||||
e_init_SCRIPTS = emailrelay
|
||||
e_examples_DATA = emailrelay-process.sh emailrelay-notify.sh emailrelay-deliver.sh emailrelay-resubmit.sh emailrelay-submit.sh
|
||||
work_scripts = txt2mu.sh mu2html.sh mu2docbook.sh expand.sh txt2html.sh emailrelay.sh
|
||||
CLEANFILES = $(noinst_cleanup) $(e_init_SCRIPTS) $(e_examples_DATA) $(work_scripts)
|
||||
TESTS = emailrelay-test.sh
|
||||
CLEANFILES = $(e_init_SCRIPTS) $(e_examples_DATA) $(work_scripts)
|
||||
SUFFIXES = .sh_ .sh
|
||||
all: all-am
|
||||
|
||||
@ -251,79 +250,6 @@ ctags: CTAGS
|
||||
CTAGS:
|
||||
|
||||
|
||||
check-TESTS: $(TESTS)
|
||||
@failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[ ]'; \
|
||||
srcdir=$(srcdir); export srcdir; \
|
||||
list=' $(TESTS) '; \
|
||||
if test -n "$$list"; then \
|
||||
for tst in $$list; do \
|
||||
if test -f ./$$tst; then dir=./; \
|
||||
elif test -f $$tst; then dir=; \
|
||||
else dir="$(srcdir)/"; fi; \
|
||||
if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
|
||||
all=`expr $$all + 1`; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*$$ws$$tst$$ws*) \
|
||||
xpass=`expr $$xpass + 1`; \
|
||||
failed=`expr $$failed + 1`; \
|
||||
echo "XPASS: $$tst"; \
|
||||
;; \
|
||||
*) \
|
||||
echo "PASS: $$tst"; \
|
||||
;; \
|
||||
esac; \
|
||||
elif test $$? -ne 77; then \
|
||||
all=`expr $$all + 1`; \
|
||||
case " $(XFAIL_TESTS) " in \
|
||||
*$$ws$$tst$$ws*) \
|
||||
xfail=`expr $$xfail + 1`; \
|
||||
echo "XFAIL: $$tst"; \
|
||||
;; \
|
||||
*) \
|
||||
failed=`expr $$failed + 1`; \
|
||||
echo "FAIL: $$tst"; \
|
||||
;; \
|
||||
esac; \
|
||||
else \
|
||||
skip=`expr $$skip + 1`; \
|
||||
echo "SKIP: $$tst"; \
|
||||
fi; \
|
||||
done; \
|
||||
if test "$$failed" -eq 0; then \
|
||||
if test "$$xfail" -eq 0; then \
|
||||
banner="All $$all tests passed"; \
|
||||
else \
|
||||
banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
|
||||
fi; \
|
||||
else \
|
||||
if test "$$xpass" -eq 0; then \
|
||||
banner="$$failed of $$all tests failed"; \
|
||||
else \
|
||||
banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dashes="$$banner"; \
|
||||
skipped=""; \
|
||||
if test "$$skip" -ne 0; then \
|
||||
skipped="($$skip tests were not run)"; \
|
||||
test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
|
||||
dashes="$$skipped"; \
|
||||
fi; \
|
||||
report=""; \
|
||||
if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
|
||||
report="Please report to $(PACKAGE_BUGREPORT)"; \
|
||||
test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
|
||||
dashes="$$report"; \
|
||||
fi; \
|
||||
dashes=`echo "$$dashes" | sed s/./=/g`; \
|
||||
echo "$$dashes"; \
|
||||
echo "$$banner"; \
|
||||
test -z "$$skipped" || echo "$$skipped"; \
|
||||
test -z "$$report" || echo "$$report"; \
|
||||
echo "$$dashes"; \
|
||||
test "$$failed" -eq 0; \
|
||||
else :; fi
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
@ -351,7 +277,6 @@ distdir: $(DISTFILES)
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
|
||||
check: check-am
|
||||
all-am: Makefile $(SCRIPTS) $(DATA)
|
||||
installdirs:
|
||||
@ -441,9 +366,9 @@ uninstall-am: uninstall-e_examplesDATA uninstall-e_initSCRIPTS \
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-TESTS check-am clean clean-generic \
|
||||
distclean distclean-generic distdir dvi dvi-am html html-am \
|
||||
info info-am install install-am install-data install-data-am \
|
||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
||||
distclean-generic distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am \
|
||||
install-data-local install-dvi install-dvi-am \
|
||||
install-e_examplesDATA install-e_initSCRIPTS install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
@ -457,7 +382,7 @@ uninstall-am: uninstall-e_examplesDATA uninstall-e_initSCRIPTS \
|
||||
|
||||
|
||||
.sh_.sh:
|
||||
cat $(srcdir)/../bin/$*.sh_ | sed "s%__SPOOL_DIR__%${e_spooldir}%g;s%__SBIN_DIR__%${sbindir}%g" > $*.tmp && mv $*.tmp $*.sh
|
||||
cat $(srcdir)/../bin/$*.sh_ | sed "s%__SPOOL_DIR__%${e_spooldir}%g;s%__SBIN_DIR__%${sbindir}%g;"'s/\[:digit:\]/0-9/g;s/\[:space:\]/ \\t/g' > $*.tmp && mv $*.tmp $*.sh
|
||||
chmod ugo+x $*.sh
|
||||
|
||||
emailrelay: emailrelay.sh
|
||||
|
@ -2,11 +2,10 @@
|
||||
#
|
||||
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
#
|
||||
# This program 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 of the License, or (at your option) any later
|
||||
# version.
|
||||
# This program 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 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -14,9 +13,7 @@
|
||||
# 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
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# ===
|
||||
#
|
||||
# emailrelay-deliver.sh
|
||||
|
@ -2,11 +2,10 @@
|
||||
#
|
||||
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
#
|
||||
# This program 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 of the License, or (at your option) any later
|
||||
# version.
|
||||
# This program 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 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -14,9 +13,7 @@
|
||||
# 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
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# ===
|
||||
#
|
||||
# emailrelay-notify.sh
|
||||
|
@ -2,11 +2,10 @@
|
||||
#
|
||||
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
#
|
||||
# This program 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 of the License, or (at your option) any later
|
||||
# version.
|
||||
# This program 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 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -14,9 +13,7 @@
|
||||
# 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
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# ===
|
||||
#
|
||||
# emailrelay-process.sh
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file emailrelay-resubmit.js
|
||||
|
@ -2,11 +2,10 @@
|
||||
#
|
||||
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
#
|
||||
# This program 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 of the License, or (at your option) any later
|
||||
# version.
|
||||
# This program 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 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -14,9 +13,7 @@
|
||||
# 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
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# ===
|
||||
#
|
||||
# emailrelay-resubmit.sh
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file emailrelay-runperl.js
|
||||
|
@ -2,11 +2,10 @@
|
||||
#
|
||||
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
#
|
||||
# This program 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 of the License, or (at your option) any later
|
||||
# version.
|
||||
# This program 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 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -14,9 +13,7 @@
|
||||
# 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
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# ===
|
||||
#
|
||||
# emailrelay-submit.sh
|
||||
|
@ -2,11 +2,10 @@
|
||||
#
|
||||
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
#
|
||||
# This program 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 of the License, or (at your option) any later
|
||||
# version.
|
||||
# This program 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 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -14,9 +13,7 @@
|
||||
# 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
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# ===
|
||||
#
|
||||
# emailrelay
|
||||
@ -35,45 +32,22 @@
|
||||
# insserv (suse), /usr/share/doc/initscripts*/sysvinitfiles (redhat)
|
||||
#
|
||||
|
||||
|
||||
##
|
||||
# RedHat comment block...
|
||||
#
|
||||
# chkconfig: 345 80 20
|
||||
# description: E-MailRelay is a SMTP proxy and store-and-forward MTA.
|
||||
# pidfile: /var/run/emailrelay.pid
|
||||
# processname: emailrelay
|
||||
##
|
||||
|
||||
|
||||
##
|
||||
# LSB comment block...
|
||||
#
|
||||
# The bogus 345 run-levels are a workround for a buggy RedHat chkconfig which
|
||||
# reads the LSB comment block as an undocumented 'feature' and then parses it
|
||||
# wrongly.
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: emailrelay
|
||||
# Required-Start: $network
|
||||
# Required-Stop: $network
|
||||
# Default-Start: 345 3 4 5
|
||||
# Default-Stop: 345 3 4 5
|
||||
# Default-Start: 3 4 5
|
||||
# Default-Stop: 3 4 5
|
||||
# Description: E-MailRelay SMTP proxy and store-and-forward MTA.
|
||||
### END INIT INFO
|
||||
##
|
||||
|
||||
# choose an infrastructure style
|
||||
#
|
||||
if test -f /etc/rc.status
|
||||
then
|
||||
style="suse"
|
||||
. /etc/rc.status
|
||||
elif test -f /etc/init.d/functions
|
||||
then
|
||||
style="redhat"
|
||||
. /etc/init.d/functions
|
||||
elif test -f /lib/lsb/init-functions
|
||||
if test -f /lib/lsb/init-functions
|
||||
then
|
||||
style="lsb"
|
||||
. /lib/lsb/init-functions
|
||||
@ -164,99 +138,6 @@ unix_exit()
|
||||
|
||||
##
|
||||
|
||||
redhat_reset()
|
||||
{
|
||||
redhat_errno="0"
|
||||
}
|
||||
|
||||
redhat_cmd_start()
|
||||
{
|
||||
echo -n "${1}"
|
||||
shift
|
||||
initlog -q --cmd="$*"
|
||||
redhat_errno="$?"
|
||||
#touch /var/lock/subsys/emailrelay
|
||||
if test "${redhat_errno}" -eq 0 ; then success ; else failure ; fi
|
||||
echo
|
||||
}
|
||||
|
||||
redhat_cmd_stop()
|
||||
{
|
||||
echo -n "${1}"
|
||||
killproc "`basename ${emailrelay}`"
|
||||
redhat_errno="$?"
|
||||
#rm -f /var/lock/subsys/emailrelay
|
||||
if test "${redhat_errno}" -eq 0 ; then success ; else failure ; fi
|
||||
echo
|
||||
}
|
||||
|
||||
redhat_cmd_restarted()
|
||||
{
|
||||
redhat_errno="$?"
|
||||
}
|
||||
|
||||
redhat_cmd_status()
|
||||
{
|
||||
echo -n "${1}"
|
||||
|
||||
if test -f "${pid_file}" && test "`cat ${pid_file}`" != "" && kill -0 "`cat ${pid_file}`" 2>/dev/null
|
||||
then
|
||||
redhat_errno="0"
|
||||
elif test -f "${pid_file}"
|
||||
then
|
||||
redhat_errno="1"
|
||||
else
|
||||
redhat_errno="3"
|
||||
fi
|
||||
if test "${redhat_errno}" -eq 0 ; then success ; else failure ; fi
|
||||
}
|
||||
|
||||
redhat_exit()
|
||||
{
|
||||
exit "${redhat_errno}"
|
||||
}
|
||||
|
||||
##
|
||||
|
||||
suse_reset()
|
||||
{
|
||||
rc_reset
|
||||
}
|
||||
|
||||
suse_cmd_start()
|
||||
{
|
||||
echo -n "${1}"
|
||||
shift
|
||||
startproc "$@"
|
||||
rc_status -v
|
||||
}
|
||||
|
||||
suse_cmd_stop()
|
||||
{
|
||||
echo -n "${1}"
|
||||
killproc "${2}"
|
||||
rc_status -v
|
||||
}
|
||||
|
||||
suse_cmd_restarted()
|
||||
{
|
||||
rc_status
|
||||
}
|
||||
|
||||
suse_cmd_status()
|
||||
{
|
||||
echo -n "${1}"
|
||||
checkproc "${2}"
|
||||
rc_status -v
|
||||
}
|
||||
|
||||
suse_exit()
|
||||
{
|
||||
rc_exit
|
||||
}
|
||||
|
||||
##
|
||||
|
||||
lsb_reset()
|
||||
{
|
||||
lsb_errno="0"
|
||||
|
@ -2,11 +2,10 @@
|
||||
#
|
||||
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
#
|
||||
# This program 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 of the License, or (at your option) any later
|
||||
# version.
|
||||
# This program 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 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -14,9 +13,7 @@
|
||||
# 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
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# ===
|
||||
#
|
||||
# expand.sh
|
||||
|
@ -2,11 +2,10 @@
|
||||
#
|
||||
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
#
|
||||
# This program 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 of the License, or (at your option) any later
|
||||
# version.
|
||||
# This program 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 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -14,9 +13,7 @@
|
||||
# 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
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# ===
|
||||
#
|
||||
# mu2docbook.sh
|
||||
|
@ -2,11 +2,10 @@
|
||||
#
|
||||
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
#
|
||||
# This program 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 of the License, or (at your option) any later
|
||||
# version.
|
||||
# This program 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 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -14,9 +13,7 @@
|
||||
# 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
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# ===
|
||||
#
|
||||
# mu2html.sh
|
||||
|
@ -2,11 +2,10 @@
|
||||
#
|
||||
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
#
|
||||
# This program 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 of the License, or (at your option) any later
|
||||
# version.
|
||||
# This program 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 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -14,9 +13,7 @@
|
||||
# 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
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# ===
|
||||
#
|
||||
# txt2html.sh
|
||||
|
@ -2,11 +2,10 @@
|
||||
#
|
||||
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
#
|
||||
# This program 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 of the License, or (at your option) any later
|
||||
# version.
|
||||
# This program 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 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -14,9 +13,7 @@
|
||||
# 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
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# ===
|
||||
#
|
||||
# txt2mu.sh
|
||||
|
18
config.h.in
@ -1,31 +1,31 @@
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define if <ctime> requires <time.h> */
|
||||
/* Define to 1 if <ctime> requires <time.h> */
|
||||
#undef HAVE_BUGGY_CTIME
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#undef HAVE_DIRENT_H
|
||||
|
||||
/* Define if getipnodebyname() is available */
|
||||
/* Define to 1 if getipnodebyname() is available */
|
||||
#undef HAVE_GETIPNODEBYNAME
|
||||
|
||||
/* Define to 1 if you have the `glob' function. */
|
||||
#undef HAVE_GLOB
|
||||
|
||||
/* Define if gmtime_r in time.h */
|
||||
/* Define to 1 if gmtime_r in time.h */
|
||||
#undef HAVE_GMTIME_R
|
||||
|
||||
/* Define to enable gui code */
|
||||
/* Define to 1 to enable gui code */
|
||||
#undef HAVE_GUI
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define if ipv6 is available */
|
||||
/* Define to 1 if ipv6 is available */
|
||||
#undef HAVE_IPV6
|
||||
|
||||
/* Define if localtime_r in time.h */
|
||||
/* Define to 1 if localtime_r in time.h */
|
||||
#undef HAVE_LOCALTIME_R
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
@ -34,13 +34,13 @@
|
||||
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||
#undef HAVE_NDIR_H
|
||||
|
||||
/* Define if setgroups is available */
|
||||
/* Define to 1 if setgroups is available */
|
||||
#undef HAVE_SETGROUPS
|
||||
|
||||
/* Define if sockaddr_in6 has a sin6_len member */
|
||||
/* Define to 1 if sockaddr_in6 has a sin6_len member */
|
||||
#undef HAVE_SIN6_LEN
|
||||
|
||||
/* Define if socklen_t type definition in sys/socket.h */
|
||||
/* Define to 1 if socklen_t type definition in sys/socket.h */
|
||||
#undef HAVE_SOCKLEN_T
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
|
48
configure
vendored
@ -708,7 +708,6 @@ COMPILER_VERSION
|
||||
CPP
|
||||
EGREP
|
||||
PKG_CONFIG
|
||||
POPLIB
|
||||
IP
|
||||
QT_CFLAGS
|
||||
QT_LIBS
|
||||
@ -719,6 +718,8 @@ e_docdir
|
||||
e_initdir
|
||||
e_spooldir
|
||||
e_examplesdir
|
||||
e_libexecdir
|
||||
e_sysconfdir
|
||||
e_qtmoc
|
||||
LIBOBJS
|
||||
LTLIBOBJS'
|
||||
@ -1317,7 +1318,6 @@ Optional Features:
|
||||
--enable-dependency-tracking do not reject slow dependency extractors
|
||||
--enable-debug enable extra debug messages at compile-time (default
|
||||
disabled)
|
||||
--enable-pop enable pop server code (default enabled)
|
||||
--enable-ipv6 enable ipv6 (default disabled)
|
||||
--enable-gui enable configuration gui (requires Qt4) (default
|
||||
auto)
|
||||
@ -2108,7 +2108,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE=emailrelay
|
||||
VERSION=1.5
|
||||
VERSION=1.6
|
||||
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
@ -6656,21 +6656,6 @@ _ACEOF
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --enable-pop was given.
|
||||
if test "${enable_pop+set}" = set; then
|
||||
enableval=$enable_pop;
|
||||
fi
|
||||
|
||||
|
||||
if test "$enable_pop" = "no"
|
||||
then
|
||||
POPLIB="libgnopop.a"
|
||||
else
|
||||
POPLIB="libgpop.a"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --enable-ipv6 was given.
|
||||
if test "${enable_ipv6+set}" = set; then
|
||||
enableval=$enable_ipv6;
|
||||
@ -6927,13 +6912,18 @@ if test "${enable_fhs+set}" = set; then
|
||||
fi
|
||||
|
||||
|
||||
if test "$e_docdir" = "" ; then e_docdir="$docdir" ; fi
|
||||
if test "$e_docdir" = "" ; then e_docdir="$datadir/$PACKAGE/doc" ; fi
|
||||
|
||||
if test "$e_initdir" = "" ; then e_initdir="$libexecdir" ; fi
|
||||
if test "$e_initdir" = "" ; then e_initdir="$libexecdir/$PACKAGE/init" ; fi
|
||||
|
||||
if test "$e_spooldir" = "" ; then e_spooldir="$localstatedir/spool/emailrelay" ; fi
|
||||
if test "$e_spooldir" = "" ; then e_spooldir="$localstatedir/spool/$PACKAGE" ; fi
|
||||
|
||||
if test "$e_examplesdir" = "" ; then e_examplesdir="$libexecdir" ; fi
|
||||
if test "$e_examplesdir" = "" ; then e_examplesdir="$libexecdir/$PACKAGE/examples" ; fi
|
||||
|
||||
if test "$e_libexecdir" = "" ; then e_libexecdir="$libexecdir/$PACKAGE" ; fi
|
||||
|
||||
if test "$e_sysconfdir" = "" ; then e_sysconfdir="$sysconfdir" ; fi
|
||||
|
||||
if test "$e_qtmoc" = "" ; then e_qtmoc="moc" ; fi
|
||||
|
||||
@ -6961,21 +6951,17 @@ then
|
||||
#infodir=
|
||||
#
|
||||
# emailrelay-specific
|
||||
e_sbindir="$sbindir"
|
||||
e_libexecdir="$libexecdir/$PACKAGE"
|
||||
e_docdir="$datadir/doc/$PACKAGE"
|
||||
e_initdir="/etc/init.d"
|
||||
e_spooldir="$localstatedir/spool/$PACKAGE"
|
||||
e_man1dir="$datadir/man/man1"
|
||||
e_examplesdir="$datadir/doc/$PACKAGE/examples"
|
||||
e_examplesdir="$libexecdir/$PACKAGE/examples"
|
||||
e_sysconfdir="$sysconfdir"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
SET_MAKE=""
|
||||
|
||||
ac_config_files="$ac_config_files Makefile src/Makefile src/glib/Makefile src/gnet/Makefile src/gsmtp/Makefile src/gpop/Makefile src/main/Makefile src/win32/Makefile src/gui/Makefile lib/Makefile lib/gcc2.95/Makefile lib/msvc6.0/Makefile lib/sunpro5/Makefile bin/Makefile doc/Makefile etc/Makefile"
|
||||
ac_config_files="$ac_config_files Makefile src/Makefile src/glib/Makefile src/gnet/Makefile src/gsmtp/Makefile src/gpop/Makefile src/main/Makefile src/win32/Makefile src/gui/Makefile lib/Makefile lib/gcc2.95/Makefile lib/msvc6.0/Makefile lib/sunpro5/Makefile bin/Makefile doc/Makefile etc/Makefile test/Makefile"
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
@ -7593,6 +7579,7 @@ do
|
||||
"bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;;
|
||||
"doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
|
||||
"etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;;
|
||||
"test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
|
||||
|
||||
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
|
||||
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
|
||||
@ -7750,8 +7737,8 @@ COMPILER_VERSION!$COMPILER_VERSION$ac_delim
|
||||
CPP!$CPP$ac_delim
|
||||
EGREP!$EGREP$ac_delim
|
||||
PKG_CONFIG!$PKG_CONFIG$ac_delim
|
||||
POPLIB!$POPLIB$ac_delim
|
||||
IP!$IP$ac_delim
|
||||
QT_CFLAGS!$QT_CFLAGS$ac_delim
|
||||
_ACEOF
|
||||
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
|
||||
@ -7793,7 +7780,6 @@ _ACEOF
|
||||
ac_delim='%!_!# '
|
||||
for ac_last_try in false false false false false :; do
|
||||
cat >conf$$subs.sed <<_ACEOF
|
||||
QT_CFLAGS!$QT_CFLAGS$ac_delim
|
||||
QT_LIBS!$QT_LIBS$ac_delim
|
||||
MOC!$MOC$ac_delim
|
||||
GUI_TRUE!$GUI_TRUE$ac_delim
|
||||
@ -7802,12 +7788,14 @@ e_docdir!$e_docdir$ac_delim
|
||||
e_initdir!$e_initdir$ac_delim
|
||||
e_spooldir!$e_spooldir$ac_delim
|
||||
e_examplesdir!$e_examplesdir$ac_delim
|
||||
e_libexecdir!$e_libexecdir$ac_delim
|
||||
e_sysconfdir!$e_sysconfdir$ac_delim
|
||||
e_qtmoc!$e_qtmoc$ac_delim
|
||||
LIBOBJS!$LIBOBJS$ac_delim
|
||||
LTLIBOBJS!$LTLIBOBJS$ac_delim
|
||||
_ACEOF
|
||||
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 12; then
|
||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 13; then
|
||||
break
|
||||
elif $ac_last_try; then
|
||||
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
|
||||
|
42
configure.ac
@ -1,10 +1,9 @@
|
||||
dnl Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
dnl
|
||||
dnl This program is free software; you can redistribute it and/or
|
||||
dnl modify it under the terms of the GNU General Public License
|
||||
dnl as published by the Free Software Foundation; either
|
||||
dnl version 2 of the License, or (at your option) any later
|
||||
dnl version.
|
||||
dnl This program is free software: you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation, either version 3 of the License, or
|
||||
dnl (at your option) any later version.
|
||||
dnl
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -12,16 +11,14 @@ dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with this program; if not, write to the Free Software
|
||||
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
dnl
|
||||
dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
dnl ===
|
||||
dnl
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl
|
||||
|
||||
AC_INIT(src/gsmtp/gsmtp.h)
|
||||
AM_INIT_AUTOMAKE(emailrelay,1.5)
|
||||
AM_INIT_AUTOMAKE(emailrelay,1.6)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
@ -80,12 +77,6 @@ dnl
|
||||
AC_ARG_ENABLE(debug,AC_HELP_STRING([--enable-debug],[enable extra debug messages at compile-time (default disabled)]))
|
||||
ENABLE_DEBUG
|
||||
|
||||
dnl ===
|
||||
dnl "--enable-pop"
|
||||
dnl
|
||||
AC_ARG_ENABLE(pop,AC_HELP_STRING([--enable-pop],[enable pop server code (default enabled)]))
|
||||
ENABLE_POP
|
||||
|
||||
dnl ===
|
||||
dnl "--enable-ipv6"
|
||||
dnl
|
||||
@ -119,27 +110,30 @@ WITH_MAN2HTML
|
||||
dnl ===
|
||||
dnl directory tweaking and "--enable-fhs" ...
|
||||
dnl
|
||||
dnl define e_ prefixed variables with a gnu feel and then
|
||||
dnl use the enable_fhs macro tweak them for fhs
|
||||
dnl
|
||||
dnl not AC_PREFIX_DEFAULT([/usr])
|
||||
AC_ARG_ENABLE(fhs,AC_HELP_STRING([--enable-fhs],[force FHS-compliant directories, ignoring --prefix etc (default disabled)]))
|
||||
AC_SUBST(e_docdir)
|
||||
if test "$e_docdir" = "" ; then e_docdir="$docdir" ; fi
|
||||
if test "$e_docdir" = "" ; then e_docdir="$datadir/$PACKAGE/doc" ; fi
|
||||
AC_SUBST(e_initdir)
|
||||
if test "$e_initdir" = "" ; then e_initdir="$libexecdir" ; fi
|
||||
if test "$e_initdir" = "" ; then e_initdir="$libexecdir/$PACKAGE/init" ; fi
|
||||
AC_SUBST(e_spooldir)
|
||||
if test "$e_spooldir" = "" ; then e_spooldir="$localstatedir/spool/emailrelay" ; fi
|
||||
if test "$e_spooldir" = "" ; then e_spooldir="$localstatedir/spool/$PACKAGE" ; fi
|
||||
AC_SUBST(e_examplesdir)
|
||||
if test "$e_examplesdir" = "" ; then e_examplesdir="$libexecdir" ; fi
|
||||
if test "$e_examplesdir" = "" ; then e_examplesdir="$libexecdir/$PACKAGE/examples" ; fi
|
||||
AC_SUBST(e_libexecdir)
|
||||
if test "$e_libexecdir" = "" ; then e_libexecdir="$libexecdir/$PACKAGE" ; fi
|
||||
AC_SUBST(e_sysconfdir)
|
||||
if test "$e_sysconfdir" = "" ; then e_sysconfdir="$sysconfdir" ; fi
|
||||
AC_SUBST(e_qtmoc)
|
||||
if test "$e_qtmoc" = "" ; then e_qtmoc="moc" ; fi
|
||||
ENABLE_FHS
|
||||
|
||||
dnl ===
|
||||
dnl attempt to fix recursive makes where make is gmake -- may break something else
|
||||
dnl
|
||||
SET_MAKE=""
|
||||
|
||||
dnl ===
|
||||
dnl generate files...
|
||||
dnl
|
||||
AC_OUTPUT(Makefile src/Makefile src/glib/Makefile src/gnet/Makefile src/gsmtp/Makefile src/gpop/Makefile src/main/Makefile src/win32/Makefile src/gui/Makefile lib/Makefile lib/gcc2.95/Makefile lib/msvc6.0/Makefile lib/sunpro5/Makefile bin/Makefile doc/Makefile etc/Makefile)
|
||||
AC_OUTPUT(Makefile src/Makefile src/glib/Makefile src/gnet/Makefile src/gsmtp/Makefile src/gpop/Makefile src/main/Makefile src/win32/Makefile src/gui/Makefile lib/Makefile lib/gcc2.95/Makefile lib/msvc6.0/Makefile lib/sunpro5/Makefile bin/Makefile doc/Makefile etc/Makefile test/Makefile)
|
||||
|
||||
|
@ -1,11 +1,10 @@
|
||||
#
|
||||
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
##
|
||||
## This program 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 of the License, or (at your option) any later
|
||||
## version.
|
||||
## This program 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 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
## 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
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
##
|
||||
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
stylesheet=emailrelay.css
|
||||
@ -26,7 +23,7 @@ html_files_in=doxygen_header.html
|
||||
html_files_thru=index.html emailrelay-man.html $(stylesheet)
|
||||
html_files_out=readme.html developer.html reference.html userguide.html windows.html changelog.html
|
||||
docbook_files_out=emailrelay.docbook
|
||||
png_files=gsmtp-classes.png gnet-classes.png sequence-1.png sequence-2.png sequence-3.png sequence-4.png gnet-client.png gsmtp-serverprotocol.png gsmtp-scannerclient.png auth.png
|
||||
png_files=gsmtp-classes.png gnet-classes.png sequence-3.png gnet-client.png gsmtp-serverprotocol.png auth.png
|
||||
|
||||
EXTRA_DIST = $(man_files_in) $(txt_files) $(html_files_in) $(html_files_thru) $(png_files)
|
||||
noinst_SCRIPTS = .dox .docbook
|
||||
@ -37,15 +34,10 @@ CLEANFILES = $(noinst_SCRIPTS) $(man_files_out) $(html_files_out) $(docbook_file
|
||||
SUFFIXES = .txt .html .db .mu
|
||||
|
||||
converter_html=$(top_builddir)/bin/txt2html.sh
|
||||
converter_html_src=$(top_srcdir)/bin/txt2html.sh_
|
||||
converter_txt2mu=$(top_builddir)/bin/txt2mu.sh
|
||||
converter_txt2mu_src=$(top_srcdir)/bin/txt2mu.sh_
|
||||
converter_mu2html=$(top_builddir)/bin/mu2html.sh
|
||||
converter_mu2html_src=$(top_srcdir)/bin/mu2html.sh_
|
||||
converter_expand=$(top_builddir)/bin/expand.sh
|
||||
converter_expand_src=$(top_srcdir)/bin/expand.sh_
|
||||
converter_mu2docbook=$(top_builddir)/bin/mu2docbook.sh
|
||||
converter_mu2docbook_src=$(top_srcdir)/bin/mu2docbook.sh_
|
||||
|
||||
.txt.html:
|
||||
$(converter_html) -a "$(AWK)" $(top_srcdir)/doc/$*.txt $(stylesheet) > $*.html
|
||||
@ -56,15 +48,11 @@ converter_mu2docbook_src=$(top_srcdir)/bin/mu2docbook.sh_
|
||||
.mu.db:
|
||||
$(converter_mu2docbook) -a "$(AWK)" -x < $(top_builddir)/doc/$*.mu > $*.db
|
||||
|
||||
$(converter_html): $(converter_html_src) $(converter_txt2mu) $(converter_mu2html) $(converter_expand)
|
||||
cp $(converter_html_src) $(converter_html)
|
||||
chmod ugo+x $(converter_html)
|
||||
|
||||
head.db: $(converter_mu2docbook)
|
||||
$(converter_mu2docbook) --head "E-MailRelay" > head.db.tmp && mv -f head.db.tmp head.db
|
||||
$(converter_mu2docbook) -a "$(AWK)" --head "E-MailRelay" > head.db.tmp && mv -f head.db.tmp head.db
|
||||
|
||||
tail.db: $(converter_mu2docbook)
|
||||
$(converter_mu2docbook) --tail > tail.db.tmp && mv -f tail.db.tmp tail.db
|
||||
$(converter_mu2docbook) -a "$(AWK)" --tail > tail.db.tmp && mv -f tail.db.tmp tail.db
|
||||
|
||||
emailrelay.docbook: head.db tail.db userguide.db reference.db developer.db
|
||||
cat head.db userguide.db reference.db developer.db tail.db > emailrelay.docbook
|
||||
@ -72,31 +60,11 @@ emailrelay.docbook: head.db tail.db userguide.db reference.db developer.db
|
||||
.docbook: emailrelay.docbook
|
||||
-xmlto -o docbook html emailrelay.docbook && touch .docbook && cp *.png docbook/
|
||||
|
||||
$(converter_docbook): $(converter_docbook_src) $(converter_mu2docbook)
|
||||
cp $(converter_docbook_src) $(converter_db)
|
||||
chmod ugo+x $(converter_docbook)
|
||||
|
||||
$(converter_txt2mu): $(converter_txt2mu_src)
|
||||
cp $(converter_txt2mu_src) $(converter_txt2mu)
|
||||
chmod ugo+x $(converter_txt2mu)
|
||||
|
||||
$(converter_mu2html): $(converter_mu2html_src)
|
||||
cp $(converter_mu2html_src) $(converter_mu2html)
|
||||
chmod ugo+x $(converter_mu2html)
|
||||
|
||||
$(converter_expand): $(converter_expand_src)
|
||||
cp $(converter_expand_src) $(converter_expand)
|
||||
chmod ugo+x $(converter_expand)
|
||||
|
||||
$(converter_mu2docbook): $(converter_mu2docbook_src)
|
||||
cp $(converter_mu2docbook_src) $(converter_mu2docbook)
|
||||
chmod ugo+x $(converter_mu2docbook)
|
||||
|
||||
.dox:
|
||||
if test "$(HAVE_DOXYGEN)" = "yes" ; then cat $(top_srcdir)/src/main/doxygen.cfg | sed "s:__TOP_SRC__:$(top_srcdir):g" | sed "s:__TOP_BUILD__:$(top_builddir):g" | doxygen - && touch .dox ; else echo no doxygen ; fi
|
||||
|
||||
emailrelay-man.html: emailrelay.1
|
||||
if test "$(HAVE_MAN2HTML)" = "yes" ; then man2html emailrelay.1 < /dev/null > emailrelay-man.html.tmp && mv emailrelay-man.html.tmp emailrelay-man.html ; fi
|
||||
if test "$(HAVE_MAN2HTML)" = "yes" ; then man2html -r -L. emailrelay.1 < /dev/null > emailrelay-man.html.tmp && mv emailrelay-man.html.tmp emailrelay-man.html ; grep -v '^Content-type:' < emailrelay-man.html > emailrelay-man.html.tmp && mv emailrelay-man.html.tmp emailrelay-man.html ; fi
|
||||
|
||||
developer.html reference.html userguide.html: $(converter_html)
|
||||
|
||||
|
@ -112,7 +112,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
POPLIB = @POPLIB@
|
||||
QT_CFLAGS = @QT_CFLAGS@
|
||||
QT_LIBS = @QT_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
@ -141,8 +140,10 @@ dvidir = @dvidir@
|
||||
e_docdir = @e_docdir@
|
||||
e_examplesdir = @e_examplesdir@
|
||||
e_initdir = @e_initdir@
|
||||
e_libexecdir = @e_libexecdir@
|
||||
e_qtmoc = @e_qtmoc@
|
||||
e_spooldir = @e_spooldir@
|
||||
e_sysconfdir = @e_sysconfdir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
@ -175,7 +176,7 @@ html_files_in = doxygen_header.html
|
||||
html_files_thru = index.html emailrelay-man.html $(stylesheet)
|
||||
html_files_out = readme.html developer.html reference.html userguide.html windows.html changelog.html
|
||||
docbook_files_out = emailrelay.docbook
|
||||
png_files = gsmtp-classes.png gnet-classes.png sequence-1.png sequence-2.png sequence-3.png sequence-4.png gnet-client.png gsmtp-serverprotocol.png gsmtp-scannerclient.png auth.png
|
||||
png_files = gsmtp-classes.png gnet-classes.png sequence-3.png gnet-client.png gsmtp-serverprotocol.png auth.png
|
||||
EXTRA_DIST = $(man_files_in) $(txt_files) $(html_files_in) $(html_files_thru) $(png_files)
|
||||
noinst_SCRIPTS = .dox .docbook
|
||||
man1_MANS = $(man_files_in)
|
||||
@ -183,15 +184,10 @@ e_doc_DATA = $(txt_files) $(html_files_out) $(html_files_thru) $(png_files) $(do
|
||||
CLEANFILES = $(noinst_SCRIPTS) $(man_files_out) $(html_files_out) $(docbook_files_out) doxygen/* *.db *.mu docbook/*
|
||||
SUFFIXES = .txt .html .db .mu
|
||||
converter_html = $(top_builddir)/bin/txt2html.sh
|
||||
converter_html_src = $(top_srcdir)/bin/txt2html.sh_
|
||||
converter_txt2mu = $(top_builddir)/bin/txt2mu.sh
|
||||
converter_txt2mu_src = $(top_srcdir)/bin/txt2mu.sh_
|
||||
converter_mu2html = $(top_builddir)/bin/mu2html.sh
|
||||
converter_mu2html_src = $(top_srcdir)/bin/mu2html.sh_
|
||||
converter_expand = $(top_builddir)/bin/expand.sh
|
||||
converter_expand_src = $(top_srcdir)/bin/expand.sh_
|
||||
converter_mu2docbook = $(top_builddir)/bin/mu2docbook.sh
|
||||
converter_mu2docbook_src = $(top_srcdir)/bin/mu2docbook.sh_
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
@ -433,15 +429,11 @@ uninstall-man: uninstall-man1
|
||||
.mu.db:
|
||||
$(converter_mu2docbook) -a "$(AWK)" -x < $(top_builddir)/doc/$*.mu > $*.db
|
||||
|
||||
$(converter_html): $(converter_html_src) $(converter_txt2mu) $(converter_mu2html) $(converter_expand)
|
||||
cp $(converter_html_src) $(converter_html)
|
||||
chmod ugo+x $(converter_html)
|
||||
|
||||
head.db: $(converter_mu2docbook)
|
||||
$(converter_mu2docbook) --head "E-MailRelay" > head.db.tmp && mv -f head.db.tmp head.db
|
||||
$(converter_mu2docbook) -a "$(AWK)" --head "E-MailRelay" > head.db.tmp && mv -f head.db.tmp head.db
|
||||
|
||||
tail.db: $(converter_mu2docbook)
|
||||
$(converter_mu2docbook) --tail > tail.db.tmp && mv -f tail.db.tmp tail.db
|
||||
$(converter_mu2docbook) -a "$(AWK)" --tail > tail.db.tmp && mv -f tail.db.tmp tail.db
|
||||
|
||||
emailrelay.docbook: head.db tail.db userguide.db reference.db developer.db
|
||||
cat head.db userguide.db reference.db developer.db tail.db > emailrelay.docbook
|
||||
@ -449,31 +441,11 @@ emailrelay.docbook: head.db tail.db userguide.db reference.db developer.db
|
||||
.docbook: emailrelay.docbook
|
||||
-xmlto -o docbook html emailrelay.docbook && touch .docbook && cp *.png docbook/
|
||||
|
||||
$(converter_docbook): $(converter_docbook_src) $(converter_mu2docbook)
|
||||
cp $(converter_docbook_src) $(converter_db)
|
||||
chmod ugo+x $(converter_docbook)
|
||||
|
||||
$(converter_txt2mu): $(converter_txt2mu_src)
|
||||
cp $(converter_txt2mu_src) $(converter_txt2mu)
|
||||
chmod ugo+x $(converter_txt2mu)
|
||||
|
||||
$(converter_mu2html): $(converter_mu2html_src)
|
||||
cp $(converter_mu2html_src) $(converter_mu2html)
|
||||
chmod ugo+x $(converter_mu2html)
|
||||
|
||||
$(converter_expand): $(converter_expand_src)
|
||||
cp $(converter_expand_src) $(converter_expand)
|
||||
chmod ugo+x $(converter_expand)
|
||||
|
||||
$(converter_mu2docbook): $(converter_mu2docbook_src)
|
||||
cp $(converter_mu2docbook_src) $(converter_mu2docbook)
|
||||
chmod ugo+x $(converter_mu2docbook)
|
||||
|
||||
.dox:
|
||||
if test "$(HAVE_DOXYGEN)" = "yes" ; then cat $(top_srcdir)/src/main/doxygen.cfg | sed "s:__TOP_SRC__:$(top_srcdir):g" | sed "s:__TOP_BUILD__:$(top_builddir):g" | doxygen - && touch .dox ; else echo no doxygen ; fi
|
||||
|
||||
emailrelay-man.html: emailrelay.1
|
||||
if test "$(HAVE_MAN2HTML)" = "yes" ; then man2html emailrelay.1 < /dev/null > emailrelay-man.html.tmp && mv emailrelay-man.html.tmp emailrelay-man.html ; fi
|
||||
if test "$(HAVE_MAN2HTML)" = "yes" ; then man2html -r -L. emailrelay.1 < /dev/null > emailrelay-man.html.tmp && mv emailrelay-man.html.tmp emailrelay-man.html ; grep -v '^Content-type:' < emailrelay-man.html > emailrelay-man.html.tmp && mv emailrelay-man.html.tmp emailrelay-man.html ; fi
|
||||
|
||||
developer.html reference.html userguide.html: $(converter_html)
|
||||
|
||||
|
BIN
doc/auth.png
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 7.3 KiB |
@ -3,40 +3,18 @@ E-MailRelay Internals
|
||||
|
||||
Module structure
|
||||
----------------
|
||||
There are four C++ libraries in the E-MailRelay code: "glib" provides low-level
|
||||
classes for file-system abstraction, date and time representation, string
|
||||
utility functions, logging, command line parsing etc., "gnet" provides network
|
||||
classes using the Berkley socket and Winsock APIs, "gsmtp" contains SMTP and
|
||||
message-store classes, and "gpop" contains POP3 classes. All four libraries are
|
||||
portable between POSIX-like systems (eg. Linux) and Windows.
|
||||
There are four main C++ libraries in the E-MailRelay code: "glib" provides
|
||||
low-level classes for file-system abstraction, date and time representation,
|
||||
string utility functions, logging, command line parsing etc., "gnet" provides
|
||||
network classes using the Berkley socket and Winsock APIs, "gsmtp" contains SMTP
|
||||
and message-store classes, and "gpop" contains POP3 classes. All four libraries
|
||||
are portable between POSIX-like systems (eg. Linux) and Windows.
|
||||
|
||||
Under Windows there is an additional library for event handling. Windows has
|
||||
historically built network event processing on top of the GUI event system,
|
||||
rather then implementing network events using a generic event notification
|
||||
system as POSIX systems do. This means that the "gnet" library has to be able
|
||||
to create GUI windows in order to process network events. The extra GUI and
|
||||
event classes are put into a separate library in the "src/win32" directory,
|
||||
using the namespace "GGui".
|
||||
|
||||
Class structure
|
||||
---------------
|
||||
The message-store functionality uses three abstract interfaces: "MessageStore",
|
||||
"NewMessage" and "StoredMessage". The "NewMessage" interface is used to create
|
||||
messages within the store, and the "StoredMessage" interface is used for
|
||||
reading and extracting messages from the store. The concrete implementation
|
||||
classes based on these interfaces are respectively "FileStore", "NewFile" and
|
||||
"StoredFile".
|
||||
|
||||
The interaction between the server protocol class and the message store is
|
||||
mediated by the "ProtocolMessage" interface. Two main implementations of this
|
||||
interface are supplied: one for normal spooling ("ProtocolMessageStore"), and
|
||||
another for immediate forwarding ("ProtocolMessageForward").
|
||||
|
||||
The protocol and message-store functionality are brought together by the
|
||||
high-level "GSmtp::Server" and "GSmtp::Client" classes.
|
||||
|
||||
Simplified class diagrams for the *GNet* [gnet-classes.png] and
|
||||
*GSmtp* [gsmtp-classes.png] namespaces are available.
|
||||
historically built network event processing on top of the GUI event system which
|
||||
means that the "gnet" library has to be able to create GUI windows in order to
|
||||
process network events. The extra GUI and event classes are put into a separate
|
||||
library in the "src/win32" directory, using the namespace "GGui".
|
||||
|
||||
Event model
|
||||
-----------
|
||||
@ -48,15 +26,88 @@ when external programs are executed (see "--filter" and "--verifier").
|
||||
See *C10K Problem* [http://www.kegel.com/c10k.html] for a discussion of
|
||||
different network event models.
|
||||
|
||||
At higher levels the slot/signal design pattern is used to propagate events
|
||||
between objects (not to be confused with operating system signals).
|
||||
At higher levels the C++ slot/signal design pattern is used to propagate events
|
||||
between objects (not to be confused with operating system signals). The
|
||||
slot/signal implementation has been simplified compared to Qt or boost by not
|
||||
supporting signal multicasting, so each signal connects to no more than one
|
||||
slot. For historical reasons the slot/signal pattern is not used in the lowest
|
||||
layers of the network library.
|
||||
|
||||
Protocol implementation
|
||||
-----------------------
|
||||
The SMTP protocols (client-side and server-side) are implemented using state
|
||||
machines. This fits well with the single-threaded, non-blocking event model
|
||||
since the protocol state can be stored as data within an object rather than
|
||||
being implicit in the progress of a thread's execution.
|
||||
Event handling and exceptions
|
||||
-----------------------------
|
||||
The use of non-blocking i/o in the network library means that most processing
|
||||
operates within the context of an i/o event or timeout callback so the top level
|
||||
of the call stack is nearly always the event loop code. This can make using C++
|
||||
exceptions a bit awkward compared to a multi-threaded approach because it is not
|
||||
possible to put a single catch block around a particular high-level feature.
|
||||
|
||||
The event loop delivers all asynchronous events to the abstract "EventHandler"
|
||||
and "AbstractTimer" interfaces. If these callbacks throw exceptions then the
|
||||
event loop will catch them and deliver them back to the same interface through
|
||||
the virtual functions onException() and onTimerException() respectively. If
|
||||
exceptions are thrown out of _these_ callbacks then the event loop code lets
|
||||
them propagate back to main(), typically terminating the program.
|
||||
|
||||
The two callback interfaces are brought together by having a concrete "Timer"
|
||||
class that requires an "EventHandler" object to be associated with each timer.
|
||||
The "Timer" class routes any exceptions thrown out of the timeout callback to
|
||||
the designated "EventHandler" interface so that both i/o and timeout exceptions
|
||||
are delivered to the same place.
|
||||
|
||||
In common with other event-driven frameworks this leads to a programming
|
||||
model where objects are instantiated on the heap and the objects delete
|
||||
themselves when they receive certain events from the framework. In the
|
||||
"gnet" library the "ServerPeer" and "HeapClient" classes do this lifetime
|
||||
management; instances of these classes delete themselves when the associated
|
||||
network connection goes away or when an exception is thrown out their
|
||||
event-handling code.
|
||||
|
||||
Core class structure
|
||||
--------------------
|
||||
The message-store functionality uses three abstract interfaces: "MessageStore",
|
||||
"NewMessage" and "StoredMessage". The "NewMessage" interface is used to create
|
||||
messages within the store, and the "StoredMessage" interface is used for
|
||||
reading and extracting messages from the store. The concrete implementation
|
||||
classes based on these interfaces are respectively "FileStore", "NewFile" and
|
||||
"StoredFile".
|
||||
|
||||
Protocol classes such as "GSmtp::ServerProtocol" receive network and timer
|
||||
events from their container and use an abstract "Sender" interface to send
|
||||
network data. This means that the protocols can be largely independent of the
|
||||
network and event loop framework.
|
||||
|
||||
The interaction between the SMTP server protocol class and the message store is
|
||||
mediated by the "ProtocolMessage" interface. Two main implementations of this
|
||||
interface are available: one for normal spooling ("ProtocolMessageStore"), and
|
||||
another for immediate forwarding ("ProtocolMessageForward"). The "Decorator"
|
||||
pattern is used whereby the forwarding class uses an instance of the storage
|
||||
class to do the message storing and pre-processing, while adding in an instance
|
||||
of the "GSmtp::Client" class to do the forwarding.
|
||||
|
||||
Message pre-processing (see "--filter") is implemented via an abstract
|
||||
"Processor" interface. Concrete implementations are provided for doing nothing,
|
||||
running an external executable program and talking to an external network server.
|
||||
|
||||
The protocol, processor and message-store interfaces are brought together by the
|
||||
high-level "GSmtp::Server" and "GSmtp::Client" classes. Dependency injection is
|
||||
used to create the concrete instances of the "ProtocolMessage" and "Processor"
|
||||
interfaces.
|
||||
|
||||
Simplified class diagrams for the *GNet* [gnet-classes.png] and
|
||||
*GSmtp* [gsmtp-classes.png] namespaces are available.
|
||||
|
||||
Windows service
|
||||
---------------
|
||||
To get E-MailRelay to run as a Windows service there is a service wrapper
|
||||
program called "emailrelay-service.exe". This program registers itself as
|
||||
a service when run with the "--install" commandline switch. When the service
|
||||
runs the wrapper starts the actual E-MailRelay server by looking for a batch
|
||||
file called "emailrelay-start.bat" in the same directory as service wrapper
|
||||
executable. It reads the contents of this batch file in order to construct the
|
||||
E-MailRelay command-line, adding "--no-daemon" and "--hidden" switches if they
|
||||
are not there already. The service name and display name can be put onto the
|
||||
wrapper's "--install" command-line, and it is the service name that is used to
|
||||
derive the name of the "start" batch file.
|
||||
|
||||
Diagrams
|
||||
--------
|
||||
@ -67,13 +118,9 @@ Class diagrams:
|
||||
State transition diagrams:
|
||||
* *GNet::Client* [gnet-client.png]
|
||||
* *GSmtp::ServerProtocol* [gsmtp-serverprotocol.png]
|
||||
* *GSmtp::ScannerClient* [gsmtp-scannerclient.png]
|
||||
|
||||
Sequence diagrams:
|
||||
* *Proxy mode forwarding* [sequence-3.png]
|
||||
* *Scanning* [sequence-4.png]
|
||||
* ProtocolMessage::prepare() *returns false* [sequence-1.png]
|
||||
* ProtocolMessage::prepare() *returns true* [sequence-2.png]
|
||||
|
||||
Directory structure
|
||||
-------------------
|
||||
@ -107,17 +154,17 @@ Directory structure
|
||||
|
||||
Application-level classes for E-MailRelay.
|
||||
|
||||
# src/gui
|
||||
|
||||
Installation and configuration GUI program using Qt 4.
|
||||
|
||||
# lib
|
||||
|
||||
Parent directory for ANSI C++ fixes
|
||||
Parent directory for ISO C++ fixups for various compilers.
|
||||
|
||||
# lib/gcc2.95
|
||||
# test
|
||||
|
||||
Standard headers which are missing in gcc2.95
|
||||
|
||||
# lib/msvc6.0
|
||||
|
||||
Standard headers which are missing (or broken) in msvc6.0
|
||||
Test scripts and utilities.
|
||||
|
||||
Portability
|
||||
-----------
|
||||
@ -129,14 +176,12 @@ to be used to fix up compiler portability issues such as missing standard types,
|
||||
non-standard system headers etc. Conditional compilation directives ("#if"
|
||||
etc.) are largely confined to these headers in order to improve readability.
|
||||
|
||||
Deficiencies in the ISO standard headers files provided by the compiler are
|
||||
fixed up by files in the "lib" directory tree. For example, the msvc6.0 compiler
|
||||
Deficiencies in the standard headers files provided by older compilers are fixed
|
||||
up by files in the "lib" directory tree. For example, the msvc6.0 compiler
|
||||
sometimes does not put its names into the "std" namespace, even though the
|
||||
std-namespace headers are used. This can be worked round by additional "using"
|
||||
declarations in the "lib/msvc6.0" headers. These work-rounds are kept out of
|
||||
the "src" tree because they are likely to be fixed in later compiler releases.
|
||||
Standards-compliant compilers should not need to include any headers from the
|
||||
"lib" directory tree.
|
||||
the "src" tree because they are not necessary for more modern compilers.
|
||||
|
||||
Windows/unix portability is generally addressed by providing a common class
|
||||
declaration with two implementations. Where necessary a "pimple" pattern is used
|
||||
@ -163,16 +208,6 @@ Compile-time features can normally be selected with switches passed to the
|
||||
|
||||
Use "./configure --help" to see a complete list.
|
||||
|
||||
Windows build
|
||||
-------------
|
||||
Simple MSVC project files are provided in the "src/main" directory, bundled into
|
||||
the "emailrelay.dws" workspace.
|
||||
|
||||
Makefiles for the *MinGW* [http://www.mingw.org/] system (gcc on Windows) are
|
||||
also provided. If building from cygwin start by creating a "/mingw" mount to
|
||||
your MinGW installation directory (eg. "mount -u c:/opt/mingw /mingw"), and then
|
||||
run "make -f mingw.mak" from the E-MailRelay "src" directory.
|
||||
|
||||
Patterns
|
||||
--------
|
||||
Gang-of-four Design Patterns (ISBN 0-201-63361-2):
|
||||
@ -194,13 +229,14 @@ Gang-of-four Design Patterns (ISBN 0-201-63361-2):
|
||||
- G::LogOutput
|
||||
- GGui::ApplicationInstance
|
||||
- GNet::EventLoop
|
||||
- GNet::TimerList
|
||||
|
||||
+ Facade
|
||||
|
||||
- G::File
|
||||
- GNet::Address
|
||||
|
||||
+ Adapter/Mediator
|
||||
+ Decorator
|
||||
|
||||
- GSmtp::ProtocolMessage
|
||||
|
||||
@ -252,8 +288,7 @@ Other patterns:
|
||||
Idioms
|
||||
------
|
||||
The "<<=" operator defined in "src/glib/gmemory.h" is used idiomatically
|
||||
to reassign a std::auto_ptr<>.
|
||||
|
||||
to reassign a std::auto_ptr<> since reset() is not always available.
|
||||
|
||||
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
Content-type: text/html
|
||||
|
||||
<HTML><HEAD><TITLE>Manpage of EMAILRELAY</TITLE>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<HTML><HEAD><TITLE>Man page of EMAILRELAY</TITLE>
|
||||
</HEAD><BODY>
|
||||
<H1>EMAILRELAY</H1>
|
||||
Section: User Commands (1)<BR>Updated: local<BR><A HREF="#index">Index</A>
|
||||
<A HREF="http://localhost/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
||||
<A HREF="../index.html">Return to Main Contents</A><HR>
|
||||
|
||||
<A NAME="lbAB"> </A>
|
||||
<H2>NAME</H2>
|
||||
@ -143,7 +143,7 @@ Displays help text and exits.
|
||||
<DT><B>-m, --immediate </B>
|
||||
|
||||
<DD>
|
||||
Enables immediating forwarding of messages as soon as they are received (requires <I>--forward-to</I>).
|
||||
Enables immediate forwarding of messages as soon as they are received (requires <I>--forward-to</I>).
|
||||
<DT><B>-I, --interface </B><I><ip-address></I>
|
||||
|
||||
<DD>
|
||||
@ -200,6 +200,10 @@ Specifies the pop listening port number (requires <I>--pop</I>).
|
||||
|
||||
<DD>
|
||||
Specifies the smtp listening port number.
|
||||
<DT><B>-w, --prompt-timeout </B><I><time></I>
|
||||
|
||||
<DD>
|
||||
Sets the timeout (in seconds) for getting an initial prompt from the server.
|
||||
<DT><B>-r, --remote-clients </B>
|
||||
|
||||
<DD>
|
||||
@ -208,10 +212,6 @@ Allows remote clients to connect.
|
||||
|
||||
<DD>
|
||||
Sets the response timeout (in seconds) when talking to a remote server (default is 1800).
|
||||
<DT><B>-R, --scanner </B><I><host:port></I>
|
||||
|
||||
<DD>
|
||||
Specifies an external network server to process messages when they are stored.
|
||||
<DT><B>-S, --server-auth </B><I><file></I>
|
||||
|
||||
<DD>
|
||||
@ -253,13 +253,16 @@ GNU style...
|
||||
/usr/local/etc/emailrelay.conf.template
|
||||
<BR>
|
||||
|
||||
/usr/local/libexec/emailrelay
|
||||
/usr/local/libexec/emailrelay/emailrelay-filter-copy
|
||||
<BR>
|
||||
|
||||
/usr/local/libexec/emailrelay-poke
|
||||
/usr/local/libexec/emailrelay/emailrelay-poke
|
||||
<BR>
|
||||
|
||||
/usr/local/libexec/emailrelay-*.sh
|
||||
/usr/local/libexec/emailrelay/examples/*
|
||||
<BR>
|
||||
|
||||
/usr/local/libexec/emailrelay/init/emailrelay
|
||||
<BR>
|
||||
|
||||
/usr/local/man/man1/emailrelay*.1.gz
|
||||
@ -301,7 +304,13 @@ FHS style...
|
||||
/etc/init.d/emailrelay
|
||||
<BR>
|
||||
|
||||
/usr/lib/emailrelay-poke
|
||||
/usr/lib/emailrelay/emailrelay-filter-copy
|
||||
<BR>
|
||||
|
||||
/usr/lib/emailrelay/emailrelay-poke
|
||||
<BR>
|
||||
|
||||
/usr/lib/emailrelay/examples/*
|
||||
<BR>
|
||||
|
||||
/usr/sbin/emailrelay
|
||||
@ -316,9 +325,6 @@ FHS style...
|
||||
/usr/share/doc/emailrelay/*
|
||||
<BR>
|
||||
|
||||
/usr/share/doc/emailrelay/examples/emailrelay-*.sh
|
||||
<BR>
|
||||
|
||||
/usr/share/doc/emailrelay/index.html
|
||||
<BR>
|
||||
|
||||
@ -335,23 +341,15 @@ FHS style...
|
||||
<A NAME="lbAG"> </A>
|
||||
<H2>SEE ALSO</H2>
|
||||
|
||||
E-MailRelay user guide, (<A HREF="http://emailrelay.sourceforge.net/user.html).">http://emailrelay.sourceforge.net/user.html).</A>
|
||||
E-MailRelay user guide, <A HREF="http://emailrelay.sourceforge.net/userguide.html">http://emailrelay.sourceforge.net/userguide.html</A> .
|
||||
<BR>
|
||||
|
||||
E-MailRelay reference, (<A HREF="http://emailrelay.sourceforge.net/reference.html).">http://emailrelay.sourceforge.net/reference.html).</A>
|
||||
E-MailRelay reference, <A HREF="http://emailrelay.sourceforge.net/reference.html">http://emailrelay.sourceforge.net/reference.html</A> .
|
||||
<BR>
|
||||
|
||||
<B><A HREF="http://localhost/cgi-bin/man/man2html?1+emailrelay-submit">emailrelay-submit</A></B>(1),
|
||||
<B><A HREF="../man1/emailrelay-submit.1.html">emailrelay-submit</A></B>(1),
|
||||
|
||||
<B><A HREF="http://localhost/cgi-bin/man/man2html?1+emailrelay-poke">emailrelay-poke</A></B>(1),
|
||||
|
||||
<B><A HREF="http://localhost/cgi-bin/man/man2html?1+emailrelay-passwd">emailrelay-passwd</A></B>(1),
|
||||
|
||||
<B><A HREF="http://localhost/cgi-bin/man/man2html?3+syslog">syslog</A></B>(3),
|
||||
|
||||
<B><A HREF="http://localhost/cgi-bin/man/man2html?8+pppd">pppd</A></B>(8),
|
||||
|
||||
<B><A HREF="http://localhost/cgi-bin/man/man2html?7+init.d">init.d</A></B>(7)
|
||||
<B><A HREF="../man1/emailrelay-passwd.1.html">emailrelay-passwd</A></B>(1),
|
||||
|
||||
<A NAME="lbAH"> </A>
|
||||
<H2>AUTHOR</H2>
|
||||
@ -372,9 +370,9 @@ Graeme Walker, mailto:<A HREF="mailto:graeme_walker@users.sourceforge.net">graem
|
||||
</DL>
|
||||
<HR>
|
||||
This document was created by
|
||||
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
|
||||
<A HREF="lynxcgi:FOO/cgi-bin/man/man2html">man2html</A>,
|
||||
using the manual pages.<BR>
|
||||
Time: 18:17:41 GMT, April 09, 2007
|
||||
Time: 16:32:15 GMT, August 27, 2007
|
||||
</BODY>
|
||||
</HTML>
|
||||
<!-- Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>. All rights reserved. -->
|
||||
|
@ -1,10 +1,9 @@
|
||||
.\" Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
.\"
|
||||
.\" This program 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 of the License, or (at your option) any later
|
||||
.\" version.
|
||||
.\" This program 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 3 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful,
|
||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -12,9 +11,7 @@
|
||||
.\" 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
|
||||
.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
.\"
|
||||
.\" along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
.TH EMAILRELAY-PASSWD 1 local
|
||||
.SH NAME
|
||||
emailrelay-passwd \- a password encoding utility for E-MailRelay
|
||||
|
@ -1,10 +1,9 @@
|
||||
.\" Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
.\"
|
||||
.\" This program 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 of the License, or (at your option) any later
|
||||
.\" version.
|
||||
.\" This program 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 3 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful,
|
||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -12,9 +11,7 @@
|
||||
.\" 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
|
||||
.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
.\"
|
||||
.\" along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
.TH EMAILRELAY-POKE 1 local
|
||||
.SH NAME
|
||||
emailrelay-poke \- forces an E-MailRelay server to deliver spooled mail
|
||||
|
@ -1,10 +1,9 @@
|
||||
.\" Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
.\"
|
||||
.\" This program 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 of the License, or (at your option) any later
|
||||
.\" version.
|
||||
.\" This program 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 3 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful,
|
||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -12,9 +11,7 @@
|
||||
.\" 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
|
||||
.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
.\"
|
||||
.\" along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
.TH EMAILRELAY-SUBMIT 1 local
|
||||
.SH NAME
|
||||
emailrelay-submit \- a submission utility for E-MailRelay
|
||||
|
@ -1,10 +1,9 @@
|
||||
.\" Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
.\"
|
||||
.\" This program 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 of the License, or (at your option) any later
|
||||
.\" version.
|
||||
.\" This program 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 3 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful,
|
||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -12,9 +11,7 @@
|
||||
.\" 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
|
||||
.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
.\"
|
||||
.\" along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
.TH EMAILRELAY 1 local
|
||||
.SH NAME
|
||||
emailrelay \- e-mail transfer agent and proxy
|
||||
@ -110,7 +107,7 @@ Specifies the remote smtp server (required by \fI--forward\fR, \fI--poll\fR, \fI
|
||||
Displays help text and exits.
|
||||
.TP
|
||||
.B \-m, --immediate
|
||||
Enables immediating forwarding of messages as soon as they are received (requires \fI--forward-to\fR).
|
||||
Enables immediate forwarding of messages as soon as they are received (requires \fI--forward-to\fR).
|
||||
.TP
|
||||
.B \-I, --interface \fI<ip-address>\fR
|
||||
Defines the listening interface for new connections.
|
||||
@ -154,15 +151,15 @@ Specifies the pop listening port number (requires \fI--pop\fR).
|
||||
.B \-p, --port \fI<port>\fR
|
||||
Specifies the smtp listening port number.
|
||||
.TP
|
||||
.B \-w, --prompt-timeout \fI<time>\fR
|
||||
Sets the timeout (in seconds) for getting an initial prompt from the server.
|
||||
.TP
|
||||
.B \-r, --remote-clients
|
||||
Allows remote clients to connect.
|
||||
.TP
|
||||
.B \-T, --response-timeout \fI<time>\fR
|
||||
Sets the response timeout (in seconds) when talking to a remote server (default is 1800).
|
||||
.TP
|
||||
.B \-R, --scanner \fI<host:port>\fR
|
||||
Specifies an external network server to process messages when they are stored.
|
||||
.TP
|
||||
.B \-S, --server-auth \fI<file>\fR
|
||||
Enables authentication of remote clients, using the given secrets file.
|
||||
.TP
|
||||
@ -190,11 +187,13 @@ GNU style...
|
||||
.br
|
||||
/usr/local/etc/emailrelay.conf.template
|
||||
.br
|
||||
/usr/local/libexec/emailrelay
|
||||
/usr/local/libexec/emailrelay/emailrelay-filter-copy
|
||||
.br
|
||||
/usr/local/libexec/emailrelay-poke
|
||||
/usr/local/libexec/emailrelay/emailrelay-poke
|
||||
.br
|
||||
/usr/local/libexec/emailrelay-*.sh
|
||||
/usr/local/libexec/emailrelay/examples/*
|
||||
.br
|
||||
/usr/local/libexec/emailrelay/init/emailrelay
|
||||
.br
|
||||
/usr/local/man/man1/emailrelay*.1.gz
|
||||
.br
|
||||
@ -222,7 +221,11 @@ FHS style...
|
||||
.br
|
||||
/etc/init.d/emailrelay
|
||||
.br
|
||||
/usr/lib/emailrelay-poke
|
||||
/usr/lib/emailrelay/emailrelay-filter-copy
|
||||
.br
|
||||
/usr/lib/emailrelay/emailrelay-poke
|
||||
.br
|
||||
/usr/lib/emailrelay/examples/*
|
||||
.br
|
||||
/usr/sbin/emailrelay
|
||||
.br
|
||||
@ -232,8 +235,6 @@ FHS style...
|
||||
.br
|
||||
/usr/share/doc/emailrelay/*
|
||||
.br
|
||||
/usr/share/doc/emailrelay/examples/emailrelay-*.sh
|
||||
.br
|
||||
/usr/share/doc/emailrelay/index.html
|
||||
.br
|
||||
/usr/share/doc/emailrelay/README
|
||||
@ -244,15 +245,11 @@ FHS style...
|
||||
.br
|
||||
/var/spool/emailrelay/emailrelay.*.envelope
|
||||
.SH SEE ALSO
|
||||
E-MailRelay user guide, (http://emailrelay.sourceforge.net/user.html).
|
||||
E-MailRelay user guide, http://emailrelay.sourceforge.net/userguide.html .
|
||||
.br
|
||||
E-MailRelay reference, (http://emailrelay.sourceforge.net/reference.html).
|
||||
E-MailRelay reference, http://emailrelay.sourceforge.net/reference.html .
|
||||
.br
|
||||
.BR emailrelay-submit (1),
|
||||
.BR emailrelay-poke (1),
|
||||
.BR emailrelay-passwd (1),
|
||||
.BR syslog (3),
|
||||
.BR pppd (8),
|
||||
.BR init.d (7)
|
||||
.SH AUTHOR
|
||||
Graeme Walker, mailto:graeme_walker@users.sourceforge.net
|
||||
|
@ -10,12 +10,13 @@ body
|
||||
padding: 0px ;
|
||||
}
|
||||
|
||||
div.two-column-header
|
||||
div.Header
|
||||
{
|
||||
background-color: #eee ;
|
||||
background-color: #ddd ;
|
||||
|
||||
padding-top: 10px ;
|
||||
border-bottom: 1px #999 solid ;
|
||||
height: 100px ;
|
||||
height: 80px ;
|
||||
width: 100% ;
|
||||
}
|
||||
|
||||
@ -25,30 +26,37 @@ h1
|
||||
color: #09c ;
|
||||
}
|
||||
|
||||
div.two-column-header h1
|
||||
div.Header h1
|
||||
{
|
||||
margin: 0px ;
|
||||
}
|
||||
|
||||
div.two-column-content
|
||||
div.Content
|
||||
{
|
||||
margin-left: 210px ; /* menu width + 40px */
|
||||
padding: 40px ;
|
||||
margin-left: 230px ;
|
||||
padding: 5px ;
|
||||
}
|
||||
|
||||
div.two-column-menu
|
||||
div.Menu
|
||||
{
|
||||
background-color: #eee ;
|
||||
background-color: #ddd ;
|
||||
|
||||
float: left ;
|
||||
width: 180px ;
|
||||
margin-left: 30px ;
|
||||
margin-top: 30px ;
|
||||
margin-left: 25px ;
|
||||
margin-right: 0px ;
|
||||
margin-top: 100px ;
|
||||
margin-bottom: 10px ;
|
||||
|
||||
border-style: solid ;
|
||||
border-style: dashed ;
|
||||
border-width: 1px ;
|
||||
border-color: #999 ;
|
||||
|
||||
padding: 3px ;
|
||||
}
|
||||
|
||||
div.Footer
|
||||
{
|
||||
}
|
||||
|
||||
div.div-main
|
||||
@ -59,32 +67,17 @@ div.div-main
|
||||
|
||||
div.div-toc
|
||||
{
|
||||
background-color: #eee ;
|
||||
}
|
||||
|
||||
p.p-toc
|
||||
{
|
||||
padding: 5px ;
|
||||
margin-top: 0px ;
|
||||
margin-bottom: 0px ;
|
||||
margin-left: 0.5em ;
|
||||
text-align: left ;
|
||||
background-color: #ddd ;
|
||||
}
|
||||
|
||||
div.div-pre
|
||||
{
|
||||
margin-left: 3% ;
|
||||
background-color: #eee ;
|
||||
background-color: #ddd ;
|
||||
padding: 0.5em ;
|
||||
border: none ;
|
||||
}
|
||||
|
||||
h1
|
||||
{
|
||||
text-align: center ;
|
||||
color: #09c ;
|
||||
}
|
||||
|
||||
img
|
||||
{
|
||||
border-width: 0px ;
|
||||
@ -109,17 +102,27 @@ h3.h3-toc
|
||||
margin: 0px ;
|
||||
padding: 0px ;
|
||||
width: 100% ;
|
||||
border-bottom: 1px #999 solid ;
|
||||
border-bottom: 1px #999 dashed ;
|
||||
text-decoration: none ;
|
||||
}
|
||||
|
||||
h3.h3-toc-last
|
||||
{
|
||||
display: block ;
|
||||
margin: 0px ;
|
||||
padding: 0px ;
|
||||
width: 100% ;
|
||||
text-decoration: none ;
|
||||
}
|
||||
|
||||
p.p-toc
|
||||
{
|
||||
padding-top: 0px ;
|
||||
padding-bottom: 0px ;
|
||||
padding-left: 15px ;
|
||||
margin: 0px ;
|
||||
border-bottom: 1px #999 solid ;
|
||||
padding-top: 0px ;
|
||||
padding-bottom: 0px ;
|
||||
padding-left: 15px ;
|
||||
margin: 0px ;
|
||||
border-bottom: 1px #999 dashed ;
|
||||
text-align: left ;
|
||||
}
|
||||
|
||||
a.a-toc
|
||||
@ -173,7 +176,7 @@ a.a-href:visited
|
||||
a.a-href:hover
|
||||
{
|
||||
color: #09c ;
|
||||
background-color: #eee ;
|
||||
background-color: #ddd ;
|
||||
}
|
||||
|
||||
em.quote
|
||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 10 KiB |
@ -12,7 +12,7 @@
|
||||
<li><a class="a-href" href="changelog.html">Change log</a></li>
|
||||
<li><a class="a-href" href="userguide.html">User guide</a></li>
|
||||
<li><a class="a-href" href="reference.html">Reference</a></li>
|
||||
<li><a class="a-href" href="windows.html">Windows installation guide</a></li>
|
||||
<li><a class="a-href" href="windows.html">Windows guide</a></li>
|
||||
<li><a class="a-href" href="developer.html">Design and implementation</a></li>
|
||||
<li><a class="a-href" href="doxygen/index.html">Source code documentation</a> (generated by <a class="a-href" href="http://www.doxygen.org">doxygen</a>, if available)</li>
|
||||
<li><a class="a-href" href="emailrelay-man.html">Man page</a> (generated by man2html, if available)</li>
|
||||
|
@ -1,11 +1,6 @@
|
||||
E-MailRelay Reference
|
||||
=====================
|
||||
|
||||
Introduction
|
||||
------------
|
||||
This is the E-MailRelay reference guide. It contains material which is
|
||||
supplementary to the user guide.
|
||||
|
||||
Command line usage
|
||||
------------------
|
||||
The "emailrelay" program supports the following command-line usage:
|
||||
@ -68,7 +63,7 @@ where <switch> is:
|
||||
Displays help text and exits.
|
||||
|
||||
# --immediate (-m)
|
||||
Enables immediating forwarding of messages as soon as they are received (requires --forward-to).
|
||||
Enables immediate forwarding of messages as soon as they are received (requires --forward-to).
|
||||
|
||||
# --interface (-I)
|
||||
Defines the listening interface for new connections.
|
||||
@ -112,15 +107,15 @@ where <switch> is:
|
||||
# --port (-p)
|
||||
Specifies the smtp listening port number.
|
||||
|
||||
# --prompt-timeout (-w)
|
||||
Sets the timeout (in seconds) for getting an initial prompt from the server.
|
||||
|
||||
# --remote-clients (-r)
|
||||
Allows remote clients to connect.
|
||||
|
||||
# --response-timeout (-T)
|
||||
Sets the response timeout (in seconds) when talking to a remote server (default is 1800).
|
||||
|
||||
# --scanner (-R)
|
||||
Specifies an external network server to process messages when they are stored.
|
||||
|
||||
# --server-auth (-S)
|
||||
Enables authentication of remote clients, using the given secrets file.
|
||||
|
||||
@ -142,8 +137,8 @@ where <switch> is:
|
||||
# --version (-V)
|
||||
Displays version information and exits.
|
||||
|
||||
Under Windows there are a few differences. Use "--help --verbose"
|
||||
to see the complete list.
|
||||
Under Windows there are a few minor differences. Use "--help --verbose" to see
|
||||
the complete list.
|
||||
|
||||
Message store
|
||||
-------------
|
||||
@ -157,7 +152,7 @@ by a process-id, timestamp and sequence number, followed by "envelope" or
|
||||
"content". The envelope files then have an additional suffix to implement a
|
||||
simple locking scheme.
|
||||
|
||||
The envelope suffixes are:
|
||||
The envelope file suffixes are:
|
||||
* ".new" -- while the envelope is first being written
|
||||
* <none> -- while the message is spooled
|
||||
* ".busy" -- while the message is being forwarded
|
||||
@ -183,8 +178,7 @@ which processes mail using the specified filter program, and then forwards the
|
||||
mail on to the system's default MTA (on port 25):
|
||||
|
||||
emailrelay --as-proxy localhost:smtp --port 10025 --no-syslog \
|
||||
--filter $HOME/.emailrelay/filter \
|
||||
--spool-dir $HOME/.emailrelay/spool
|
||||
--filter $HOME/myfilter --spool-dir $HOME/spool
|
||||
|
||||
The pre-processor program should terminate with an exit code of zero to
|
||||
indicate success, or a value between 1 and 99 to indicate failure. Exit codes
|
||||
@ -194,20 +188,20 @@ expiring any "--poll" timer.
|
||||
|
||||
If the pre-processor program terminates with a non-zero exit code then the
|
||||
first few thousand characters of the standard output stream are searched for a
|
||||
line starting with "<<" followed by ">>". The text inbetween is taken as a
|
||||
failure reason, and passed back to the SMTP client.
|
||||
line starting with "<<" or "[[" followed by ">>" or "]]" respectively. The text
|
||||
in between is taken as a failure reason, and passed back to the SMTP client.
|
||||
|
||||
The pre-processor program can edit any part of the message's envelope file or
|
||||
content file: E-MailRelay remembers nothing about the message while the
|
||||
pre-processor is running, except the filename. But if the message is deleted
|
||||
by the pre-processor then E-MailRelay will be upset, so to avoid the
|
||||
error message use an exit code of 100.
|
||||
by the pre-processor then E-MailRelay may be upset, so to avoid the error
|
||||
message use an exit code of 100.
|
||||
|
||||
If the pre-processor program creates completely new messages in the spool
|
||||
directory then they may not be processed immediately, or they may be completely
|
||||
ignored. To get E-MailRelay to pick up new messages in the spool directory use
|
||||
the "--poll" switch, or run "emailrelay --as-client" from within the
|
||||
pre-processor program.
|
||||
ignored. To get E-MailRelay to pick up any new messages you create in the spool
|
||||
directory use the "--poll" switch, or run "emailrelay --as-client" from within
|
||||
the pre-processor program.
|
||||
|
||||
As an example of a simple pre-processor this shell script examines the sending
|
||||
client's IP address and conditionally passes the message into "sendmail" (using
|
||||
@ -277,24 +271,25 @@ Bear in mind the following points when writing "--filter" programs:
|
||||
* The E-MailRelay process is completely blocked while the "--filter" program runs.
|
||||
* E-MailRelay files use CR-LF line terminators, as required by the RFCs.
|
||||
* Envelope files will have a file extension of ".new" or ".busy" when the program runs.
|
||||
* Windows JScript and VBScript programs must be run using "cscript".
|
||||
* Windows Perl programs must be run from a batch file, or from a JScript/VBScript wrapper.
|
||||
* Windows scripts may need to be run via "cscript" or a batch file wrapper.
|
||||
|
||||
It is also possible to run a separate server process to pre-process messages by
|
||||
using the "--scanner" switch, which has the advantage of not blocking the main
|
||||
E-MailRelay process during message pre-processing. The "--scanner" switch is
|
||||
used to specify the IP address and port that the scanner server is listening
|
||||
on. E-MailRelay connects to this address and then uses a simple line-based
|
||||
dialog as each e-mail message is received. E-MailRelay sends the full path of
|
||||
the message content file, and the scanner is expected to respond with "ok" if
|
||||
the message is to be accepted, or an error message.
|
||||
It is also possible to do message pre-processing in a separate server process by
|
||||
using "net:<address>:<port>" as the "--filter" or "--client-filter" switch
|
||||
parameter. E-MailRelay connects to this address and then uses a simple
|
||||
line-based dialog as each e-mail message is processed where it sends the
|
||||
full path of the message content file in one line and expects the remote process
|
||||
to respond with an "ok" line if the message is to be accepted or an error
|
||||
message. One advantage of using a network pre-processor compared to running a
|
||||
program is that the E-MailRelay server is not blocked while the messages are
|
||||
being pre-processed.
|
||||
|
||||
Address verification
|
||||
--------------------
|
||||
By default the E-MailRelay server will accept all addresses for incoming e-mails
|
||||
as valid. However, this default behaviour can be modified by using an external
|
||||
verifier program, specified with the "--verifier" command-line switch, so that
|
||||
you get to choose which addresses are accepted as valid and which are rejected.
|
||||
you get to choose which recipient addresses are accepted as valid and which are
|
||||
rejected.
|
||||
|
||||
The external verifier program is passed a command-line containing: (1) the full
|
||||
e-mail address as supplied by the remote client, (2) the user-name part of the
|
||||
@ -388,11 +383,11 @@ by connecting on a trusted IP address:
|
||||
echo "cannot relay without authentication"
|
||||
exit 2 # reject the recipient address
|
||||
fi
|
||||
echo ""
|
||||
echo "${address}"
|
||||
echo "${address}" # again
|
||||
exit 1 # accept the recipient address
|
||||
|
||||
or in JavaScript:
|
||||
or in JavaScript for Windows:
|
||||
|
||||
// verifier.js
|
||||
var address = WScript.Arguments(0) ;
|
||||
@ -404,13 +399,22 @@ or in JavaScript:
|
||||
WScript.Echo( "cannot relay without authentication" ) ;
|
||||
WScript.Quit( 2 ) ;
|
||||
}
|
||||
WScript.Echo( address ) ;
|
||||
WScript.Echo( "" ) ;
|
||||
WScript.Echo( address ) ;
|
||||
WScript.Quit( 1 ) ;
|
||||
|
||||
If this verifier script is used with a suitable "--server-auth" file then it can
|
||||
be used to prevent open relay without restricting authenticated clients.
|
||||
|
||||
If the "--verifier" switch parameter is of the form "net:<address>:<port>" then
|
||||
the E-MailRelay server connects to the specified verifier daemon over the
|
||||
network and sends verifier requests as lines with pipe-delimited fields. The
|
||||
expected response is another pipe-delimited line containing the same information
|
||||
as returned by verifier scripts but in reverse, such as "3|address unavailable"
|
||||
or "0|postmaster|Local Postmaster <postmaster@localhost>". The "inetd"
|
||||
super-server daemon would be a convenient way to connect up the pieces in this
|
||||
case.
|
||||
|
||||
Authentication
|
||||
--------------
|
||||
E-MailRelay supports the SMTP "AUTH" extension, as defined in RFC2554, on both
|
||||
@ -428,7 +432,7 @@ The authentication mechanisms currently supported are:
|
||||
not replayable. Defined in RFC2195.
|
||||
|
||||
Authentication is enabled with the "--client-auth" and "--server-auth"
|
||||
command-line switches. The switch parameter is the name of a "secrets" file,
|
||||
command-line switches. The switch parameter is the name of a secrets file,
|
||||
containing usernames and passwords:
|
||||
|
||||
emailrelay --as-server --server-auth /etc/emailrelay-clients.auth
|
||||
@ -446,7 +450,7 @@ Lines have four white-space delimited fields:
|
||||
The "mechanism" field must be "LOGIN", "APOP" or "CRAM-MD5" (case-insensitive);
|
||||
the "client-or-server" field must be "client" or "server"; the "userid" field is
|
||||
xtext-encoded user identifier; and the "secret" field is the xtext-encoded
|
||||
"LOGIN" password, or the "CRAM-MD5" key.
|
||||
"LOGIN" password, or the "CRAM-MD5" digest key.
|
||||
|
||||
The "xtext" encoding scheme is defined properly in RFC1891, but basically it
|
||||
says that non alphanumeric characters should be represented in hexadecimal as
|
||||
@ -458,7 +462,8 @@ at least one "LOGIN client" or "CRAM-MD5 client" entry.
|
||||
|
||||
A server-side secrets file specified with "--server-auth" is used when a remote
|
||||
client tries to authenticate with the E-MailRelay server. The file should
|
||||
normally contain several "LOGIN server" or "CRAM-MD5 server" entries.
|
||||
normally contain several "LOGIN server" or "CRAM-MD5 server" entries, one for
|
||||
each client.
|
||||
|
||||
The same secrets file may be specified for both "--client-auth" and
|
||||
"--server-auth" switches.
|
||||
@ -502,7 +507,7 @@ the third field, and an arbitrary keyword in the fourth field. The keyword field
|
||||
is passed to any external address verifier program specified by the "--verifier"
|
||||
command-line switch; it is not used for any other purpose.
|
||||
|
||||
For example this secrets file allows any client connecting from the
|
||||
For example, this secrets file allows any client connecting from the
|
||||
192.168.0.0/24 domain to connect without authentication desipte the
|
||||
"--server-auth" switch:
|
||||
|
||||
@ -517,8 +522,8 @@ On the client side authentication is performed when E-MailRelay has connected to
|
||||
a server which implements the AUTH extension with one of the supported
|
||||
mechanisms. If client authentication is enabled (with the "--client-auth"
|
||||
switch) but the remote server does not support the AUTH extension, or does not
|
||||
support the LOGIN or CRAM-MD5 mechanism, then E-MailRelay will fail the first
|
||||
message and terminate with an error message.
|
||||
support the LOGIN or CRAM-MD5 mechanism, then E-MailRelay will log an error
|
||||
and not forward any messages.
|
||||
|
||||
Note that some ISPs require separate POP/IMAP authentication before SMTP access
|
||||
from a particular IP address is allowed. This type of POP-before-SMTP
|
||||
@ -527,8 +532,11 @@ such as "fetchmail".
|
||||
|
||||
Pop server
|
||||
----------
|
||||
If E-MailRelay has been built with POP3 support then the "--help --verbose"
|
||||
output will show several additional command-line switches:
|
||||
E-MailRelay can be used as a POP3 server so that POP clients have access to
|
||||
spooled messages.
|
||||
|
||||
The following command-line switches are used:
|
||||
|
||||
# --pop
|
||||
|
||||
Enables the POP3 server.
|
||||
@ -565,7 +573,7 @@ output will show several additional command-line switches:
|
||||
If E-MailRelay finds only the envelope file in the sub-directory and not the
|
||||
content file then it will look for the content file in the main spool
|
||||
directory, eg. "/var/spool/emailrelay". This feature can be used to save
|
||||
diskspace if serving the same message to multiple POP clients.
|
||||
disk space if serving the same message to multiple POP clients.
|
||||
|
||||
# --pop-no-delete
|
||||
|
||||
@ -602,7 +610,8 @@ following precautions are taken:
|
||||
there is no dependence on the current working directory or the PATH
|
||||
environment variable.
|
||||
|
||||
Some other points are:
|
||||
Some other points to note are:
|
||||
|
||||
# umask
|
||||
|
||||
The program runs for most of the time with a "umask" of 177, switching to 117
|
||||
@ -639,6 +648,19 @@ Some other points are:
|
||||
spool directory, and the files created end up owned by the submitter but with
|
||||
group ownership of "daemon".
|
||||
|
||||
# logging
|
||||
|
||||
Logging output is conditioned so that ANSI escape sequences cannot appear
|
||||
in the log.
|
||||
|
||||
Passwords and message content are not logged (except if using the "--debug"
|
||||
switch with debug logging support enabled at build time).
|
||||
|
||||
# information leakage
|
||||
|
||||
The "--anonymous" switch can be used to slightly reduce the amount of information
|
||||
released to remote clients.
|
||||
|
||||
Security issues which relate to the SMTP protocol itself are beyond the scope of
|
||||
this document, but RFC2821 makes the following observation: "SMTP mail is
|
||||
inherently insecure in that it is feasible for even [..] casual users to [..]
|
||||
@ -664,19 +686,9 @@ mail to the next SMTP server, as an alternative to running
|
||||
"emailrelay --as-client" as a separate process. In proxy mode it is a way of
|
||||
getting the proxy server to scan the spool-directory for new messages.
|
||||
|
||||
The utility program "emailrelay-poke" can be used to issue the "flush"
|
||||
command to an E-MailRelay server. For example:
|
||||
|
||||
$ emailrelay --as-server --port 125 --forward-to localhost:25 --admin 10026
|
||||
$ emailrelay-poke 10026
|
||||
$ echo $?
|
||||
|
||||
To use the "flush" command the next SMTP server address must have been defined
|
||||
on the "emailrelay" command line at start-up using the "--forward-to" switch.
|
||||
|
||||
Also, the "list" command lists the messages in the spool directory, "info"
|
||||
provides network status information and activity statistics, and "notify"
|
||||
enables asynchronous event notification.
|
||||
The "list" command lists the messages in the spool directory, "info" provides
|
||||
network status information and activity statistics, and "notify" enables
|
||||
asynchronous event notification.
|
||||
|
||||
Files and directories
|
||||
---------------------
|
||||
@ -684,9 +696,10 @@ Following a normal build from source, a "make install" puts files in the
|
||||
following locations:
|
||||
* /usr/local/etc/emailrelay.conf
|
||||
* /usr/local/etc/emailrelay.conf.template
|
||||
* /usr/local/libexec/emailrelay
|
||||
* /usr/local/libexec/emailrelay-poke
|
||||
* /usr/local/libexec/emailrelay-*.sh
|
||||
* /usr/local/libexec/emailrelay/emailrelay-filter-copy
|
||||
* /usr/local/libexec/emailrelay/emailrelay-poke
|
||||
* /usr/local/libexec/emailrelay/examples/*
|
||||
* /usr/local/libexec/emailrelay/init/emailrelay
|
||||
* /usr/local/man/man1/emailrelay*.1.gz
|
||||
* /usr/local/sbin/emailrelay
|
||||
* /usr/local/sbin/emailrelay-passwd
|
||||
@ -701,17 +714,17 @@ This directory structure is constrained by the GNU/"autoconf" conventions rather
|
||||
than the Filesystem Hierarchy Standard (FHS).
|
||||
|
||||
To force FHS compliance you can use the "--enable-fhs" switch when running
|
||||
"configure", as is done for the RPMs. This results in the following file
|
||||
locations:
|
||||
"configure". This results in the following file locations:
|
||||
* /etc/emailrelay.conf
|
||||
* /etc/emailrelay.conf.template
|
||||
* /etc/init.d/emailrelay
|
||||
* /usr/lib/emailrelay-poke
|
||||
* /usr/lib/emailrelay/emailrelay-filter-copy
|
||||
* /usr/lib/emailrelay/emailrelay-poke
|
||||
* /usr/lib/emailrelay/examples/*
|
||||
* /usr/sbin/emailrelay
|
||||
* /usr/sbin/emailrelay-passwd
|
||||
* /usr/sbin/emailrelay-submit
|
||||
* /usr/share/doc/emailrelay/*
|
||||
* /usr/share/doc/emailrelay/examples/emailrelay-*.sh
|
||||
* /usr/share/doc/emailrelay/index.html
|
||||
* /usr/share/doc/emailrelay/README
|
||||
* /usr/share/man/man1/emailrelay*.1.gz
|
||||
@ -721,10 +734,10 @@ locations:
|
||||
For finer control of the directory structure the following can be specified on
|
||||
the "configure" command-line (but note that the "--enable-fhs" will override
|
||||
them):
|
||||
* --libexecdir=<dir>
|
||||
* --mandir=<dir>
|
||||
* --sbindir=<dir>
|
||||
* --sysconfdir=<dir>
|
||||
* e_libexecdir=<dir>
|
||||
* e_sysconfdir=<dir>
|
||||
* e_docdir=<dir>
|
||||
* e_examplesdir=<dir>
|
||||
* e_initdir=<dir>
|
||||
|
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 4.2 KiB |
@ -52,7 +52,8 @@ Typical applications of E-MailRelay include:
|
||||
* adding digital signatures or legal disclaimers to outgoing mail
|
||||
* doing store-and-forward for outgoing mail across a dial-up Internet connection
|
||||
* adding authentication where the existing infrastructure does not support it
|
||||
* simple proxying on a firewall host or DMZ
|
||||
* simple SMTP proxying on a firewall host or DMZ
|
||||
* SMTP to POP gateway
|
||||
|
||||
Running E-MailRelay
|
||||
-------------------
|
||||
@ -103,125 +104,36 @@ or run:
|
||||
|
||||
emailrelay --help --verbose
|
||||
|
||||
Starting the daemon at boot-time
|
||||
--------------------------------
|
||||
The standard installation of E-MailRelay (using "make install") puts most of the
|
||||
files into the right places, but it does not set things up so that the daemon
|
||||
starts at boot time. You have to do that yourself because of the differences
|
||||
between the various operating systems and distributions.
|
||||
Configuration
|
||||
-------------
|
||||
The "emailrelay" program itself is mostly configured through command-line
|
||||
switches (such as "--port" and "--forward-to"), so there is no single
|
||||
definitive configuration file.
|
||||
|
||||
Many systems provide GUI programs and command-line tools to make the necessary
|
||||
links into the boot system: "ksysv" (KDE), "redhat-config-services", "insserv"
|
||||
(Suse), "chkconfig" (Redhat), "install_initd" (LSB) are examples.
|
||||
However, in most installations on Unix-like system the E-MailRelay server will
|
||||
be started up by the boot-time script called "emailrelay" in the "/etc/init.d"
|
||||
directory, and this script uses the configuration file "/etc/emailrelay.conf" to
|
||||
define the server command-line. Each entry in the configuration file corresponds
|
||||
to an E-MailRelay command-line switch, so you can edit this file to add and
|
||||
remove server switches. Refer to the reference guide for a complete list of
|
||||
configuration switches.
|
||||
|
||||
If you do not have a suitable configuration tool you can set up the links
|
||||
manually as described below.
|
||||
On Windows the installation program creates a startup batch file called
|
||||
"emailrelay-start.bat" that contains all the server command-line switches and
|
||||
you can edit this file to tailor the server configuration. You can also set up
|
||||
your own shortcuts to the E-MailRelay executable and add and remove command-line
|
||||
switches using the shortcut properties tab.
|
||||
|
||||
The "System-V" boot system has a base directory "/etc/init.d" (or
|
||||
"/sbin/init.d") containing a start/stop script for each daemon process, and then
|
||||
symbolic links in the "rc<N>.d" subdirectories control which scripts are run
|
||||
when entering or leaving a particular run-level (<N>). The links point back into
|
||||
the start/stop script in the parent directory, using a "S" prefix for the
|
||||
starting link, and a "K" prefix for the stopping link. The numeric part of the
|
||||
link name determines the order in which the links are called.
|
||||
If you are using authentication then you will have to create the text files
|
||||
containing your authentication secrets (passwords and password hashes). The
|
||||
"--server-auth", "--client-auth" and "--pop-auth" command-line switches are used
|
||||
to point to these files.
|
||||
|
||||
So the goal is to set up symbolic links to the "emailrelay" start/stop script
|
||||
(not the binary) which "make install" should have put in "/etc/init.d" or
|
||||
"/usr/local/libexec".
|
||||
|
||||
Before you start you will need to know where your "init.d" directory can be
|
||||
found and what your default run level is:
|
||||
|
||||
$ ls -d /*/init.d
|
||||
$ runlevel | awk '{print $2}'
|
||||
|
||||
Assuming these are "/etc/init.d" and "5" you should (as root) copy the
|
||||
E-MailRelay start/stop script into "/etc/init.d" (if it is not already installed
|
||||
there):
|
||||
|
||||
$ cp /usr/local/libexec/emailrelay /etc/init.d
|
||||
|
||||
Then determine an appropriate numeric value for the link names by looking at
|
||||
similar server programs like "sendmail":
|
||||
|
||||
$ cd /etc/init.d/rc5.d
|
||||
$ ls *sendmail*
|
||||
|
||||
Assuming sendmail links are "S10sendmail" and "K10sendmail", create
|
||||
the "emailrelay" links in the same format:
|
||||
|
||||
$ cd /etc/init.d/rc5.d
|
||||
$ ln -s ../emailrelay S10emailrelay
|
||||
$ ln -s ../emailrelay K10emailrelay
|
||||
|
||||
And finally remove any incomatible SMTP servers from the run-level that might
|
||||
otherwise compete for the same SMTP listening port:
|
||||
|
||||
$ cd /etc/init.d/rc5.d
|
||||
$ rm *sendmail
|
||||
|
||||
Triggering onward delivery
|
||||
--------------------------
|
||||
If you are using E-MailRelay to store and forward e-mail over a dial-up link to
|
||||
the Internet, then you will need to set things up so that the dialler tells
|
||||
E-MailRelay when to start forwarding.
|
||||
|
||||
This section assumes that you are using "pppd" to establish your dial-up
|
||||
Internet connection. (KDE's "kppp" and Red Hat's "rp3" are graphical
|
||||
front-ends to an underlying "pppd" daemon.)
|
||||
|
||||
The ppp daemon calls the script "/etc/ppp/ip-up" when it has successfully
|
||||
established a dial-up link to your ISP. This script will probably set up IP
|
||||
routes, update the DNS configuration, initialise a firewall, run "fetchmail"
|
||||
and "sendmail", etc. It may also call out to another script, "ip-up.local"
|
||||
which is available for you to put stuff into without having to grub around
|
||||
inside "ip-up" itself.
|
||||
|
||||
The simplest approach for editing "ip-up" is to look for a "sendmail -q" line.
|
||||
If you find "sendmail -q" then it should be sufficient to replace it with this:
|
||||
|
||||
emailrelay --as-client <myisp>:smtp
|
||||
|
||||
where you substitute your ISP's SMTP server address for <myisp>.
|
||||
|
||||
Or if your "ip-up" calls out to "ip-up.local" then create a two-line
|
||||
"/etc/ppp/ip-up.local" script like this:
|
||||
|
||||
#!/bin/sh
|
||||
exec /usr/local/sbin/emailrelay --as-client <myisp>:smtp
|
||||
|
||||
If you create "ip-up.local" yourself remember to make it executable.
|
||||
|
||||
Notification of failed e-mails
|
||||
------------------------------
|
||||
If e-mail messages corrupted or inaccessible within the spool directory
|
||||
(typically becuase the disk is full) then they will get failed within the
|
||||
E-MailRelay system, with the envelope files in the spool directory ending up
|
||||
with a ".bad" suffix.
|
||||
|
||||
If you are not too worried about getting failed mail to bounce, or if you do not
|
||||
have a suitable delivery agent, then a simple check in your ".profile" script
|
||||
for "*.bad" files in the spool directory may be sufficient:
|
||||
|
||||
if test -f /var/spool/emailrelay/*.envelope.bad
|
||||
then
|
||||
echo Failed mail >&2
|
||||
fi
|
||||
|
||||
This will warn you that something failed, but you will have to look at the
|
||||
failure reason written into the envelope files, and at the log files, to
|
||||
find out what went wrong.
|
||||
|
||||
Or you can get failed e-mails to 'bounce' back into your in-tray by running the
|
||||
"emailrelay-notify.sh" script as "root" periodically. But note that this is
|
||||
only approporiate if you are using E-MailRelay for outgoing traffic, and it
|
||||
assumes that you have "procmail" installed on your system to act as a "delivery
|
||||
agent".
|
||||
|
||||
If you want failed e-mails to be retried a few times you can run the
|
||||
"emailrelay-resubmit.sh" script periodically. This simply removes the ".bad"
|
||||
suffix from files in the spool directory, as long as they have not been retried
|
||||
too many times already.
|
||||
There is also a graphical configuration program called "emailrelay-gui" that
|
||||
may be available to help with configuring the system. This is intended to be
|
||||
used once at installation time (and it is the basis of the self-extracting
|
||||
installer on Windows) but it may also be used to do some simple reconfiguration
|
||||
of an alreay-installed system.
|
||||
|
||||
Logging
|
||||
-------
|
||||
@ -233,15 +145,14 @@ The "syslog" system is configured through the "/etc/syslog.conf" file (try
|
||||
"man syslog.conf"), and in most cases you will find that "LOG_MAIL" warnings and
|
||||
errors are directed to an appropriate log file (perhaps "/var/log/messages").
|
||||
|
||||
To get a file which will accumulate all E-MailRelay log messages (and messages
|
||||
from all other mail programs), add a line like this to "/etc/syslog.conf":
|
||||
For more verbose logging add the "--verbose" switch. If this becomes difficult
|
||||
to read via the system log (especially on Windows) then try logging to the
|
||||
standard error stream and redirect that to a file. Bear in mind that you will
|
||||
need have to replace "--as-server" with "--log" and "--as-proxy" with
|
||||
"--immediate --forward-to" since the "--as-server" and "--as-proxy" switches
|
||||
implicitly close the standard error stream soon after startup.
|
||||
|
||||
mail.info: /var/log/mail.log
|
||||
|
||||
You may have to restart the "syslogd" daemon, or send it a "SIGHUP" signal, in
|
||||
order to have this change take effect.
|
||||
|
||||
For less verbose logging change "mail.info" to "mail.warning".
|
||||
emailrelay --log --verbose > emailrelay.log 2>&1
|
||||
|
||||
Troubleshooting
|
||||
---------------
|
||||
@ -312,40 +223,37 @@ authentication. You should be able to use an e-mail front-end program, or
|
||||
something like "fetchmail" to do the POP/IMAP authentication.
|
||||
|
||||
If you can send mail messages sucessfully using telnet, then you should look at
|
||||
the E-MailRelay log output and compare what you do interactively with what
|
||||
the program does. Usually when running as a server E-MailRelay logging goes to
|
||||
the "syslog" system, and when running as a client it goes to the standard error
|
||||
stream ("stderr"). To get the server to log onto stderr, replace the
|
||||
"--as-server" command-line switch with "--log --no-syslog". Refer to the
|
||||
reference guide for more information.
|
||||
|
||||
Reporting problems
|
||||
------------------
|
||||
Please report any problems you have, but please always say what operating system
|
||||
and version of E-MailRelay are using, and include as much logging information
|
||||
as possible.
|
||||
the E-MailRelay "--verbose" log output and compare what you do interactively
|
||||
with what the program does.
|
||||
|
||||
Preventing open mail relay
|
||||
--------------------------
|
||||
If you are running E-MailRelay as a server with a permanent connection to the
|
||||
Internet it is important to prevent open mail relay because this can be
|
||||
exploited by spammers. By default open mail relaying is not possible because
|
||||
E-MailRelay does not accept IP connections from remote clients. However, if the
|
||||
"--remote-clients" switch is used then you need to be more careful. One option
|
||||
is to require all clients to authenticate, by using the "--server-auth" switch.
|
||||
But if you need local clients, such as your own e-mail front-end, to connect
|
||||
without authentication then you will need to put those trusted IP addresses in
|
||||
the secrets file with an authentication mechanism of "NONE". Refer to the
|
||||
reference guide for more information.
|
||||
E-MailRelay does not accept IP connections from remote clients. However, if you
|
||||
use the "--remote-clients" switch then you need to be more careful.
|
||||
|
||||
Taking it one stage further, you may want to allow clients to connect from any
|
||||
IP address without authentication, but only allow them to send mail to local
|
||||
users. You can do this by requiring authentication with the "--server-auth"
|
||||
switch but then exempt all clients from authentication with a
|
||||
"NONE server *.*.*.* x" line in the secrets file. To complete the solution
|
||||
you must have an address verifier script ("--verifier") which rejects remote
|
||||
addresses if the client has not authenticated. Again, refer to the reference
|
||||
guide for further details.
|
||||
If the only required access to the E-MailRelay server is from a local network
|
||||
and not from the Internet then you can use the "--interface" switch to listen
|
||||
for incoming connections only on the local network interface. You should also
|
||||
use a firewall in this scenario.
|
||||
|
||||
Another option is to require all clients to authenticate by using the
|
||||
"--server-auth" switch. If you then need local clients, such as your own e-mail
|
||||
front-end, to connect without authentication then you must put those trusted IP
|
||||
addresses in the secrets file with an authentication mechanism of "NONE". Refer
|
||||
to the reference guide for more information.
|
||||
|
||||
Taking it one stage further, you may want to allow connections from the Internet
|
||||
without authentication but only allow them to send mail to local users. In other
|
||||
words you want to allow anyone to deliver e-mail to your system but not allow
|
||||
them to spam someone else. You can do this by requiring authentication with the
|
||||
"--server-auth" switch, then exempt everyone from mandatory authentication with
|
||||
"NONE server *.*.*.* x" line in the secrets file, and finally have an address
|
||||
verifier script ("--verifier") which rejects remote recipient addresses if the
|
||||
client has not authenticated. Again, refer to the reference guide for further
|
||||
details.
|
||||
|
||||
Running as a POP server
|
||||
-----------------------
|
||||
@ -364,139 +272,151 @@ like this:
|
||||
APOP server user1 password1
|
||||
APOP server user2 password2
|
||||
|
||||
If you need to serve up messages to more than one user consider using the
|
||||
If you need to serve up messages to more than one POP client consider using the
|
||||
"--pop-by-name" option with a "--filter" script that moves messages into the
|
||||
appropriate subdirectory based on the "To:" address.
|
||||
appropriate subdirectory. The "emailrelay-filter-copy" program is designed
|
||||
to be used in this way: when a message is received over SMTP it copies it
|
||||
into all available sub-directories for collection by multiple POP clients.
|
||||
|
||||
Refer to the reference guide for more information.
|
||||
|
||||
Triggering delivery over dial-up
|
||||
--------------------------------
|
||||
If you are using E-MailRelay to store and forward e-mail over a dial-up link to
|
||||
the Internet, then you will need to set things up so that the dialler tells
|
||||
E-MailRelay when to start forwarding.
|
||||
|
||||
In most Unix-like systems a "ppp" daemon calls the script "/etc/ppp/ip-up" when
|
||||
it has successfully established a dial-up link to your ISP. This script will
|
||||
probably set up IP routes, update the DNS configuration, initialise a firewall,
|
||||
run "fetchmail" and "sendmail", etc. It may also call out to another script,
|
||||
"ip-up.local" which is available for you to put stuff into without having to
|
||||
edit "ip-up" itself.
|
||||
|
||||
The simplest approach for editing "ip-up" is to look for a "sendmail -q" line.
|
||||
If you find "sendmail -q" then it should be sufficient to replace it with this:
|
||||
|
||||
emailrelay --as-client <myisp>:smtp
|
||||
|
||||
where you substitute your ISP's SMTP server address for <myisp>.
|
||||
|
||||
Or if your "ip-up" calls out to "ip-up.local" then create a two-line
|
||||
"/etc/ppp/ip-up.local" script like this:
|
||||
|
||||
#!/bin/sh
|
||||
exec /usr/local/sbin/emailrelay --as-client <myisp>:smtp
|
||||
|
||||
If you create "ip-up.local" yourself remember to make it executable.
|
||||
|
||||
Notification of failed e-mails
|
||||
------------------------------
|
||||
If e-mail messages cannot be forwarded by the E-MailRelay system then the
|
||||
envelope files in the spool directory are given a ".bad" suffix. The reason for
|
||||
the failure will be recorded in the envelope file itself.
|
||||
|
||||
You should check for ".bad" envelope files in the E-MailRelay spool directory
|
||||
from time to time.
|
||||
|
||||
If you want failed e-mails to be retried a few times you can run the
|
||||
"emailrelay-resubmit.sh" script periodically, perhaps from "cron". This script
|
||||
simply removes the ".bad" suffix from files in the spool directory, as long as
|
||||
they have not been retried too many times already.
|
||||
|
||||
If you are using E-MailRelay to forward outgoing e-mails then you can also get
|
||||
failed e-mails to bounce back to your in-tray by running the
|
||||
"emailrelay-notify.sh" script periodically as "root", although this does require
|
||||
"procmail" to be available to act as a delivery agent.
|
||||
|
||||
Usage patterns
|
||||
--------------
|
||||
The simplest ways of using E-MailRelay for SMTP are as a proxy or as a
|
||||
store-and-forward MTA, but other configurations are possible. For example, you
|
||||
could use the E-MailRelay server to do message storing, but use something else
|
||||
to do the forwarding. Or you could implement simple routing by having a
|
||||
"--filter" program that moves message files into the spool directory of another
|
||||
E-MailRelay process. Or you could have multiple forwarding E-MailRelay processes
|
||||
running off the same spool directory, but trigger them at different times of the
|
||||
day.
|
||||
store-and-forward MTA, but many other configurations are possible. For example,
|
||||
multiple E-MailRelay servers can run in parallel sharing the same spool directory,
|
||||
or they can be chained in series to that e-mail messages get transferred
|
||||
from one to the next.
|
||||
|
||||
Remember that messages can be introduced directly into the E-MailRelay spool
|
||||
directory using the "emailrelay-submit" utility, and they can be moved out again
|
||||
at any time as long as the envelope file is not "locked" with a ".busy" filename
|
||||
extension. Your "--filter" program can edit messages in any way you want, and it
|
||||
can even remove the current message from the spool directory as long as it lets
|
||||
E-MailRelay know by terminating with an exit code of 100.
|
||||
at any time, as long as the envelope file is not locked (ie. with a special
|
||||
filename extension). Your "--filter" program can edit messages in any way you
|
||||
want, and it can even remove the current message from the spool directory.
|
||||
|
||||
Another important technique is to run E-MailRelay as an SMTP server, but use the
|
||||
Another useful technique is to run E-MailRelay as an SMTP server but use the
|
||||
"--poll" switch so that the server process will also do periodic forwarding.
|
||||
With a short "--poll" period this behaves rather like a proxy, but the
|
||||
submitting client program does not have to wait for the message to be delivered
|
||||
to the remote server. A normal proxy only responds with OK after the SMTP DATA
|
||||
transfer phase once the message has been sucessfully transfered to the next
|
||||
server, but by using the "--poll" mechanism the client gets an OK response
|
||||
immediately. If you don't like the idea of polling the spool directory, you can
|
||||
use a "--filter" program to force the "--poll" timer to expire as soon as a new
|
||||
message is received by exiting with a value of 103.
|
||||
to the remote server. To avoid the overhead of polling the spool directory
|
||||
continuously you can use get the "--filter" program to force the "--poll" timer
|
||||
to expire as each new message is received by using a special exit value of 103.
|
||||
|
||||
When using E-MailRelay as a POP server the "--pop-by-name" feature can be used
|
||||
to serve up different spooled messages according to the username that the client
|
||||
authenticated with: each user's messages are taken from a sub-directory of the
|
||||
main spool directory. This means that you have to decide how to move or copy the
|
||||
messages into those sub-directories. If messages are coming in over SMTP then
|
||||
you could install an SMTP "--filter" script to move each new message into the
|
||||
relevant sub-directory based on the message addressing. Or if you are submitting
|
||||
messages directly into the main spool directory using the "emailrelay-submit"
|
||||
utility then you could use the "--verbose" switch to get the filename for the
|
||||
new message and then move, copy or link it into the users' sub-directories as
|
||||
a second step. Hard links (if supported by your filesystem) can be a neat way to
|
||||
distribute content files into multiple subdirectories because you do not use any
|
||||
more disk space for the copies and the storage is reclaimed automatically once
|
||||
the last copy is deleted. To avoid race conditions always copy or link the
|
||||
content file into the sub-directory first and then make a copy of the envelope
|
||||
file.
|
||||
authenticated with: each user's messages are taken from their own sub-directory
|
||||
of the main spool directory. This means that you can decide how to move or copy
|
||||
the messages into those sub-directories. If messages are coming in over SMTP
|
||||
then you could install an SMTP "--filter" script to move each new message into
|
||||
the relevant sub-directory based on the message addressing.
|
||||
|
||||
For more ideas check out the "--client-filter", "--poll" and "--scanner"
|
||||
switches, and don't overlook the administration interface ("--admin") which you
|
||||
can use to receive notification of message arrival or force message forwarding
|
||||
at any time.
|
||||
For more ideas check out the "--client-filter" and "--poll" switches, and don't
|
||||
overlook the administration and control interface ("--admin") which you can use
|
||||
to receive notification of message arrival or force message forwarding at any
|
||||
time.
|
||||
|
||||
SpamAssassin
|
||||
------------
|
||||
The E-MailRelay server can use *Spam Assassin* [http://spamassassin.org] to mark
|
||||
potential spam. To do this you will need to have a small shell script to call
|
||||
"spamassassin", and pass the name of this script to E-MailRelay using the
|
||||
"--filter" command-line switch.
|
||||
The E-MailRelay server can use *SpamAssassin* [http://spamassassin.apache.org]
|
||||
to mark or reject potential spam.
|
||||
|
||||
To get E-MailRelay to reject spam outright you can just use "spamassassin -e" as
|
||||
your E-MailRelay "--filter" program:
|
||||
|
||||
emailrelay --as-server --filter "/usr/bin/spamassassin --exit-code"
|
||||
|
||||
Or on Windows:
|
||||
|
||||
emailrelay --as-server --filter "c:/Program\ Files/perl/site/bin/spamassassin.bat --exit-code"
|
||||
|
||||
To get spam messages identified by SpamAssassin but still pass through the
|
||||
E-MailRelay system you will have to have a small "--filter" script to collect
|
||||
the output from the "spamassassin" program and write it back into the
|
||||
E-MailRelay content file.
|
||||
|
||||
Your "--filter" shell script could look something like this:
|
||||
|
||||
#!/bin/sh
|
||||
tmp="/tmp/`basename $0`.$$.tmp"
|
||||
awk '{sub("\r$","");print}' "${1}" | spamassassin --local | awk '{print $0 "\r"}' > $tmp && mv $tmp "${1}"
|
||||
rm -f $tmp 2>/dev/null
|
||||
spamassassin "$1" > "$1.tmp"
|
||||
mv "$1.tmp" "$1"
|
||||
exit 0
|
||||
|
||||
This just pipes the message content file into "spamassassin", using "awk" to
|
||||
remove carriage-returns. The output is saved in a temporary file, and then put
|
||||
back into the content file, using "awk" again to restore carriage-returns.
|
||||
Or an equivalent batch script on Windows:
|
||||
|
||||
To delete spam altogether, rather than just marking it, you could add
|
||||
"--exit-code" to the spamassassin command line and deal with messages according
|
||||
to the exit code:
|
||||
|
||||
#!/bin/sh
|
||||
awk '{sub("\r$","");print}' "${1}" | spamassassin --local --exit-code > /dev/null
|
||||
if test $? -ne 0
|
||||
then
|
||||
# spam...
|
||||
content="${1}"
|
||||
envelope="`echo \"${content}\" | sed 's/content/envelope.new/'`"
|
||||
rm -f "${envelope}" "${content}"
|
||||
exit 100 # <= tell E-MailRelay that the files are gone
|
||||
fi
|
||||
c:\Program Files\perl\site\bin\spamassassin.bat %1 > %1.tmp
|
||||
ren %1.tmp %1
|
||||
exit 0
|
||||
|
||||
On Windows there is less of a problem with carriage returns, but because
|
||||
"spamassassin" is a perl script it takes a bit of work to call it correctly: on
|
||||
Windows only ".exe" and ".bat" files can be executed directly by the operating
|
||||
system. One solution is to have E-MailRelay run some JavaScript using
|
||||
"cscript.exe", and the JavaScript can then run perl/spamassassin and pass the
|
||||
results back to E-MailRelay.
|
||||
You may need to set the "--filter-timeout" switch to control how long
|
||||
E-MailRelay waits for the spam analysis to complete.
|
||||
|
||||
An example JavaScript wrapper called "emailrelay-runperl.js" is included in
|
||||
the distribution that by default calls "spamassassin".
|
||||
You could also consider doing spam filtering off-line, completely independent
|
||||
of any SMTP activity, by having two E-MailRelay processes chained together
|
||||
working off two spool directories:
|
||||
|
||||
Try an E-MailRelay command line like this:
|
||||
emailrelay --as-server --spool-dir /tmp/spool-in --poll 1 --forward-to localhost:10025
|
||||
emailrelay --as-server --spool-dir /tmp/spool-out --port 10025 --filter /tmp/myspamfilter
|
||||
|
||||
emailrelay --as-server --filter "c:/winnt/system32/cscript.exe //nologo c:/program\ files/emailrelay/emailrelay-runperl.js"
|
||||
Here the first E-MailRelay server accepts incoming mail straight into its spool
|
||||
directory and it uses a "--poll" timer to independently forward spooled messages
|
||||
to the second server running on port 10025. The second server runs the spam
|
||||
filter as each message is received.
|
||||
|
||||
But note that you may have to add explicit paths if perl or spamassassin are
|
||||
not on your path.
|
||||
There is also an experimental mechanism where E-MailRelay can talk direcly to
|
||||
the SpamassAssin "spamd" network deamon using a special form of the "--filter"
|
||||
switch:
|
||||
|
||||
If you have a problem with long SpamAssassin processing times causing the
|
||||
submitting program to time-out then you should try moving the spam processing
|
||||
out of the storing server and into the forwarding process. You can do this by
|
||||
replacing the "--filter" switch on the "--as-server" command with a
|
||||
"--client-filter" switch on the "--as-client" command.
|
||||
emailrelay --as-server --filter spam:localhost:783
|
||||
|
||||
So this:
|
||||
|
||||
emailrelay --as-server --filter /usr/local/bin/myfilter.sh
|
||||
emailrelay --as-client smarthost:smtp
|
||||
|
||||
becomes this:
|
||||
|
||||
emailrelay --as-server
|
||||
emailrelay --as-client smarthost:smtp --client-filter /usr/local/bin/myfilter.sh
|
||||
|
||||
To avoid having to run the "--as-client" forwarding processes repeatedly (eg.
|
||||
from "cron") you can start a long-lived forwarding process that polls the spool
|
||||
directory itself, like this:
|
||||
|
||||
emailrelay --log --close-stderr --no-smtp --poll 30 --forward-to smarthost:smtp ...
|
||||
|
||||
You could then try running several forwarding processes in parallel in order to
|
||||
maximise throughput.
|
||||
This might be useful if spam filtering is creating a bottleneck in the
|
||||
E-MailRelay server.
|
||||
|
||||
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
E-MailRelay Windows installation
|
||||
================================
|
||||
E-MailRelay Windows
|
||||
===================
|
||||
|
||||
Setup program
|
||||
-------------
|
||||
Installing E-MailRelay on Windows should be straightfowrard if you have
|
||||
self-extracting archive program "emailrelay-setup.exe". Make sure that the setup
|
||||
program is in a writeable directory with plenty of space on the disk because
|
||||
when you run it is will extract an installation GUI program plus dependent DLLs
|
||||
in into the same directory.
|
||||
Installing E-MailRelay on Windows should be straightforward if you have
|
||||
self-extracting archive program "emailrelay-setup.exe". Make sure that the
|
||||
setup program is in a writeable directory with plenty of space on the disk
|
||||
because when you run it is will extract an installation GUI program plus
|
||||
dependent DLLs in into the same directory.
|
||||
|
||||
The installation GUI program will take you through the installation options and
|
||||
then install the run-time files into your chosen directory.
|
||||
@ -26,25 +26,37 @@ the self-extracting setup program, is as follows:
|
||||
* Add "--as-server --verbose" to the server shortcut properties.
|
||||
* Add "--as-client myisp.net:smtp --hidden --client-auth c:/emailrelay.auth" to the client shortcut.
|
||||
|
||||
Move shortcuts to "Startup" folders as necessary. Or try using Microsoft's
|
||||
"srvany.exe" utility to run emailrelay as a service; you will need to use the
|
||||
"--hidden" and "--no-daemon" switches on the E-MailRelay command-line for this.
|
||||
Move shortcuts to "Startup" folders as necessary.
|
||||
|
||||
Running as a service
|
||||
--------------------
|
||||
To manually install E-MailRelay as a service so that it starts up automatically
|
||||
at boot-time you must first create a one-line batch file called
|
||||
"emailrelay-start.bat" in the main E-MailRelay directory. This should contain
|
||||
the full server startup command, including the "--hidden" and "--no-daemon"
|
||||
switches. Then run "emailrelay-service --install" to install the service.
|
||||
|
||||
Note that the batch file and the main E-MailRelay executable must be in the same
|
||||
directory and that the batch file is only read at install time; if you need to
|
||||
change the command-line switches for the service you must edit the service
|
||||
properties.
|
||||
|
||||
Diagnostics
|
||||
-----------
|
||||
* Set the environment variable "GLOGOUTPUT_DIR" to (eg.) "c:\temp" and look for "glog.txt"
|
||||
* Add "--log --log-time --verbose --syslog" to the E-MailRelay command-lines.
|
||||
* Check the event log (run "eventvwr.exe") for errors and warnings.
|
||||
* Check the system event log (run "eventvwr.exe") for errors and warnings.
|
||||
* Check the spool directory for ".bad" envelope files -- remove the suffix to retry.
|
||||
* Set the environment variable "GLOGOUTPUT_DIR" to (eg.) "c:\temp" and look for "glog.txt"
|
||||
|
||||
Building from source
|
||||
--------------------
|
||||
E-MailRelay can be compiled using Microsoft Visual C++ (MSVC) 6 or MinGW,
|
||||
E-MailRelay can be compiled using Microsoft Visual Studio C++ (MSVC) 6 or MinGW,
|
||||
although the installation/configuration GUI can only be built with MinGW because
|
||||
of its dependence on Qt.
|
||||
|
||||
There is a workspace file for MSVC 6 in the "src" directory. For MinGW please
|
||||
follow the guidelines in "mingw-common.mak" also in the "src" directory.
|
||||
There is a Visual Studio workspace file for MSVC 6 in the "src" directory. For
|
||||
MinGW please follow the guidelines in "mingw-common.mak" which is also in the
|
||||
"src" directory.
|
||||
|
||||
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
Summary: Simple e-mail message transfer agent and proxy using SMTP
|
||||
Name: emailrelay
|
||||
Version: 1.5
|
||||
Version: 1.6
|
||||
Release: 1
|
||||
License: GPL
|
||||
License: GPL3
|
||||
Group: System Environment/Daemons
|
||||
URL: http://emailrelay.sourceforge.net/
|
||||
Source: http://kent.dl.sourceforge.net/sourceforge/emailrelay/emailrelay-src-1.5.tar.gz
|
||||
Source: http://sourceforge.net/sourceforge/emailrelay/emailrelay-src-1.6.tar.gz
|
||||
BuildRoot: /tmp/emailrelay-install
|
||||
|
||||
%description
|
||||
@ -16,7 +16,7 @@ messages as they pass through. When running as a store-and-forward MTA incoming
|
||||
messages are stored in a local spool directory, and then forwarded to the next
|
||||
SMTP server on request.
|
||||
|
||||
Because of its functional simplicity E-MailRelay is easy to configure, typically
|
||||
Because of its functional simplicity E-MailRelay is easy to configure, often
|
||||
only requiring the address of the target SMTP server to be put on the command
|
||||
line.
|
||||
|
||||
@ -24,13 +24,13 @@ E-MailRelay can also run as a POP3 server. Messages received over SMTP can be
|
||||
automatically dropped into several independent POP3 mailboxes.
|
||||
|
||||
C++ source code is available for Linux, FreeBSD, MacOS X etc, and Windows.
|
||||
Distribution is under the GNU General Public License.
|
||||
Distribution is under the GNU General Public License V3.
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
%build
|
||||
./configure --enable-fhs --without-man2html --without-doxygen
|
||||
./configure --enable-fhs --disable-gui --without-man2html --without-doxygen
|
||||
make
|
||||
|
||||
%install
|
||||
@ -50,16 +50,46 @@ test "$RPM_BUILD_ROOT" = "/" || rm -rf "$RPM_BUILD_ROOT"
|
||||
%config /etc/emailrelay.conf
|
||||
/etc/emailrelay.conf.template
|
||||
/etc/init.d/emailrelay
|
||||
/usr/lib/emailrelay-poke
|
||||
/usr/share/man/man1/emailrelay-submit.1.gz
|
||||
/usr/share/man/man1/emailrelay.1.gz
|
||||
/usr/share/man/man1/emailrelay-poke.1.gz
|
||||
/usr/share/man/man1/emailrelay-passwd.1.gz
|
||||
%docdir /usr/share/doc/emailrelay
|
||||
/usr/share/doc/emailrelay/index.html
|
||||
/usr/share/doc/emailrelay/windows.html
|
||||
/usr/share/doc/emailrelay/gsmtp-classes.png
|
||||
/usr/share/doc/emailrelay/emailrelay.docbook
|
||||
%doc /usr/share/doc/emailrelay/developer.txt
|
||||
/usr/share/doc/emailrelay/reference.html
|
||||
%doc /usr/share/doc/emailrelay/NEWS
|
||||
%doc /usr/share/doc/emailrelay/reference.txt
|
||||
/usr/share/doc/emailrelay/developer.html
|
||||
/usr/share/doc/emailrelay/auth.png
|
||||
/usr/share/doc/emailrelay/emailrelay.css
|
||||
/usr/share/doc/emailrelay/sequence-3.png
|
||||
/usr/share/doc/emailrelay/gsmtp-serverprotocol.png
|
||||
/usr/share/doc/emailrelay/gnet-client.png
|
||||
/usr/share/doc/emailrelay/gnet-classes.png
|
||||
%doc /usr/share/doc/emailrelay/README
|
||||
/usr/share/doc/emailrelay/changelog.html
|
||||
%doc /usr/share/doc/emailrelay/userguide.txt
|
||||
/usr/share/doc/emailrelay/readme.html
|
||||
/usr/share/doc/emailrelay/userguide.html
|
||||
%doc /usr/share/doc/emailrelay/ChangeLog
|
||||
%doc /usr/share/doc/emailrelay/windows.txt
|
||||
/usr/share/doc/emailrelay/emailrelay-man.html
|
||||
%dir /usr/lib/emailrelay
|
||||
%dir /usr/lib/emailrelay/examples
|
||||
/usr/lib/emailrelay/examples/emailrelay-process.sh
|
||||
/usr/lib/emailrelay/examples/emailrelay-deliver.sh
|
||||
/usr/lib/emailrelay/examples/emailrelay-resubmit.sh
|
||||
/usr/lib/emailrelay/examples/emailrelay-notify.sh
|
||||
/usr/lib/emailrelay/examples/emailrelay-submit.sh
|
||||
/usr/lib/emailrelay/emailrelay-poke
|
||||
/usr/lib/emailrelay/emailrelay-filter-copy
|
||||
/usr/sbin/emailrelay-submit
|
||||
/usr/sbin/emailrelay
|
||||
/usr/sbin/emailrelay-passwd
|
||||
/usr/sbin/emailrelay-submit
|
||||
/usr/share/doc/emailrelay/*
|
||||
/usr/share/doc/emailrelay/examples/emailrelay-*.sh
|
||||
/usr/share/doc/emailrelay/index.html
|
||||
/usr/share/doc/emailrelay/README
|
||||
/usr/share/man/man1/emailrelay*.1.gz
|
||||
/var/spool/emailrelay/
|
||||
|
||||
%changelog
|
||||
|
||||
|
@ -1,11 +1,10 @@
|
||||
#
|
||||
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
##
|
||||
## This program 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 of the License, or (at your option) any later
|
||||
## version.
|
||||
## This program 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 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,11 +12,9 @@
|
||||
## 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
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
##
|
||||
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
EXTRA_DIST = emailrelay.conf.template
|
||||
sysconf_DATA = emailrelay.conf.template
|
||||
e_sysconf_DATA = emailrelay.conf.template
|
||||
install-data-hook:
|
||||
if test -f "$(DESTDIR)$(sysconfdir)/emailrelay.conf" ; then : ; else cp "$(DESTDIR)$(sysconfdir)/emailrelay.conf.template" "$(DESTDIR)$(sysconfdir)/emailrelay.conf" ; fi
|
||||
if test -f "$(DESTDIR)$(e_sysconfdir)/emailrelay.conf" ; then : ; else cp "$(DESTDIR)$(e_sysconfdir)/emailrelay.conf.template" "$(DESTDIR)$(e_sysconfdir)/emailrelay.conf" ; fi
|
||||
|
@ -48,9 +48,9 @@ am__vpath_adj = case $$p in \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(sysconfdir)"
|
||||
sysconfDATA_INSTALL = $(INSTALL_DATA)
|
||||
DATA = $(sysconf_DATA)
|
||||
am__installdirs = "$(DESTDIR)$(e_sysconfdir)"
|
||||
e_sysconfDATA_INSTALL = $(INSTALL_DATA)
|
||||
DATA = $(e_sysconf_DATA)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
@ -104,7 +104,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
POPLIB = @POPLIB@
|
||||
QT_CFLAGS = @QT_CFLAGS@
|
||||
QT_LIBS = @QT_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
@ -133,8 +132,10 @@ dvidir = @dvidir@
|
||||
e_docdir = @e_docdir@
|
||||
e_examplesdir = @e_examplesdir@
|
||||
e_initdir = @e_initdir@
|
||||
e_libexecdir = @e_libexecdir@
|
||||
e_qtmoc = @e_qtmoc@
|
||||
e_spooldir = @e_spooldir@
|
||||
e_sysconfdir = @e_sysconfdir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
@ -163,7 +164,7 @@ top_srcdir = @top_srcdir@
|
||||
#
|
||||
#
|
||||
EXTRA_DIST = emailrelay.conf.template
|
||||
sysconf_DATA = emailrelay.conf.template
|
||||
e_sysconf_DATA = emailrelay.conf.template
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
@ -196,22 +197,22 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-sysconfDATA: $(sysconf_DATA)
|
||||
install-e_sysconfDATA: $(e_sysconf_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(sysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(sysconfdir)"
|
||||
@list='$(sysconf_DATA)'; for p in $$list; do \
|
||||
test -z "$(e_sysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(e_sysconfdir)"
|
||||
@list='$(e_sysconf_DATA)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(sysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sysconfdir)/$$f'"; \
|
||||
$(sysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sysconfdir)/$$f"; \
|
||||
echo " $(e_sysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(e_sysconfdir)/$$f'"; \
|
||||
$(e_sysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(e_sysconfdir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-sysconfDATA:
|
||||
uninstall-e_sysconfDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(sysconf_DATA)'; for p in $$list; do \
|
||||
@list='$(e_sysconf_DATA)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(sysconfdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(sysconfdir)/$$f"; \
|
||||
echo " rm -f '$(DESTDIR)$(e_sysconfdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(e_sysconfdir)/$$f"; \
|
||||
done
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
@ -250,7 +251,7 @@ check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(DATA)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(sysconfdir)"; do \
|
||||
for dir in "$(DESTDIR)$(e_sysconfdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
@ -295,13 +296,13 @@ info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
install-data-am: install-e_sysconfDATA
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-exec-am: install-sysconfDATA
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
@ -331,23 +332,24 @@ ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-sysconfDATA
|
||||
uninstall-am: uninstall-e_sysconfDATA
|
||||
|
||||
.MAKE: install-am install-data-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
||||
distclean-generic distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am \
|
||||
install-data-hook install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip install-sysconfDATA \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
||||
pdf-am ps ps-am uninstall uninstall-am uninstall-sysconfDATA
|
||||
install-data-hook install-dvi install-dvi-am \
|
||||
install-e_sysconfDATA install-exec install-exec-am \
|
||||
install-html install-html-am install-info install-info-am \
|
||||
install-man install-pdf install-pdf-am install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
|
||||
uninstall-am uninstall-e_sysconfDATA
|
||||
|
||||
install-data-hook:
|
||||
if test -f "$(DESTDIR)$(sysconfdir)/emailrelay.conf" ; then : ; else cp "$(DESTDIR)$(sysconfdir)/emailrelay.conf.template" "$(DESTDIR)$(sysconfdir)/emailrelay.conf" ; fi
|
||||
if test -f "$(DESTDIR)$(e_sysconfdir)/emailrelay.conf" ; then : ; else cp "$(DESTDIR)$(e_sysconfdir)/emailrelay.conf.template" "$(DESTDIR)$(e_sysconfdir)/emailrelay.conf" ; fi
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
@ -33,7 +33,7 @@
|
||||
# Description: Specifies an interface to listen on. The default is to listen
|
||||
# on all interfaces (INADDR_ANY). Using a specific interface can make it harder
|
||||
# for clients on other sub-networks to connect, so improving security. Up to
|
||||
# three interface addresses can be spefified using comma separators.
|
||||
# three interface addresses can be specified using comma separators.
|
||||
#
|
||||
#interface 192.168.0.10
|
||||
|
||||
@ -76,24 +76,29 @@
|
||||
# Name: domain
|
||||
# Format: domain <fqdn>
|
||||
# Description: Sets an override for this host's fully qualified domain name.
|
||||
# This is used as an identifier in the SMTP protocol and is therefore visible
|
||||
# to remote SMTP servers and clients.
|
||||
#
|
||||
#domain myhost.mydomain.net
|
||||
|
||||
# Name: forward
|
||||
# Format: forward
|
||||
# Description: Forwards stored mail on startup. Requires --forward-to.
|
||||
# This is implicit in the --as-proxy switch.
|
||||
#
|
||||
#forward
|
||||
|
||||
# Name: forward-to
|
||||
# Format: forward-to <host:port>
|
||||
# Description: Specifies the remote SMTP server when using --forward or --admin.
|
||||
# Description: Specifies the remote SMTP server when using --forward, --as-proxy
|
||||
# or --admin.
|
||||
#
|
||||
#forward-to smarthost.mydomain.net
|
||||
|
||||
# Name: immediate
|
||||
# Format: immediate
|
||||
# Description: Forwards each message as soon as it is received. Requires --forward-to.
|
||||
# This is implicit in the --as-proxy switch.
|
||||
#
|
||||
#immediate
|
||||
|
||||
@ -112,7 +117,7 @@
|
||||
# Name: poll
|
||||
# Format: poll <period>
|
||||
# Description: Enables polling of the spool directory for new messages with the
|
||||
# specified period. Requires --forward-to.
|
||||
# specified period (in seconds). Requires --forward-to.
|
||||
#
|
||||
#poll 120
|
||||
|
||||
@ -148,7 +153,7 @@
|
||||
|
||||
# Name: pop
|
||||
# Format: pop
|
||||
# Description: Enables the pop server if enabled at build-time: use "./configure --enable-pop".
|
||||
# Description: Enables the pop server.
|
||||
#
|
||||
#pop
|
||||
|
||||
@ -174,7 +179,7 @@
|
||||
# Name: pop-by-name
|
||||
# Format: pop-by-name
|
||||
# Description: Serves messages from a user-specific subdirectory of the main spool directory.
|
||||
# The subdirectory name is the name used in the POP authentication.
|
||||
#
|
||||
#pop-by-name
|
||||
|
||||
|
||||
|
@ -1,11 +1,10 @@
|
||||
#
|
||||
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
##
|
||||
## This program 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 of the License, or (at your option) any later
|
||||
## version.
|
||||
## This program 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 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,8 +12,6 @@
|
||||
## 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
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
##
|
||||
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
SUBDIRS = gcc2.95 msvc6.0 sunpro5
|
||||
|
@ -106,7 +106,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
POPLIB = @POPLIB@
|
||||
QT_CFLAGS = @QT_CFLAGS@
|
||||
QT_LIBS = @QT_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
@ -135,8 +134,10 @@ dvidir = @dvidir@
|
||||
e_docdir = @e_docdir@
|
||||
e_examplesdir = @e_examplesdir@
|
||||
e_initdir = @e_initdir@
|
||||
e_libexecdir = @e_libexecdir@
|
||||
e_qtmoc = @e_qtmoc@
|
||||
e_spooldir = @e_spooldir@
|
||||
e_sysconfdir = @e_sysconfdir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
|
@ -1,11 +1,10 @@
|
||||
#
|
||||
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
##
|
||||
## This program 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 of the License, or (at your option) any later
|
||||
## version.
|
||||
## This program 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 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
## 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
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
##
|
||||
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
EXTRA_DIST = iostream limits sstream xlocale
|
||||
|
@ -97,7 +97,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
POPLIB = @POPLIB@
|
||||
QT_CFLAGS = @QT_CFLAGS@
|
||||
QT_LIBS = @QT_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
@ -126,8 +125,10 @@ dvidir = @dvidir@
|
||||
e_docdir = @e_docdir@
|
||||
e_examplesdir = @e_examplesdir@
|
||||
e_initdir = @e_initdir@
|
||||
e_libexecdir = @e_libexecdir@
|
||||
e_qtmoc = @e_qtmoc@
|
||||
e_spooldir = @e_spooldir@
|
||||
e_sysconfdir = @e_sysconfdir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file iostream
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file limits
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file sstream
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file xlocale
|
||||
|
@ -1,11 +1,10 @@
|
||||
#
|
||||
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
##
|
||||
## This program 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 of the License, or (at your option) any later
|
||||
## version.
|
||||
## This program 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 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
## 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
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
##
|
||||
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
EXTRA_DIST = cstdio cstdlib cstring ctime cmath cstddef
|
||||
|
@ -97,7 +97,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
POPLIB = @POPLIB@
|
||||
QT_CFLAGS = @QT_CFLAGS@
|
||||
QT_LIBS = @QT_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
@ -126,8 +125,10 @@ dvidir = @dvidir@
|
||||
e_docdir = @e_docdir@
|
||||
e_examplesdir = @e_examplesdir@
|
||||
e_initdir = @e_initdir@
|
||||
e_libexecdir = @e_libexecdir@
|
||||
e_qtmoc = @e_qtmoc@
|
||||
e_spooldir = @e_spooldir@
|
||||
e_sysconfdir = @e_sysconfdir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file cmath
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file cstddef
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file cstdio
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file cstdlib
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file cstring
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file ctime
|
||||
|
@ -1,11 +1,10 @@
|
||||
#
|
||||
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
##
|
||||
## This program 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 of the License, or (at your option) any later
|
||||
## version.
|
||||
## This program 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 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,8 +12,6 @@
|
||||
## 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
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
##
|
||||
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
EXTRA_DIST = xar
|
||||
|
@ -94,7 +94,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
POPLIB = @POPLIB@
|
||||
QT_CFLAGS = @QT_CFLAGS@
|
||||
QT_LIBS = @QT_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
@ -123,8 +122,10 @@ dvidir = @dvidir@
|
||||
e_docdir = @e_docdir@
|
||||
e_examplesdir = @e_examplesdir@
|
||||
e_initdir = @e_initdir@
|
||||
e_libexecdir = @e_libexecdir@
|
||||
e_qtmoc = @e_qtmoc@
|
||||
e_spooldir = @e_spooldir@
|
||||
e_sysconfdir = @e_sysconfdir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
|
@ -2,11 +2,10 @@
|
||||
#
|
||||
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
#
|
||||
# This program 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 of the License, or (at your option) any later
|
||||
# version.
|
||||
# This program 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 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -14,9 +13,7 @@
|
||||
# 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
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
#
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# ===
|
||||
#
|
||||
# xar
|
||||
|
@ -1,11 +1,10 @@
|
||||
#
|
||||
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
##
|
||||
## This program 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 of the License, or (at your option) any later
|
||||
## version.
|
||||
## This program 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 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
## 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
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
##
|
||||
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
EXTRA_DIST = mingw.mak mingw-common.mak emailrelay.dsw
|
||||
SUBDIRS = glib gnet gsmtp gpop main win32 gui
|
||||
|
@ -106,7 +106,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
POPLIB = @POPLIB@
|
||||
QT_CFLAGS = @QT_CFLAGS@
|
||||
QT_LIBS = @QT_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
@ -135,8 +134,10 @@ dvidir = @dvidir@
|
||||
e_docdir = @e_docdir@
|
||||
e_examplesdir = @e_examplesdir@
|
||||
e_initdir = @e_initdir@
|
||||
e_libexecdir = @e_libexecdir@
|
||||
e_qtmoc = @e_qtmoc@
|
||||
e_spooldir = @e_spooldir@
|
||||
e_sysconfdir = @e_sysconfdir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
|
@ -1,101 +1,113 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "common"=".\main\common.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "emailrelay"=".\main\emailrelay.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name common
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "filter"=".\main\filter.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name common
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "passwd"=".\main\passwd.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name common
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "poke"=".\main\poke.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "submit"=".\main\submit.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name common
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "common"=".\main\common.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "emailrelay"=".\main\emailrelay.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name common
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "filter"=".\main\filter.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name common
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "passwd"=".\main\passwd.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name common
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "poke"=".\main\poke.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "service"=".\main\service.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "submit"=".\main\submit.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name common
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
@ -1,11 +1,10 @@
|
||||
#
|
||||
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
##
|
||||
## This program 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 of the License, or (at your option) any later
|
||||
## version.
|
||||
## This program 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 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
## 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
|
||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
##
|
||||
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
EXTRA_DIST=\
|
||||
garg_win32.cpp \
|
||||
@ -23,13 +20,12 @@ EXTRA_DIST=\
|
||||
gdaemon_win32.cpp \
|
||||
gdatetime_win32.cpp \
|
||||
gdirectory_win32.cpp \
|
||||
gexecutable_win32.cpp \
|
||||
gfs_win32.cpp \
|
||||
gidentity_win32.cpp \
|
||||
glogoutput_win32.cpp \
|
||||
gprocess_win32.cpp \
|
||||
gfile_win32.cpp \
|
||||
gregistry_win32.cpp \
|
||||
gregistry.h \
|
||||
mingw.mak
|
||||
INCLUDES = -I$(top_srcdir)/lib/$(COMPILER_VERSION)
|
||||
noinst_LIBRARIES = libglib.a
|
||||
@ -43,6 +39,8 @@ libglib_a_SOURCES = \
|
||||
gconvert.h \
|
||||
gcleanup.h \
|
||||
gcleanup_unix.cpp \
|
||||
gcounter.cpp \
|
||||
gcounter.h \
|
||||
gdaemon.h \
|
||||
gdaemon_unix.cpp \
|
||||
gdate.cpp \
|
||||
@ -57,8 +55,9 @@ libglib_a_SOURCES = \
|
||||
gdirectory_unix.cpp \
|
||||
gexception.cpp \
|
||||
gexception.h \
|
||||
gexe.cpp \
|
||||
gexe.h \
|
||||
gexecutable_unix.cpp \
|
||||
gexecutable.cpp \
|
||||
gexecutable.h \
|
||||
gfile.cpp \
|
||||
gfile.h \
|
||||
gfile_unix.cpp \
|
||||
@ -86,12 +85,16 @@ libglib_a_SOURCES = \
|
||||
groot.cpp \
|
||||
groot.h \
|
||||
gsetter.h \
|
||||
gsignalsafe.h \
|
||||
gsleep.h \
|
||||
gslot.cpp \
|
||||
gslot.h \
|
||||
gstatemachine.h \
|
||||
gstr.cpp \
|
||||
gstr.h \
|
||||
gstrings.h \
|
||||
gtest.cpp \
|
||||
gtest.h \
|
||||
gtime.cpp \
|
||||
gtime.h \
|
||||
gxtext.cpp \
|
||||
|
@ -45,16 +45,18 @@ ARFLAGS = cru
|
||||
libglib_a_AR = $(AR) $(ARFLAGS)
|
||||
libglib_a_LIBADD =
|
||||
am_libglib_a_OBJECTS = md5.$(OBJEXT) garg.$(OBJEXT) \
|
||||
garg_unix.$(OBJEXT) gcleanup_unix.$(OBJEXT) \
|
||||
garg_unix.$(OBJEXT) gcleanup_unix.$(OBJEXT) gcounter.$(OBJEXT) \
|
||||
gdaemon_unix.$(OBJEXT) gdate.$(OBJEXT) gdatetime.$(OBJEXT) \
|
||||
gdatetime_unix.$(OBJEXT) gdirectory.$(OBJEXT) \
|
||||
gdirectory_unix.$(OBJEXT) gexception.$(OBJEXT) gexe.$(OBJEXT) \
|
||||
gdirectory_unix.$(OBJEXT) gexception.$(OBJEXT) \
|
||||
gexecutable_unix.$(OBJEXT) gexecutable.$(OBJEXT) \
|
||||
gfile.$(OBJEXT) gfile_unix.$(OBJEXT) gfs_unix.$(OBJEXT) \
|
||||
ggetopt.$(OBJEXT) gidentity_unix.$(OBJEXT) glog.$(OBJEXT) \
|
||||
glogoutput.$(OBJEXT) glogoutput_unix.$(OBJEXT) \
|
||||
gmd5_native.$(OBJEXT) gpath.$(OBJEXT) gpidfile.$(OBJEXT) \
|
||||
gprocess_unix.$(OBJEXT) groot.$(OBJEXT) gslot.$(OBJEXT) \
|
||||
gstr.$(OBJEXT) gtime.$(OBJEXT) gxtext.$(OBJEXT)
|
||||
gstr.$(OBJEXT) gtest.$(OBJEXT) gtime.$(OBJEXT) \
|
||||
gxtext.$(OBJEXT)
|
||||
libglib_a_OBJECTS = $(am_libglib_a_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
@ -125,7 +127,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
POPLIB = @POPLIB@
|
||||
QT_CFLAGS = @QT_CFLAGS@
|
||||
QT_LIBS = @QT_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
@ -154,8 +155,10 @@ dvidir = @dvidir@
|
||||
e_docdir = @e_docdir@
|
||||
e_examplesdir = @e_examplesdir@
|
||||
e_initdir = @e_initdir@
|
||||
e_libexecdir = @e_libexecdir@
|
||||
e_qtmoc = @e_qtmoc@
|
||||
e_spooldir = @e_spooldir@
|
||||
e_sysconfdir = @e_sysconfdir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
htmldir = @htmldir@
|
||||
@ -189,13 +192,12 @@ EXTRA_DIST = \
|
||||
gdaemon_win32.cpp \
|
||||
gdatetime_win32.cpp \
|
||||
gdirectory_win32.cpp \
|
||||
gexecutable_win32.cpp \
|
||||
gfs_win32.cpp \
|
||||
gidentity_win32.cpp \
|
||||
glogoutput_win32.cpp \
|
||||
gprocess_win32.cpp \
|
||||
gfile_win32.cpp \
|
||||
gregistry_win32.cpp \
|
||||
gregistry.h \
|
||||
mingw.mak
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/lib/$(COMPILER_VERSION)
|
||||
@ -210,6 +212,8 @@ libglib_a_SOURCES = \
|
||||
gconvert.h \
|
||||
gcleanup.h \
|
||||
gcleanup_unix.cpp \
|
||||
gcounter.cpp \
|
||||
gcounter.h \
|
||||
gdaemon.h \
|
||||
gdaemon_unix.cpp \
|
||||
gdate.cpp \
|
||||
@ -224,8 +228,9 @@ libglib_a_SOURCES = \
|
||||
gdirectory_unix.cpp \
|
||||
gexception.cpp \
|
||||
gexception.h \
|
||||
gexe.cpp \
|
||||
gexe.h \
|
||||
gexecutable_unix.cpp \
|
||||
gexecutable.cpp \
|
||||
gexecutable.h \
|
||||
gfile.cpp \
|
||||
gfile.h \
|
||||
gfile_unix.cpp \
|
||||
@ -253,12 +258,16 @@ libglib_a_SOURCES = \
|
||||
groot.cpp \
|
||||
groot.h \
|
||||
gsetter.h \
|
||||
gsignalsafe.h \
|
||||
gsleep.h \
|
||||
gslot.cpp \
|
||||
gslot.h \
|
||||
gstatemachine.h \
|
||||
gstr.cpp \
|
||||
gstr.h \
|
||||
gstrings.h \
|
||||
gtest.cpp \
|
||||
gtest.h \
|
||||
gtime.cpp \
|
||||
gtime.h \
|
||||
gxtext.cpp \
|
||||
@ -314,6 +323,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/garg.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/garg_unix.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gcleanup_unix.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gcounter.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdaemon_unix.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdate.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdatetime.Po@am__quote@
|
||||
@ -321,7 +331,8 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdirectory.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdirectory_unix.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gexception.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gexe.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gexecutable.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gexecutable_unix.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gfile.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gfile_unix.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gfs_unix.Po@am__quote@
|
||||
@ -337,6 +348,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/groot.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gslot.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gstr.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtest.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtime.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gxtext.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Po@am__quote@
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
//
|
||||
// garg.cpp
|
||||
@ -29,6 +26,20 @@
|
||||
#include "gassert.h"
|
||||
#include <cstring>
|
||||
|
||||
G::Arg::Arg( int argc , char *argv[] )
|
||||
{
|
||||
G_ASSERT( argc > 0 ) ;
|
||||
G_ASSERT( argv != NULL ) ;
|
||||
for( int i = 0 ; i < argc ; i++ )
|
||||
m_array.push_back( argv[i] ) ;
|
||||
|
||||
setPrefix() ;
|
||||
}
|
||||
|
||||
G::Arg::~Arg()
|
||||
{
|
||||
}
|
||||
|
||||
G::Arg::Arg()
|
||||
{
|
||||
// now use parse()
|
||||
@ -50,18 +61,6 @@ G::Arg & G::Arg::operator=( const Arg & rhs )
|
||||
return *this ;
|
||||
}
|
||||
|
||||
G::Arg::~Arg()
|
||||
{
|
||||
}
|
||||
|
||||
G::Arg::Arg( int argc , char *argv[] )
|
||||
{
|
||||
for( int i = 0 ; i < argc ; i++ )
|
||||
m_array.push_back( argv[i] ) ;
|
||||
|
||||
setPrefix() ;
|
||||
}
|
||||
|
||||
void G::Arg::setPrefix()
|
||||
{
|
||||
G_ASSERT( m_array.size() > 0U ) ;
|
||||
@ -96,17 +95,17 @@ void G::Arg::protect( std::string & s )
|
||||
{
|
||||
// replace all quoted spaces with a replacement
|
||||
// (could do better: escaped quotes, tabs, single quotes)
|
||||
G_DEBUG( "protect: before: " << Str::toPrintableAscii(s) ) ;
|
||||
G_DEBUG( "protect: before: " << Str::printable(s) ) ;
|
||||
bool in_quote = false ;
|
||||
const char quote = '"' ;
|
||||
const char space = ' ' ;
|
||||
const char replacement = '\0' ;
|
||||
for( size_t pos = 0U ; pos < s.length() ; pos++ )
|
||||
for( std::string::size_type pos = 0U ; pos < s.length() ; pos++ )
|
||||
{
|
||||
if( s.at(pos) == quote ) in_quote = ! in_quote ;
|
||||
if( in_quote && s.at(pos) == space ) s[pos] = replacement ;
|
||||
}
|
||||
G_DEBUG( "protect: after: " << Str::toPrintableAscii(s) ) ;
|
||||
G_DEBUG( "protect: after: " << Str::printable(s) ) ;
|
||||
}
|
||||
|
||||
void G::Arg::unprotect( StringArray & array )
|
||||
@ -135,15 +134,14 @@ void G::Arg::dequote( StringArray & array )
|
||||
}
|
||||
}
|
||||
|
||||
bool G::Arg::contains( const std::string & sw , size_t sw_args , bool cs ) const
|
||||
bool G::Arg::contains( const std::string & sw , size_type sw_args , bool cs ) const
|
||||
{
|
||||
return find( cs , sw , sw_args , NULL ) ;
|
||||
}
|
||||
|
||||
bool G::Arg::find( bool cs , const std::string & sw , size_t sw_args ,
|
||||
size_t * index_p ) const
|
||||
bool G::Arg::find( bool cs , const std::string & sw , size_type sw_args , size_type * index_p ) const
|
||||
{
|
||||
for( size_t i = 1 ; i < m_array.size() ; i++ ) // start from v[1]
|
||||
for( size_type i = 1 ; i < m_array.size() ; i++ ) // start from v[1]
|
||||
{
|
||||
if( match(cs,sw,m_array[i]) && (i+sw_args) < m_array.size() )
|
||||
{
|
||||
@ -155,7 +153,6 @@ bool G::Arg::find( bool cs , const std::string & sw , size_t sw_args ,
|
||||
return false ;
|
||||
}
|
||||
|
||||
//static
|
||||
bool G::Arg::match( bool cs , const std::string & s1 , const std::string & s2 )
|
||||
{
|
||||
return
|
||||
@ -164,39 +161,40 @@ bool G::Arg::match( bool cs , const std::string & s1 , const std::string & s2 )
|
||||
Str::upper(s1) == Str::upper(s2) ;
|
||||
}
|
||||
|
||||
void G::Arg::remove( const std::string & sw , size_t sw_args )
|
||||
bool G::Arg::remove( const std::string & sw , size_type sw_args )
|
||||
{
|
||||
size_t i = 0U ;
|
||||
size_type i = 0U ;
|
||||
const bool found = find( true , sw , sw_args , &i ) ;
|
||||
if( found )
|
||||
removeAt( i , sw_args ) ;
|
||||
return found ;
|
||||
}
|
||||
|
||||
void G::Arg::removeAt( size_t sw_index , size_t sw_args )
|
||||
void G::Arg::removeAt( size_type sw_index , size_type sw_args )
|
||||
{
|
||||
G_ASSERT( sw_index > 0U && sw_index < m_array.size() ) ;
|
||||
if( sw_index > 0U && sw_index < m_array.size() )
|
||||
{
|
||||
StringArray::iterator p = m_array.begin() + sw_index ;
|
||||
p = m_array.erase( p ) ;
|
||||
for( size_t i = 0U ; i < sw_args && p != m_array.end() ; i++ )
|
||||
for( size_type i = 0U ; i < sw_args && p != m_array.end() ; i++ )
|
||||
p = m_array.erase( p ) ;
|
||||
}
|
||||
}
|
||||
|
||||
size_t G::Arg::index( const std::string & sw , size_t sw_args ) const
|
||||
G::Arg::size_type G::Arg::index( const std::string & sw , size_type sw_args ) const
|
||||
{
|
||||
size_t i = 0U ;
|
||||
size_type i = 0U ;
|
||||
const bool found = find( true , sw , sw_args , &i ) ;
|
||||
return found ? i : 0U ;
|
||||
}
|
||||
|
||||
size_t G::Arg::c() const
|
||||
G::Arg::size_type G::Arg::c() const
|
||||
{
|
||||
return m_array.size() ;
|
||||
}
|
||||
|
||||
std::string G::Arg::v( size_t i ) const
|
||||
std::string G::Arg::v( size_type i ) const
|
||||
{
|
||||
G_ASSERT( i < m_array.size() ) ;
|
||||
return m_array[i] ;
|
||||
@ -207,7 +205,6 @@ std::string G::Arg::prefix() const
|
||||
return m_prefix ;
|
||||
}
|
||||
|
||||
//static
|
||||
const char * G::Arg::prefix( char * argv [] ) // throw()
|
||||
{
|
||||
const char * exe = argv[0] ;
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file garg.h
|
||||
@ -47,13 +44,15 @@ namespace G
|
||||
class G::Arg
|
||||
{
|
||||
public:
|
||||
typedef unsigned int size_type ;
|
||||
|
||||
Arg( int argc , char *argv[] ) ;
|
||||
///< Constructor taking argc/argv.
|
||||
|
||||
Arg() ;
|
||||
///< Default constructor for Windows.
|
||||
///< Initialise (once) with parse().
|
||||
|
||||
|
||||
void parse( HINSTANCE hinstance , const std::string & command_line ) ;
|
||||
///< Windows only.
|
||||
///<
|
||||
@ -71,12 +70,12 @@ public:
|
||||
~Arg() ;
|
||||
///< Destructor.
|
||||
|
||||
size_t c() const ;
|
||||
size_type c() const ;
|
||||
///< Returns the number of tokens in the
|
||||
///< command line, including the program
|
||||
///< name.
|
||||
|
||||
std::string v( size_t i ) const ;
|
||||
std::string v( size_type i ) const ;
|
||||
///< Returns the i'th argument.
|
||||
///< Precondition: i < c()
|
||||
|
||||
@ -90,23 +89,21 @@ public:
|
||||
///< block.
|
||||
|
||||
bool contains( const std::string & sw ,
|
||||
size_t sw_args = 0U , bool case_sensitive = true ) const ;
|
||||
size_type sw_args = 0U , bool case_sensitive = true ) const ;
|
||||
///< Returns true if the command line
|
||||
///< contains the given switch with enough
|
||||
///< command line arguments left to satisfy
|
||||
///< the given number of switch arguments.
|
||||
|
||||
size_t index( const std::string & sw , size_t sw_args = 0U ) const ;
|
||||
size_type index( const std::string & sw , size_type sw_args = 0U ) const ;
|
||||
///< Returns the index of the given switch.
|
||||
///< Returns zero if not present.
|
||||
|
||||
void remove( const std::string & sw , size_t sw_args = 0U ) ;
|
||||
///< Removes the given switch and its
|
||||
///< arguments.
|
||||
///<
|
||||
///< Precondition: contains()
|
||||
bool remove( const std::string & sw , size_type sw_args = 0U ) ;
|
||||
///< Removes the given switch and its arguments.
|
||||
///< Returns false if the switch does not exist.
|
||||
|
||||
void removeAt( size_t sw_index , size_t sw_args = 0U ) ;
|
||||
void removeAt( size_type sw_index , size_type sw_args = 0U ) ;
|
||||
///< Removes the given argument and the
|
||||
///< following 'sw_args' ones.
|
||||
|
||||
@ -118,7 +115,7 @@ public:
|
||||
|
||||
private:
|
||||
static std::string moduleName( HINSTANCE h ) ;
|
||||
bool find( bool , const std::string & , size_t , size_t * ) const ;
|
||||
bool find( bool , const std::string & , size_type , size_type * ) const ;
|
||||
void setPrefix() ;
|
||||
static bool match( bool , const std::string & , const std::string & ) ;
|
||||
void parseCore( const std::string & ) ;
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
//
|
||||
// garg_unix.cpp
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
//
|
||||
// garg_win32.cpp
|
||||
@ -27,7 +24,7 @@
|
||||
|
||||
std::string G::Arg::moduleName( HINSTANCE hinstance )
|
||||
{
|
||||
char buffer[260] ;
|
||||
char buffer[10000U] ;
|
||||
size_t size = sizeof(buffer) ;
|
||||
*buffer = '\0' ;
|
||||
::GetModuleFileName( hinstance , buffer , size-1U ) ;
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file gassert.h
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file gcleanup.h
|
||||
@ -26,6 +23,7 @@
|
||||
|
||||
#include "gdef.h"
|
||||
#include "gpath.h"
|
||||
#include "gsignalsafe.h"
|
||||
#include "gexception.h"
|
||||
|
||||
/// \namespace G
|
||||
@ -47,7 +45,7 @@ public:
|
||||
///< An optional early-initialisation function.
|
||||
///< May be called more than once.
|
||||
|
||||
static void add( void (*fn)(const char*) , const char * arg ) ;
|
||||
static void add( void (*fn)(SignalSafe,const char*) , const char * arg ) ;
|
||||
///< Adds the given handler to the list which
|
||||
///< are to be called when the process
|
||||
///< terminates abnormally. The handler
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
//
|
||||
// gcleanup_unix.cpp
|
||||
@ -45,7 +42,7 @@ namespace G
|
||||
class G::CleanupImp
|
||||
{
|
||||
public:
|
||||
static void add( void (*fn)(const char*) , const char * ) ;
|
||||
static void add( void (*fn)(SignalSafe,const char*) , const char * ) ;
|
||||
static void installDefault( int ) ;
|
||||
static void callHandlers() ;
|
||||
static void ignore( int ) ;
|
||||
@ -61,7 +58,7 @@ private:
|
||||
/// A private linked-list structure used by G::CleanupImp.
|
||||
struct Link
|
||||
{
|
||||
void (*fn)(const char*) ;
|
||||
void (*fn)(SignalSafe,const char*) ;
|
||||
const char * arg ;
|
||||
Link * next ;
|
||||
} ;
|
||||
@ -79,7 +76,7 @@ void G::Cleanup::init()
|
||||
CleanupImp::ignore( SIGPIPE ) ;
|
||||
}
|
||||
|
||||
void G::Cleanup::add( void (*fn)(const char*) , const char * arg )
|
||||
void G::Cleanup::add( void (*fn)(SignalSafe,const char*) , const char * arg )
|
||||
{
|
||||
if( arg != NULL )
|
||||
CleanupImp::add( fn , arg ) ;
|
||||
@ -101,7 +98,7 @@ void G::CleanupImp::init()
|
||||
//installHandler( SIGUSR2 ) ;
|
||||
}
|
||||
|
||||
void G::CleanupImp::add( void (*fn)(const char*) , const char * arg )
|
||||
void G::CleanupImp::add( void (*fn)(SignalSafe,const char*) , const char * arg )
|
||||
{
|
||||
Link * p = new Link ;
|
||||
p->fn = fn ;
|
||||
@ -156,13 +153,12 @@ void G::CleanupImp::ignore( int signum )
|
||||
throw Error( "sigaction" ) ;
|
||||
}
|
||||
|
||||
|
||||
void G::CleanupImp::callHandlers()
|
||||
{
|
||||
G::Root claim_root ;
|
||||
for( const Link * p = m_head ; p != NULL ; p = p->next )
|
||||
{
|
||||
(*(p->fn))(p->arg) ;
|
||||
(*(p->fn))(SignalSafe(),p->arg) ;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
//
|
||||
// gcleanup_win32.cpp
|
||||
@ -29,7 +26,7 @@ void G::Cleanup::init()
|
||||
// no-op
|
||||
}
|
||||
|
||||
void G::Cleanup::add( void (*)(const char*) , const char * )
|
||||
void G::Cleanup::add( void (*)(SignalSafe,const char*) , const char * )
|
||||
{
|
||||
// not implemented
|
||||
}
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file gconvert.h
|
||||
@ -39,8 +36,7 @@ G_EXCEPTION( ConvertOverflow , "arithmetic overflow" ) ;
|
||||
/// overflow checking.
|
||||
/// \see boost::numeric_cast<>()
|
||||
///
|
||||
template <class Tout, class Tin>
|
||||
inline
|
||||
template <typename Tout, typename Tin>
|
||||
Tout Convert( const Tin & in )
|
||||
{
|
||||
Tout out = in ;
|
||||
|
29
src/glib/gcounter.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program 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, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
//
|
||||
// gcounter.cpp
|
||||
//
|
||||
|
||||
#include "gdef.h"
|
||||
#include "gcounter.h"
|
||||
|
||||
void G::CounterImp::check( const char * id , unsigned long n )
|
||||
{
|
||||
// no-op -- could do something with G::Test
|
||||
}
|
||||
|
||||
/// \file gcounter.cpp
|
110
src/glib/gcounter.h
Normal file
@ -0,0 +1,110 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program 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, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file gcounter.h
|
||||
///
|
||||
|
||||
#ifndef G_OBJECT_COUNTER_H
|
||||
#define G_OBJECT_COUNTER_H
|
||||
|
||||
#include "gdef.h"
|
||||
#include "gdebug.h"
|
||||
|
||||
/// \namespace G
|
||||
namespace G
|
||||
{
|
||||
class CounterImp ;
|
||||
}
|
||||
|
||||
/// \class G::CounterImp
|
||||
/// A private implementation class used
|
||||
/// by the G::Counter<> class template.
|
||||
///
|
||||
class G::CounterImp
|
||||
{
|
||||
public:
|
||||
static void check( const char * class_name , unsigned long n ) ;
|
||||
///< Checks the instance counter.
|
||||
} ;
|
||||
|
||||
/// \namespace G
|
||||
namespace G
|
||||
{
|
||||
|
||||
/// \class G::Counter
|
||||
/// An instance counter to help with leak testing.
|
||||
///
|
||||
/// Typically used as a private base class. (Strictly
|
||||
/// this uses the curiously recurring template pattern, but
|
||||
/// it does not do any static_cast<D> downcasting.)
|
||||
///
|
||||
/// Note that the second template parameter (the class name)
|
||||
/// needs a declaration like "extern char FooClassName[]",
|
||||
/// not a string literal.
|
||||
///
|
||||
template <typename D, const char * C>
|
||||
class Counter : private CounterImp
|
||||
{
|
||||
public:
|
||||
Counter() ;
|
||||
///< Constructor.
|
||||
|
||||
~Counter() ;
|
||||
///< Destructor.
|
||||
|
||||
Counter( const Counter<D,C> & ) ;
|
||||
///< Copy constructor.
|
||||
|
||||
void operator=( const Counter<D,C> & ) ;
|
||||
///< Assignment operator.
|
||||
|
||||
private:
|
||||
static unsigned long m_n ;
|
||||
} ;
|
||||
|
||||
template <typename D, const char * C>
|
||||
unsigned long Counter<D,C>::m_n = 0UL ;
|
||||
|
||||
template <typename D, const char * C>
|
||||
Counter<D,C>::Counter()
|
||||
{
|
||||
m_n++ ;
|
||||
check( C , m_n ) ;
|
||||
}
|
||||
|
||||
template <typename D, const char * C>
|
||||
Counter<D,C>::~Counter()
|
||||
{
|
||||
m_n-- ;
|
||||
check( C , m_n ) ;
|
||||
}
|
||||
|
||||
template <typename D, const char * C>
|
||||
Counter<D,C>::Counter( const Counter<D,C> & )
|
||||
{
|
||||
m_n++ ;
|
||||
check( C , m_n ) ;
|
||||
}
|
||||
|
||||
template <typename D, const char * C>
|
||||
void Counter<D,C>::operator=( const Counter<D,C> & )
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file gdaemon.h
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
//
|
||||
// gdaemon_unix.cpp
|
||||
@ -25,14 +22,12 @@
|
||||
#include "gdaemon.h"
|
||||
#include "gprocess.h"
|
||||
|
||||
//static
|
||||
void G::Daemon::detach( PidFile & pid_file )
|
||||
{
|
||||
pid_file.check() ; // absolute path
|
||||
detach() ;
|
||||
}
|
||||
|
||||
//static
|
||||
void G::Daemon::detach()
|
||||
{
|
||||
// see Stevens, ISBN 0-201-563137-7, ch 13.
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
//
|
||||
// gdaemon_win32.cpp
|
||||
@ -25,13 +22,11 @@
|
||||
#include "gdaemon.h"
|
||||
#include "gprocess.h"
|
||||
|
||||
//static
|
||||
void G::Daemon::detach( PidFile & )
|
||||
{
|
||||
detach() ;
|
||||
}
|
||||
|
||||
//static
|
||||
void G::Daemon::detach()
|
||||
{
|
||||
// no-op
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
//
|
||||
// gdate.cpp
|
||||
@ -28,13 +25,11 @@
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
|
||||
//static
|
||||
int G::Date::yearUpperLimit()
|
||||
{
|
||||
return 2035 ; // see mktime()
|
||||
}
|
||||
|
||||
//static
|
||||
int G::Date::yearLowerLimit()
|
||||
{
|
||||
return 1970 ; // see mktime()
|
||||
@ -252,7 +247,6 @@ G::Date & G::Date::operator--()
|
||||
return *this ;
|
||||
}
|
||||
|
||||
//static
|
||||
unsigned int G::Date::lastDay( unsigned int month , unsigned int year )
|
||||
{
|
||||
unsigned int end = 30U ;
|
||||
@ -273,7 +267,6 @@ unsigned int G::Date::lastDay( unsigned int month , unsigned int year )
|
||||
return end ;
|
||||
}
|
||||
|
||||
//static
|
||||
bool G::Date::isLeapYear( unsigned int y )
|
||||
{
|
||||
return y >= 1800U && ( y % 400U == 0U || ( y % 100U != 0U && y % 4U == 0U ) ) ;
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file gdate.h
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
//
|
||||
// gdatetime.cpp
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file gdatetime.h
|
||||
@ -59,10 +56,9 @@ public:
|
||||
///< Converts from epoch time to local broken-down-time.
|
||||
|
||||
static Offset offset( EpochTime epoch_time ) ;
|
||||
///< Returns the offset between UTC and localtime
|
||||
///< as at 'epoch_time'. The returned pair has
|
||||
///< 'first' set to true if localtime is
|
||||
///< ahead of (ie. east of) UTC.
|
||||
///< Returns the offset between UTC and localtime as at
|
||||
///< 'epoch_time'. The returned pair has 'first' set to
|
||||
///< true if localtime is ahead of (ie. east of) UTC.
|
||||
///<
|
||||
///< (Note that this may be a relatively expensive
|
||||
///< operation.)
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
//
|
||||
// gdatetime_unix.cpp
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
//
|
||||
// gdatetime_win32.cpp
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file gdebug.h
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file gdef.h
|
||||
@ -66,10 +63,10 @@
|
||||
/* Check operating-system switches
|
||||
*/
|
||||
#if !defined( G_WIN32 ) && !defined( G_UNIX )
|
||||
#error invalid compilation switches
|
||||
#error invalid compilation switches - define G_WIN32 or G_UNIX
|
||||
#endif
|
||||
#if defined( G_WIN32 ) && defined( G_UNIX )
|
||||
#error invalid compilation switches
|
||||
#error invalid compilation switches - define G_WIN32 or G_UNIX
|
||||
#endif
|
||||
|
||||
/* Define supplementary o/s compilation switches
|
||||
@ -107,8 +104,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Define Windows-style types (only used for
|
||||
* unimplemented declarations under unix)
|
||||
/* Define Windows-style types (only used for unimplemented declarations under unix)
|
||||
*/
|
||||
#if ! defined( G_WINDOWS )
|
||||
typedef unsigned char BOOL ;
|
||||
@ -117,8 +113,7 @@
|
||||
typedef unsigned int HANDLE ;
|
||||
#endif
|
||||
|
||||
/* Include commonly-used system headers (good for
|
||||
* pre-compilation)
|
||||
/* Include commonly-used system headers (good for pre-compilation)
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
#include <cstddef>
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
//
|
||||
// gdirectory.cpp
|
||||
@ -73,4 +70,53 @@ G::Path G::Directory::path() const
|
||||
return m_path ;
|
||||
}
|
||||
|
||||
// ==
|
||||
|
||||
G::DirectoryList::DirectoryList() :
|
||||
m_first(true) ,
|
||||
m_index(0U)
|
||||
{
|
||||
}
|
||||
|
||||
void G::DirectoryList::init( const G::Path & dir , const std::string & wildcard )
|
||||
{
|
||||
Directory directory( dir ) ;
|
||||
DirectoryIterator iter( directory , wildcard ) ;
|
||||
while( iter.more() && !iter.error() )
|
||||
{
|
||||
m_is_dir.push_back( iter.isDir() ) ;
|
||||
m_path.push_back( iter.filePath() ) ;
|
||||
m_name.push_back( iter.fileName() ) ;
|
||||
}
|
||||
}
|
||||
|
||||
bool G::DirectoryList::more()
|
||||
{
|
||||
if( m_first )
|
||||
{
|
||||
m_first = false ;
|
||||
return ! m_is_dir.empty() ;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_index++ ;
|
||||
return m_index < m_is_dir.size() ;
|
||||
}
|
||||
}
|
||||
|
||||
bool G::DirectoryList::isDir() const
|
||||
{
|
||||
return !! m_is_dir.at(m_index) ;
|
||||
}
|
||||
|
||||
G::Path G::DirectoryList::filePath() const
|
||||
{
|
||||
return m_path.at(m_index) ;
|
||||
}
|
||||
|
||||
G::Path G::DirectoryList::fileName() const
|
||||
{
|
||||
return m_name.at(m_index) ;
|
||||
}
|
||||
|
||||
/// \file gdirectory.cpp
|
||||
|
@ -1,11 +1,10 @@
|
||||
//
|
||||
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
|
||||
//
|
||||
// This program 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 of the License, or (at your option) any later
|
||||
// version.
|
||||
// This program 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 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -13,9 +12,7 @@
|
||||
// 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
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
//
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// ===
|
||||
///
|
||||
/// \file gdirectory.h
|
||||
@ -28,6 +25,7 @@
|
||||
#include "gpath.h"
|
||||
#include "gexception.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <sys/types.h>
|
||||
|
||||
/// \namespace G
|
||||
@ -36,6 +34,7 @@ namespace G
|
||||
class DirectoryIteratorImp ;
|
||||
class Directory ;
|
||||
class DirectoryIterator ;
|
||||
class DirectoryList ;
|
||||
}
|
||||
|
||||
/// \class G::Directory
|
||||
@ -59,8 +58,8 @@ public:
|
||||
explicit Directory( const std::string & path ) ;
|
||||
///< Constructor.
|
||||
|
||||
virtual ~Directory() ;
|
||||
///< Virtual destructor.
|
||||
~Directory() ;
|
||||
///< Destructor.
|
||||
|
||||
bool valid( bool for_creating_files = false ) const ;
|
||||
///< Returns true if the object represents a valid
|
||||
@ -83,7 +82,7 @@ public:
|
||||
Directory( const Directory & other ) ;
|
||||
///< Copy constructor.
|
||||
|
||||
Directory &operator=( const Directory & ) ;
|
||||
Directory & operator=( const Directory & ) ;
|
||||
///< Assignment operator.
|
||||
|
||||
static Directory root() ;
|
||||
@ -101,8 +100,7 @@ private:
|
||||
} ;
|
||||
|
||||
/// \class G::DirectoryIterator
|
||||
/// An iterator for Directory.
|
||||
/// The iteration model is
|
||||
/// A Directory iterator. The iteration model is
|
||||
/// \code
|
||||
/// while(iter.more()) { (void)iter.filePath() ; }
|
||||
/// \endcode
|
||||
@ -121,7 +119,7 @@ public:
|
||||
///< Returns true on error. The caller should stop the iteration.
|
||||
|
||||
bool more() ;
|
||||
///< Returns true if more.
|
||||
///< Returns true if more and advances by one.
|
||||
|
||||
bool isDir() const ;
|
||||
///< Returns true if the current item is a directory.
|
||||
@ -141,11 +139,48 @@ public:
|
||||
///< Returns the name of the current item.
|
||||
|
||||
private:
|
||||
DirectoryIterator( const DirectoryIterator & ) ;
|
||||
void operator=( const DirectoryIterator & ) ;
|
||||
DirectoryIterator( const DirectoryIterator & ) ; // not implemented
|
||||
void operator=( const DirectoryIterator & ) ; // not implemented
|
||||
|
||||
private:
|
||||
DirectoryIteratorImp * m_imp ;
|
||||
} ;
|
||||
|
||||
/// \class G::DirectoryList
|
||||
/// A Directory iterator that does all file i/o in one go.
|
||||
///
|
||||
class G::DirectoryList
|
||||
{
|
||||
public:
|
||||
DirectoryList() ;
|
||||
///< Default constructor for an empty list. Initialise with init().
|
||||
|
||||
void init( const Path & dir , const std::string & wc = std::string() ) ;
|
||||
///< An initialiser that is to be used after default construction.
|
||||
///< All file i/o is done in here.
|
||||
|
||||
bool more() ;
|
||||
///< Returns true if more and advances by one.
|
||||
|
||||
bool isDir() const ;
|
||||
///< Returns true if the current item is a directory.
|
||||
|
||||
G::Path filePath() const ;
|
||||
///< Returns the current path.
|
||||
|
||||
G::Path fileName() const ;
|
||||
///< Returns the current filename.
|
||||
|
||||
private:
|
||||
DirectoryList( const DirectoryList & ) ;
|
||||
void operator=( const DirectoryList & ) ;
|
||||
|
||||
private:
|
||||
bool m_first ;
|
||||
unsigned int m_index ;
|
||||
std::vector<int> m_is_dir ;
|
||||
std::vector<G::Path> m_path ;
|
||||
std::vector<G::Path> m_name ;
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|