This commit is contained in:
Graeme Walker 2007-08-27 12:00:00 +00:00
parent ed23b3c747
commit aa8ca77702
437 changed files with 17504 additions and 10194 deletions

846
COPYING
View File

@ -1,285 +1,626 @@
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
Version 2, June 1991 Version 3, 29 June 2007
Copyright (C) 1989, 1991 Free Software Foundation, Inc. Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
Preamble Preamble
The licenses for most software are designed to take away your The GNU General Public License is a free, copyleft license for
freedom to share and change it. By contrast, the GNU General Public software and other kinds of works.
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 The licenses for most software and other practical works are designed
General Public License applies to most of the Free Software to take away your freedom to share and change the works. By contrast,
Foundation's software and to any other program whose authors commit to the GNU General Public License is intended to guarantee your freedom to
using it. (Some other Free Software Foundation software is covered by share and change all versions of a program--to make sure it remains free
the GNU Library General Public License instead.) You can apply it to 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. your programs, too.
When we speak of free software, we are referring to freedom, not When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for 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 them if you wish), that you receive source code or can get it if you
if you want it, that you can change the software or use pieces of it want it, that you can change the software or use pieces of it in new
in new free programs; and that you know you can do these things. free programs, and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid To protect your rights, we need to prevent others from denying you
anyone to deny you these rights or to ask you to surrender the rights. these rights or asking you to surrender the rights. Therefore, you have
These restrictions translate to certain responsibilities for you if you certain responsibilities if you distribute copies of the software, or if
distribute copies of the software, or if you modify it. you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether 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 gratis or for a fee, you must pass on to the recipients the same
you have. You must make sure that they, too, receive or can get the freedoms that you received. You must make sure that they, too, receive
source code. And you must show them these terms so they know their or can get the source code. And you must show them these terms so they
rights. know their rights.
We protect your rights with two steps: (1) copyright the software, and Developers that use the GNU GPL protect your rights with two steps:
(2) offer you this license which gives you legal permission to copy, (1) assert copyright on the software, and (2) offer you this License
distribute and/or modify the software. giving you legal permission to copy, distribute and/or modify it.
Also, for each author's protection and ours, we want to make certain For the developers' and authors' protection, the GPL clearly explains
that everyone understands that there is no warranty for this free that there is no warranty for this free software. For both users' and
software. If the software is modified by someone else and passed on, we authors' sake, the GPL requires that modified versions be marked as
want its recipients to know that what they have is not the original, so changed, so that their problems will not be attributed erroneously to
that any problems introduced by others will not reflect on the original authors of previous versions.
authors' reputations.
Finally, any free program is threatened constantly by software Some devices are designed to deny users access to install or run
patents. We wish to avoid the danger that redistributors of a free modified versions of the software inside them, although the manufacturer
program will individually obtain patent licenses, in effect making the can do so. This is fundamentally incompatible with the aim of
program proprietary. To prevent this, we have made it clear that any protecting users' freedom to change the software. The systematic
patent must be licensed for everyone's free use or not licensed at all. 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 The precise terms and conditions for copying, distribution and
modification follow. 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 TERMS AND CONDITIONS
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".
Activities other than copying, distribution and modification are not 0. Definitions.
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.
1. You may copy and distribute verbatim copies of the Program's "This License" refers to version 3 of the GNU General Public License.
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.
You may charge a fee for the physical act of transferring a copy, and "Copyright" also means copyright-like laws that apply to other kinds of
you may at your option offer warranty protection in exchange for a fee. works, such as semiconductor masks.
2. You may modify your copy or copies of the Program or any portion "The Program" refers to any copyrightable work licensed under this
of it, thus forming a work based on the Program, and copy and License. Each licensee is addressed as "you". "Licensees" and
distribute such modifications or work under the terms of Section 1 "recipients" may be individuals or organizations.
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices To "modify" a work means to copy from or adapt all or part of the work
stating that you changed the files and the date of any change. 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 A "covered work" means either the unmodified Program or a work based
whole or in part contains or is derived from the Program or any on the Program.
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively To "propagate" a work means to do anything with it that, without
when run, you must cause it, when started running for such permission, would make you directly or secondarily liable for
interactive use in the most ordinary way, to print or display an infringement under applicable copyright law, except executing it on a
announcement including an appropriate copyright notice and a computer or modifying a private copy. Propagation includes copying,
notice that there is no warranty (or else, saying that you provide distribution (with or without modification), making available to the
a warranty) and that users may redistribute the program under public, and in some countries other activities as well.
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.
Thus, it is not the intent of this section to claim rights or contest To "convey" a work means any kind of propagation that enables other
your rights to work written entirely by you; rather, the intent is to parties to make or receive copies. Mere interaction with a user through
exercise the right to control the distribution of derivative or a computer network, with no transfer of a copy, is not conveying.
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program An interactive user interface displays "Appropriate Legal Notices"
with the Program (or with a work based on the Program) on a volume of to the extent that it includes a convenient and prominently visible
a storage or distribution medium does not bring the other work under feature that (1) displays an appropriate copyright notice, and (2)
the scope of this License. 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, 1. Source Code.
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:
a) Accompany it with the complete corresponding machine-readable The "source code" for a work means the preferred form of the work
source code, which must be distributed under the terms of Sections for making modifications to it. "Object code" means any non-source
1 and 2 above on a medium customarily used for software interchange; or, form of a work.
b) Accompany it with a written offer, valid for at least three A "Standard Interface" means an interface that either is an official
years, to give any third party, for a charge no more than your standard defined by a recognized standards body, or, in the case of
cost of physically performing source distribution, a complete interfaces specified for a particular programming language, one that
machine-readable copy of the corresponding source code, to be is widely used among developers working in that language.
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer The "System Libraries" of an executable work include anything, other
to distribute corresponding source code. (This alternative is than the work as a whole, that (a) is included in the normal form of
allowed only for noncommercial distribution and only if you packaging a Major Component, but which is not part of that Major
received the program in object code or executable form with such Component, and (b) serves only to enable use of the work with that
an offer, in accord with Subsection b above.) 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 The "Corresponding Source" for a work in object code form means all
making modifications to it. For an executable work, complete source the source code needed to generate, install, and (for an executable
code means all the source code for all modules it contains, plus any work) run the object code and to modify the work, including scripts to
associated interface definition files, plus the scripts used to control those activities. However, it does not include the work's
control compilation and installation of the executable. However, as a System Libraries, or general-purpose tools or generally available free
special exception, the source code distributed need not include programs which are used unmodified in performing those activities but
anything that is normally distributed (in either source or binary which are not part of the work. For example, Corresponding Source
form) with the major components (compiler, kernel, and so on) of the includes interface definition files associated with source files for
operating system on which the executable runs, unless that component the work, and the source code for shared libraries and dynamically
itself accompanies the executable. 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 The Corresponding Source need not include anything that users
access to copy from a designated place, then offering equivalent can regenerate automatically from other parts of the Corresponding
access to copy the source code from the same place counts as Source.
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.
5. You are not required to accept this License, since you have not The Corresponding Source for a work in source code form is that
signed it. However, nothing else grants you permission to modify or same work.
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.
6. Each time you redistribute the Program (or any work based on the 2. Basic Permissions.
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to All rights granted under this License are granted for the term of
these terms and conditions. You may not impose any further copyright on the Program, and are irrevocable provided the stated
restrictions on the recipients' exercise of the rights granted herein. conditions are met. This License explicitly affirms your unlimited
You are not responsible for enforcing compliance by third parties to 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. this License.
7. If, as a consequence of a court judgment or allegation of patent Each contributor grants you a non-exclusive, worldwide, royalty-free
infringement or for any other reason (not limited to patent issues), patent license under the contributor's essential patent claims, to
conditions are imposed on you (whether by court order, agreement or 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 otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot excuse you from the conditions of this License. If you cannot convey a
distribute so as to satisfy simultaneously your obligations under this covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you License and any other pertinent obligations, then as a consequence you may
may not distribute the Program at all. For example, if a patent not convey it at all. For example, if you agree to terms that obligate you
license would not permit royalty-free redistribution of the Program by to collect a royalty for further conveying from those to whom you convey
all those who receive copies directly or indirectly through you, then the Program, the only way you could satisfy both those terms and this
the only way you could satisfy both it and this License would be to License would be to refrain entirely from conveying the Program.
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under 13. Use with the GNU Affero General Public License.
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.
It is not the purpose of this section to induce you to infringe any Notwithstanding any other provision of this License, you have
patents or other property right claims or to contest validity of any permission to link or combine any covered work with a work licensed
such claims; this section has the sole purpose of protecting the under version 3 of the GNU Affero General Public License into a single
integrity of the free software distribution system, which is combined work, and to convey the resulting work. The terms of this
implemented by public license practices. Many people have made License will continue to apply to the part which is the covered work,
generous contributions to the wide range of software distributed but the special requirements of the GNU Affero General Public License,
through that system in reliance on consistent application of that section 13, concerning interaction through a network will apply to the
system; it is up to the author/donor to decide if he or she is willing combination as such.
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to 14. Revised Versions of this License.
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.
9. The Free Software Foundation may publish revised and/or new versions The Free Software Foundation may publish revised and/or new versions of
of the General Public License from time to time. Such new versions will 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 be similar in spirit to the present version, but may differ in detail to
address new problems or concerns. address new problems or concerns.
Each version is given a distinguishing version number. If the Program Each version is given a distinguishing version number. If the
specifies a version number of this License which applies to it and "any Program specifies that a certain numbered version of the GNU General
later version", you have the option of following the terms and conditions Public License "or any later version" applies to it, you have the
either of that version or of any later version published by the Free option of following the terms and conditions either of that numbered
Software Foundation. If the Program does not specify a version number of version or of any later version published by the Free Software
this License, you may choose any version ever published by the Free Software Foundation. If the Program does not specify a version number of the
Foundation. 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 If the Program specifies that a proxy can decide which future
programs whose distribution conditions are different, write to the author versions of the GNU General Public License can be used, that proxy's
to ask for permission. For software which is copyrighted by the Free public statement of acceptance of a version permanently authorizes you
Software Foundation, write to the Free Software Foundation; we sometimes to choose that version for the Program.
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.
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 15. Disclaimer of 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.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS 16. Limitation of Liability.
How to Apply These Terms to Your New Programs 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 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 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 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 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. 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.> <one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author> 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 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. (at your option) any later version.
This program is distributed in the hope that it will be useful, 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. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program. If not, see <http://www.gnu.org/licenses/>.
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail. 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 If the program does terminal interaction, make it output a short
when it starts in an interactive mode: notice like this when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author <program> Copyright (C) <year> <name of author>
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details. under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate 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 parts of the General Public License. Of course, your program's commands
be called something other than `show w' and `show c'; they could even be might be different; for a GUI interface, you would use an "about box".
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your You should also get your employer (if you work as a programmer) or school,
school, if any, to sign a "copyright disclaimer" for the program, if if any, to sign a "copyright disclaimer" for the program, if necessary.
necessary. Here is a sample; alter the names: 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 The GNU General Public License does not permit incorporating your program
`Gnomovision' (which makes passes at compilers) written by James Hacker. 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.

View File

@ -1,6 +1,26 @@
E-MailRelay Change Log 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 1.4 -> 1.5
---------- ----------
* New installation and configuration GUI using TrollTech Qt 4.x ("./configure --enable-gui") * New installation and configuration GUI using TrollTech Qt 4.x ("./configure --enable-gui")

39
INSTALL
View File

@ -1,31 +1,34 @@
Introduction 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 installation instructions for doing a GNU-style
"./configure; make; sudo make install" installation from source under Linux, "./configure; make; sudo make install" installation from source under Linux,
FreeBSD etc. The Windows installation instructions are in a separate document, FreeBSD etc. Windows specific installation instructions are in a separate
"doc/windows.txt". document, "doc/windows.txt".
The E-MailRelay "configure" script provides a few extra confiruation The E-MailRelay "configure" script provides a few extra confiruation switches,
switches, which are shown in the output of "./configure --help". The which are shown in the output of "./configure --help". The most important of
most important of these is "--enable-fhs", which overrides all other these is "--enable-fhs", which overrides all other directory modifiers, forcing
directory modifiers, forcing compliance with the File Hierarchy compliance with the File Hierarchy Standard.
Standard.
There are also a set of variables which can be defined on the There are also a set of variables which can be defined on the "configure"
"configure" command line for controlling all the installation command line for controlling all the installation directories in more detail,
directories in more detail, augmenting the standard command-line augmenting the standard command-line switches like "--sbindir" and
switches like "--sbindir" and "--libexecdir". For more information "--libexecdir". For more information refer to the E-MailRelay reference document
refer to the E-MailRelay reference document under "Files and directories". under "Files and directories".
If compiling with something other than "gcc" then check for any If compiling with something other than "gcc" then check for any
compiler-specific help in the relevant lib/<compiler> directory. compiler-specific help in the relevant "lib/<compiler>" directory.
The E-MailRelay user guide describes what needs to be done after the If you want to install a package rather than running "make install" you could
"make install" in order to get the emailrelay daemon to start up at boot-time, try building an RPM pacakge with "rpmbuild" using the RPM spec file provided in
automatically forward e-mail and bounce failed mail. You could also try running the distribution, and if necessary then making a ".deb" package from that using
the configuration GUI program, "emailrelay-gui", if available. "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 Basic Installation
================== ==================

View File

@ -1,11 +1,10 @@
# #
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> ## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
## ##
## This program is free software; you can redistribute it and/or ## This program is free software: you can redistribute it and/or modify
## modify it under the terms of the GNU General Public License ## it under the terms of the GNU General Public License as published by
## as published by the Free Software Foundation; either ## the Free Software Foundation, either version 3 of the License, or
## version 2 of the License, or (at your option) any later ## (at your option) any later version.
## version.
## ##
## This program is distributed in the hope that it will be useful, ## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of ## but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,15 +12,10 @@
## GNU General Public License for more details. ## GNU General Public License for more details.
## ##
## You should have received a copy of the GNU General Public License ## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software ## along with this program. If not, see <http://www.gnu.org/licenses/>.
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
# #
EXTRA_DIST = emailrelay.spec ChangeLog EXTRA_DIST = emailrelay.spec ChangeLog README.windows
SUBDIRS = src bin lib etc doc SUBDIRS = src bin lib etc doc test
e_doc_DATA = NEWS README changelog.gz e_doc_DATA = NEWS README ChangeLog
CLEANFILES = changelog.gz
changelog.gz: ChangeLog
if test -n "$(GZIP)" ; then $(GZIP) -c $(top_srcdir)/ChangeLog > changelog.tmp && mv changelog.tmp changelog.gz ; fi
uninstall-local: uninstall-local:
-rmdir $(DESTDIR)$(e_docdir) 2>/dev/null -rmdir $(DESTDIR)$(e_docdir) 2>/dev/null

View File

@ -131,7 +131,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@
POPLIB = @POPLIB@
QT_CFLAGS = @QT_CFLAGS@ QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@ QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
@ -160,8 +159,10 @@ dvidir = @dvidir@
e_docdir = @e_docdir@ e_docdir = @e_docdir@
e_examplesdir = @e_examplesdir@ e_examplesdir = @e_examplesdir@
e_initdir = @e_initdir@ e_initdir = @e_initdir@
e_libexecdir = @e_libexecdir@
e_qtmoc = @e_qtmoc@ e_qtmoc = @e_qtmoc@
e_spooldir = @e_spooldir@ e_spooldir = @e_spooldir@
e_sysconfdir = @e_sysconfdir@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
host_alias = @host_alias@ host_alias = @host_alias@
htmldir = @htmldir@ htmldir = @htmldir@
@ -189,10 +190,9 @@ top_srcdir = @top_srcdir@
# #
# #
EXTRA_DIST = emailrelay.spec ChangeLog EXTRA_DIST = emailrelay.spec ChangeLog README.windows
SUBDIRS = src bin lib etc doc SUBDIRS = src bin lib etc doc test
e_doc_DATA = NEWS README changelog.gz e_doc_DATA = NEWS README ChangeLog
CLEANFILES = changelog.gz
all: config.h all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive $(MAKE) $(AM_MAKEFLAGS) all-recursive
@ -563,7 +563,6 @@ install-strip:
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic: distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -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 \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
uninstall-e_docDATA uninstall-local 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: uninstall-local:
-rmdir $(DESTDIR)$(e_docdir) 2>/dev/null -rmdir $(DESTDIR)$(e_docdir) 2>/dev/null
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.

10
README
View File

@ -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 messages are stored in a local spool directory, and then forwarded to the next
SMTP server on request. 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 only requiring the address of the target SMTP server to be put on the command
line. 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. automatically dropped into several independent POP3 mailboxes.
C++ source code is available for Linux, FreeBSD, MacOS X etc, and Windows. 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 Quick start
----------- -----------
@ -86,9 +86,9 @@ Source code documentation will be generated when building from source if
Configurations Configurations
-------------- --------------
Recent releases were developed on Ubuntu Linux 7.04 using: Recent releases were developed on Ubuntu Linux 7.10 using:
* linux 2.6.20 * linux 2.6.22
* gcc 4.1.2 * gcc 4.1.3
* autoconf 2.61 * autoconf 2.61
and on Windows NT4 SP6 using: and on Windows NT4 SP6 using:

1
README.windows Normal file
View File

@ -0,0 +1 @@
See doc/windows.txt

View File

@ -1,10 +1,9 @@
dnl Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> dnl Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
dnl dnl
dnl This program is free software; you can redistribute it and/or dnl This program is free software: you can redistribute it and/or modify
dnl modify it under the terms of the GNU General Public License dnl it under the terms of the GNU General Public License as published by
dnl as published by the Free Software Foundation; either dnl the Free Software Foundation, either version 3 of the License, or
dnl version 2 of the License, or (at your option) any later dnl (at your option) any later version.
dnl version.
dnl dnl
dnl This program is distributed in the hope that it will be useful, dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 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 GNU General Public License for more details.
dnl dnl
dnl You should have received a copy of the GNU General Public License 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 along with this program. If not, see <http://www.gnu.org/licenses/>.
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dnl
dnl === dnl ===
dnl socketlen_t dnl socketlen_t
@ -31,9 +28,9 @@ AC_DEFUN([ACLOCAL_TYPE_SOCKLEN_T],
aclocal_cv_type_socklen_t=no ) aclocal_cv_type_socklen_t=no )
]) ])
if test $aclocal_cv_type_socklen_t = yes; then 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 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 fi
]) ])
@ -52,9 +49,9 @@ AC_DEFUN([ACLOCAL_CHECK_IPV6],
aclocal_cv_ipv6=no ) aclocal_cv_ipv6=no )
]) ])
if test $aclocal_cv_ipv6 = yes; then 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 else
AC_DEFINE(HAVE_IPV6,0,[Define if ipv6 is available]) AC_DEFINE(HAVE_IPV6,0,[Define to 1 if ipv6 is available])
fi fi
]) ])
@ -74,9 +71,9 @@ AC_DEFUN([ACLOCAL_CHECK_GETIPNODEBYNAME],
aclocal_cv_getipnodebyname=no ) aclocal_cv_getipnodebyname=no )
]) ])
if test $aclocal_cv_getipnodebyname = yes; then 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 else
AC_DEFINE(HAVE_GETIPNODEBYNAME,0,[Define if getipnodebyname() is available]) AC_DEFINE(HAVE_GETIPNODEBYNAME,0,[Define to 1 if getipnodebyname() is available])
fi fi
]) ])
@ -94,9 +91,9 @@ AC_DEFUN([ACLOCAL_CHECK_SIN6_LEN],
aclocal_cv_sin6_len=no ) aclocal_cv_sin6_len=no )
]) ])
if test $aclocal_cv_sin6_len = yes; then 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 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 fi
]) ])
@ -114,9 +111,9 @@ AC_DEFUN([ACLOCAL_CHECK_SETGROUPS],
aclocal_cv_setgroups=no ) aclocal_cv_setgroups=no )
]) ])
if test $aclocal_cv_setgroups = yes; then 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 else
AC_DEFINE(HAVE_SETGROUPS,0,[Define if setgroups is available]) AC_DEFINE(HAVE_SETGROUPS,0,[Define to 1 if setgroups is available])
fi fi
]) ])
@ -132,9 +129,9 @@ AC_DEFUN([ACLOCAL_CHECK_GMTIME_R],
aclocal_cv_gmtime_r=no ) aclocal_cv_gmtime_r=no )
]) ])
if test $aclocal_cv_gmtime_r = yes; then 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 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 fi
]) ])
@ -150,9 +147,9 @@ AC_DEFUN([ACLOCAL_CHECK_LOCALTIME_R],
aclocal_cv_localtime_r=no ) aclocal_cv_localtime_r=no )
]) ])
if test $aclocal_cv_localtime_r = yes; then 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 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 fi
]) ])
@ -170,9 +167,9 @@ AC_DEFUN([ACLOCAL_CHECK_BUGGY_CTIME],
aclocal_cv_buggy_ctime=yes ) aclocal_cv_buggy_ctime=yes )
]) ])
if test $aclocal_cv_buggy_ctime = yes; then 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 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 fi
]) ])
@ -210,7 +207,7 @@ qt4="no"
qt4moc="no" qt4moc="no"
if test "$enable_gui" = "no" if test "$enable_gui" = "no"
then then
AC_DEFINE(HAVE_GUI,0,[Define to enable gui code]) AC_DEFINE(HAVE_GUI,0,[Define to 1 to enable gui code])
else else
PKG_CHECK_MODULES(QT,QtGui >= 4.0.1,[qt4=yes],[AC_MSG_RESULT([no])]) PKG_CHECK_MODULES(QT,QtGui >= 4.0.1,[qt4=yes],[AC_MSG_RESULT([no])])
if test "$qt4" = "yes" if test "$qt4" = "yes"
@ -232,27 +229,14 @@ else
fi fi
if test "$qt4moc" = "yes" if test "$qt4moc" = "yes"
then then
AC_DEFINE(HAVE_GUI,1,[Define to enable gui code]) AC_DEFINE(HAVE_GUI,1,[Define to 1 to enable gui code])
else else
AC_DEFINE(HAVE_GUI,0,[Define to enable gui code]) AC_DEFINE(HAVE_GUI,0,[Define to 1 to enable gui code])
fi fi
AC_SUBST(MOC) AC_SUBST(MOC)
AM_CONDITIONAL(GUI,test x$enable_gui != xno -a x$qt4moc = xyes ) 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 enable-ipv6
dnl dnl
AC_DEFUN([ENABLE_IPV6], AC_DEFUN([ENABLE_IPV6],
@ -351,13 +335,11 @@ AC_DEFUN([FHS_COMPLIANCE],
#infodir= #infodir=
# #
# emailrelay-specific # emailrelay-specific
e_sbindir="$sbindir"
e_libexecdir="$libexecdir/$PACKAGE" e_libexecdir="$libexecdir/$PACKAGE"
e_docdir="$datadir/doc/$PACKAGE" e_docdir="$datadir/doc/$PACKAGE"
e_initdir="/etc/init.d" e_initdir="/etc/init.d"
e_spooldir="$localstatedir/spool/$PACKAGE" e_spooldir="$localstatedir/spool/$PACKAGE"
e_man1dir="$datadir/man/man1" e_examplesdir="$libexecdir/$PACKAGE/examples"
e_examplesdir="$datadir/doc/$PACKAGE/examples"
e_sysconfdir="$sysconfdir" e_sysconfdir="$sysconfdir"
]) ])

2
aclocal.m4 vendored
View File

@ -164,7 +164,7 @@ path to pkg-config.
_PKG_TEXT _PKG_TEXT
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])], To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
[$4]) [$4])
else else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS

View File

@ -1,11 +1,10 @@
# #
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> ## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
## ##
## This program is free software; you can redistribute it and/or ## This program is free software: you can redistribute it and/or modify
## modify it under the terms of the GNU General Public License ## it under the terms of the GNU General Public License as published by
## as published by the Free Software Foundation; either ## the Free Software Foundation, either version 3 of the License, or
## version 2 of the License, or (at your option) any later ## (at your option) any later version.
## version.
## ##
## This program is distributed in the hope that it will be useful, ## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of ## but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,26 +12,21 @@
## GNU General Public License for more details. ## GNU General Public License for more details.
## ##
## You should have received a copy of the GNU General Public License ## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software ## along with this program. If not, see <http://www.gnu.org/licenses/>.
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
# #
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_ 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_
noinst_cleanup = emailrelay-test.sh emailrelay-soak.sh work_scripts = txt2mu.sh mu2html.sh mu2docbook.sh expand.sh txt2html.sh emailrelay.sh
noinst_SCRIPTS = emailrelay-test.sh emailrelay-soak.sh emailrelay-runperl.js emailrelay-resubmit.js noinst_SCRIPTS = emailrelay-runperl.js emailrelay-resubmit.js $(work_scripts)
e_init_SCRIPTS = emailrelay e_init_SCRIPTS = emailrelay
e_examples_DATA = emailrelay-process.sh emailrelay-notify.sh emailrelay-deliver.sh emailrelay-resubmit.sh emailrelay-submit.sh 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) CLEANFILES = $(e_init_SCRIPTS) $(e_examples_DATA) $(work_scripts)
TESTS = emailrelay-test.sh
SUFFIXES = .sh_ .sh SUFFIXES = .sh_ .sh
.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 chmod ugo+x $*.sh
emailrelay: emailrelay.sh emailrelay: emailrelay.sh

View File

@ -111,7 +111,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@
POPLIB = @POPLIB@
QT_CFLAGS = @QT_CFLAGS@ QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@ QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
@ -140,8 +139,10 @@ dvidir = @dvidir@
e_docdir = @e_docdir@ e_docdir = @e_docdir@
e_examplesdir = @e_examplesdir@ e_examplesdir = @e_examplesdir@
e_initdir = @e_initdir@ e_initdir = @e_initdir@
e_libexecdir = @e_libexecdir@
e_qtmoc = @e_qtmoc@ e_qtmoc = @e_qtmoc@
e_spooldir = @e_spooldir@ e_spooldir = @e_spooldir@
e_sysconfdir = @e_sysconfdir@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
host_alias = @host_alias@ host_alias = @host_alias@
htmldir = @htmldir@ htmldir = @htmldir@
@ -166,14 +167,12 @@ sysconfdir = @sysconfdir@
target_alias = @target_alias@ target_alias = @target_alias@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ 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_ 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_
noinst_cleanup = emailrelay-test.sh emailrelay-soak.sh work_scripts = txt2mu.sh mu2html.sh mu2docbook.sh expand.sh txt2html.sh emailrelay.sh
noinst_SCRIPTS = emailrelay-test.sh emailrelay-soak.sh emailrelay-runperl.js emailrelay-resubmit.js noinst_SCRIPTS = emailrelay-runperl.js emailrelay-resubmit.js $(work_scripts)
e_init_SCRIPTS = emailrelay e_init_SCRIPTS = emailrelay
e_examples_DATA = emailrelay-process.sh emailrelay-notify.sh emailrelay-deliver.sh emailrelay-resubmit.sh emailrelay-submit.sh 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 = $(e_init_SCRIPTS) $(e_examples_DATA) $(work_scripts)
CLEANFILES = $(noinst_cleanup) $(e_init_SCRIPTS) $(e_examples_DATA) $(work_scripts)
TESTS = emailrelay-test.sh
SUFFIXES = .sh_ .sh SUFFIXES = .sh_ .sh
all: all-am all: all-am
@ -251,79 +250,6 @@ ctags: 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) distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@ -351,7 +277,6 @@ distdir: $(DISTFILES)
fi; \ fi; \
done done
check-am: all-am check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am check: check-am
all-am: Makefile $(SCRIPTS) $(DATA) all-am: Makefile $(SCRIPTS) $(DATA)
installdirs: installdirs:
@ -441,9 +366,9 @@ uninstall-am: uninstall-e_examplesDATA uninstall-e_initSCRIPTS \
.MAKE: install-am install-strip .MAKE: install-am install-strip
.PHONY: all all-am check check-TESTS check-am clean clean-generic \ .PHONY: all all-am check check-am clean clean-generic distclean \
distclean distclean-generic distdir dvi dvi-am html html-am \ distclean-generic distdir dvi dvi-am html html-am info info-am \
info info-am install install-am install-data install-data-am \ install install-am install-data install-data-am \
install-data-local install-dvi install-dvi-am \ install-data-local install-dvi install-dvi-am \
install-e_examplesDATA install-e_initSCRIPTS install-exec \ install-e_examplesDATA install-e_initSCRIPTS install-exec \
install-exec-am install-html install-html-am install-info \ install-exec-am install-html install-html-am install-info \
@ -457,7 +382,7 @@ uninstall-am: uninstall-e_examplesDATA uninstall-e_initSCRIPTS \
.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 chmod ugo+x $*.sh
emailrelay: emailrelay.sh emailrelay: emailrelay.sh

View File

@ -2,11 +2,10 @@
# #
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> # Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# #
# This program is free software; you can redistribute it and/or # This program is free software: you can redistribute it and/or modify
# modify it under the terms of the GNU General Public License # it under the terms of the GNU General Public License as published by
# as published by the Free Software Foundation; either # the Free Software Foundation, either version 3 of the License, or
# version 2 of the License, or (at your option) any later # (at your option) any later version.
# version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -14,9 +13,7 @@
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program. If not, see <http://www.gnu.org/licenses/>.
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# === # ===
# #
# emailrelay-deliver.sh # emailrelay-deliver.sh

View File

@ -2,11 +2,10 @@
# #
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> # Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# #
# This program is free software; you can redistribute it and/or # This program is free software: you can redistribute it and/or modify
# modify it under the terms of the GNU General Public License # it under the terms of the GNU General Public License as published by
# as published by the Free Software Foundation; either # the Free Software Foundation, either version 3 of the License, or
# version 2 of the License, or (at your option) any later # (at your option) any later version.
# version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -14,9 +13,7 @@
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program. If not, see <http://www.gnu.org/licenses/>.
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# === # ===
# #
# emailrelay-notify.sh # emailrelay-notify.sh

View File

@ -2,11 +2,10 @@
# #
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> # Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# #
# This program is free software; you can redistribute it and/or # This program is free software: you can redistribute it and/or modify
# modify it under the terms of the GNU General Public License # it under the terms of the GNU General Public License as published by
# as published by the Free Software Foundation; either # the Free Software Foundation, either version 3 of the License, or
# version 2 of the License, or (at your option) any later # (at your option) any later version.
# version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -14,9 +13,7 @@
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program. If not, see <http://www.gnu.org/licenses/>.
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# === # ===
# #
# emailrelay-process.sh # emailrelay-process.sh

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
/// ///
/// \file emailrelay-resubmit.js /// \file emailrelay-resubmit.js

View File

@ -2,11 +2,10 @@
# #
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> # Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# #
# This program is free software; you can redistribute it and/or # This program is free software: you can redistribute it and/or modify
# modify it under the terms of the GNU General Public License # it under the terms of the GNU General Public License as published by
# as published by the Free Software Foundation; either # the Free Software Foundation, either version 3 of the License, or
# version 2 of the License, or (at your option) any later # (at your option) any later version.
# version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -14,9 +13,7 @@
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program. If not, see <http://www.gnu.org/licenses/>.
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# === # ===
# #
# emailrelay-resubmit.sh # emailrelay-resubmit.sh

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
/// ///
/// \file emailrelay-runperl.js /// \file emailrelay-runperl.js

View File

@ -2,11 +2,10 @@
# #
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> # Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# #
# This program is free software; you can redistribute it and/or # This program is free software: you can redistribute it and/or modify
# modify it under the terms of the GNU General Public License # it under the terms of the GNU General Public License as published by
# as published by the Free Software Foundation; either # the Free Software Foundation, either version 3 of the License, or
# version 2 of the License, or (at your option) any later # (at your option) any later version.
# version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -14,9 +13,7 @@
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program. If not, see <http://www.gnu.org/licenses/>.
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# === # ===
# #
# emailrelay-submit.sh # emailrelay-submit.sh

View File

@ -2,11 +2,10 @@
# #
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> # Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# #
# This program is free software; you can redistribute it and/or # This program is free software: you can redistribute it and/or modify
# modify it under the terms of the GNU General Public License # it under the terms of the GNU General Public License as published by
# as published by the Free Software Foundation; either # the Free Software Foundation, either version 3 of the License, or
# version 2 of the License, or (at your option) any later # (at your option) any later version.
# version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -14,9 +13,7 @@
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program. If not, see <http://www.gnu.org/licenses/>.
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# === # ===
# #
# emailrelay # emailrelay
@ -35,45 +32,22 @@
# insserv (suse), /usr/share/doc/initscripts*/sysvinitfiles (redhat) # 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... # 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 ### BEGIN INIT INFO
# Provides: emailrelay # Provides: emailrelay
# Required-Start: $network # Required-Start: $network
# Required-Stop: $network # Required-Stop: $network
# Default-Start: 345 3 4 5 # Default-Start: 3 4 5
# Default-Stop: 345 3 4 5 # Default-Stop: 3 4 5
# Description: E-MailRelay SMTP proxy and store-and-forward MTA. # Description: E-MailRelay SMTP proxy and store-and-forward MTA.
### END INIT INFO ### END INIT INFO
## ##
# choose an infrastructure style # choose an infrastructure style
# #
if test -f /etc/rc.status if test -f /lib/lsb/init-functions
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
then then
style="lsb" style="lsb"
. /lib/lsb/init-functions . /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_reset()
{ {
lsb_errno="0" lsb_errno="0"

View File

@ -2,11 +2,10 @@
# #
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> # Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# #
# This program is free software; you can redistribute it and/or # This program is free software: you can redistribute it and/or modify
# modify it under the terms of the GNU General Public License # it under the terms of the GNU General Public License as published by
# as published by the Free Software Foundation; either # the Free Software Foundation, either version 3 of the License, or
# version 2 of the License, or (at your option) any later # (at your option) any later version.
# version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -14,9 +13,7 @@
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program. If not, see <http://www.gnu.org/licenses/>.
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# === # ===
# #
# expand.sh # expand.sh

View File

@ -2,11 +2,10 @@
# #
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> # Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# #
# This program is free software; you can redistribute it and/or # This program is free software: you can redistribute it and/or modify
# modify it under the terms of the GNU General Public License # it under the terms of the GNU General Public License as published by
# as published by the Free Software Foundation; either # the Free Software Foundation, either version 3 of the License, or
# version 2 of the License, or (at your option) any later # (at your option) any later version.
# version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -14,9 +13,7 @@
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program. If not, see <http://www.gnu.org/licenses/>.
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# === # ===
# #
# mu2docbook.sh # mu2docbook.sh

View File

@ -2,11 +2,10 @@
# #
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> # Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# #
# This program is free software; you can redistribute it and/or # This program is free software: you can redistribute it and/or modify
# modify it under the terms of the GNU General Public License # it under the terms of the GNU General Public License as published by
# as published by the Free Software Foundation; either # the Free Software Foundation, either version 3 of the License, or
# version 2 of the License, or (at your option) any later # (at your option) any later version.
# version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -14,9 +13,7 @@
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program. If not, see <http://www.gnu.org/licenses/>.
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# === # ===
# #
# mu2html.sh # mu2html.sh

View File

@ -2,11 +2,10 @@
# #
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> # Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# #
# This program is free software; you can redistribute it and/or # This program is free software: you can redistribute it and/or modify
# modify it under the terms of the GNU General Public License # it under the terms of the GNU General Public License as published by
# as published by the Free Software Foundation; either # the Free Software Foundation, either version 3 of the License, or
# version 2 of the License, or (at your option) any later # (at your option) any later version.
# version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -14,9 +13,7 @@
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program. If not, see <http://www.gnu.org/licenses/>.
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# === # ===
# #
# txt2html.sh # txt2html.sh

View File

@ -2,11 +2,10 @@
# #
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> # Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# #
# This program is free software; you can redistribute it and/or # This program is free software: you can redistribute it and/or modify
# modify it under the terms of the GNU General Public License # it under the terms of the GNU General Public License as published by
# as published by the Free Software Foundation; either # the Free Software Foundation, either version 3 of the License, or
# version 2 of the License, or (at your option) any later # (at your option) any later version.
# version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -14,9 +13,7 @@
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program. If not, see <http://www.gnu.org/licenses/>.
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# === # ===
# #
# txt2mu.sh # txt2mu.sh

View File

@ -1,31 +1,31 @@
/* config.h.in. Generated from configure.ac by autoheader. */ /* 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 #undef HAVE_BUGGY_CTIME
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/ */
#undef HAVE_DIRENT_H #undef HAVE_DIRENT_H
/* Define if getipnodebyname() is available */ /* Define to 1 if getipnodebyname() is available */
#undef HAVE_GETIPNODEBYNAME #undef HAVE_GETIPNODEBYNAME
/* Define to 1 if you have the `glob' function. */ /* Define to 1 if you have the `glob' function. */
#undef HAVE_GLOB #undef HAVE_GLOB
/* Define if gmtime_r in time.h */ /* Define to 1 if gmtime_r in time.h */
#undef HAVE_GMTIME_R #undef HAVE_GMTIME_R
/* Define to enable gui code */ /* Define to 1 to enable gui code */
#undef HAVE_GUI #undef HAVE_GUI
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H #undef HAVE_INTTYPES_H
/* Define if ipv6 is available */ /* Define to 1 if ipv6 is available */
#undef HAVE_IPV6 #undef HAVE_IPV6
/* Define if localtime_r in time.h */ /* Define to 1 if localtime_r in time.h */
#undef HAVE_LOCALTIME_R #undef HAVE_LOCALTIME_R
/* Define to 1 if you have the <memory.h> header file. */ /* 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'. */ /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H #undef HAVE_NDIR_H
/* Define if setgroups is available */ /* Define to 1 if setgroups is available */
#undef HAVE_SETGROUPS #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 #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 #undef HAVE_SOCKLEN_T
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */

48
configure vendored
View File

@ -708,7 +708,6 @@ COMPILER_VERSION
CPP CPP
EGREP EGREP
PKG_CONFIG PKG_CONFIG
POPLIB
IP IP
QT_CFLAGS QT_CFLAGS
QT_LIBS QT_LIBS
@ -719,6 +718,8 @@ e_docdir
e_initdir e_initdir
e_spooldir e_spooldir
e_examplesdir e_examplesdir
e_libexecdir
e_sysconfdir
e_qtmoc e_qtmoc
LIBOBJS LIBOBJS
LTLIBOBJS' LTLIBOBJS'
@ -1317,7 +1318,6 @@ Optional Features:
--enable-dependency-tracking do not reject slow dependency extractors --enable-dependency-tracking do not reject slow dependency extractors
--enable-debug enable extra debug messages at compile-time (default --enable-debug enable extra debug messages at compile-time (default
disabled) disabled)
--enable-pop enable pop server code (default enabled)
--enable-ipv6 enable ipv6 (default disabled) --enable-ipv6 enable ipv6 (default disabled)
--enable-gui enable configuration gui (requires Qt4) (default --enable-gui enable configuration gui (requires Qt4) (default
auto) auto)
@ -2108,7 +2108,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE=emailrelay PACKAGE=emailrelay
VERSION=1.5 VERSION=1.6
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@ -6656,21 +6656,6 @@ _ACEOF
fi 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. # Check whether --enable-ipv6 was given.
if test "${enable_ipv6+set}" = set; then if test "${enable_ipv6+set}" = set; then
enableval=$enable_ipv6; enableval=$enable_ipv6;
@ -6927,13 +6912,18 @@ if test "${enable_fhs+set}" = set; then
fi fi
if test "$e_docdir" = "" ; then e_docdir="$docdir" ; fi
if test "$e_docdir" = "" ; then e_docdir="$datadir/$PACKAGE/doc" ; 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 if test "$e_qtmoc" = "" ; then e_qtmoc="moc" ; fi
@ -6961,21 +6951,17 @@ then
#infodir= #infodir=
# #
# emailrelay-specific # emailrelay-specific
e_sbindir="$sbindir"
e_libexecdir="$libexecdir/$PACKAGE" e_libexecdir="$libexecdir/$PACKAGE"
e_docdir="$datadir/doc/$PACKAGE" e_docdir="$datadir/doc/$PACKAGE"
e_initdir="/etc/init.d" e_initdir="/etc/init.d"
e_spooldir="$localstatedir/spool/$PACKAGE" e_spooldir="$localstatedir/spool/$PACKAGE"
e_man1dir="$datadir/man/man1" e_examplesdir="$libexecdir/$PACKAGE/examples"
e_examplesdir="$datadir/doc/$PACKAGE/examples"
e_sysconfdir="$sysconfdir" e_sysconfdir="$sysconfdir"
fi 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 test/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"
cat >confcache <<\_ACEOF cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure # 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" ;; "bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;;
"doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/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:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;} echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
@ -7750,8 +7737,8 @@ COMPILER_VERSION!$COMPILER_VERSION$ac_delim
CPP!$CPP$ac_delim CPP!$CPP$ac_delim
EGREP!$EGREP$ac_delim EGREP!$EGREP$ac_delim
PKG_CONFIG!$PKG_CONFIG$ac_delim PKG_CONFIG!$PKG_CONFIG$ac_delim
POPLIB!$POPLIB$ac_delim
IP!$IP$ac_delim IP!$IP$ac_delim
QT_CFLAGS!$QT_CFLAGS$ac_delim
_ACEOF _ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@ -7793,7 +7780,6 @@ _ACEOF
ac_delim='%!_!# ' ac_delim='%!_!# '
for ac_last_try in false false false false false :; do for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF cat >conf$$subs.sed <<_ACEOF
QT_CFLAGS!$QT_CFLAGS$ac_delim
QT_LIBS!$QT_LIBS$ac_delim QT_LIBS!$QT_LIBS$ac_delim
MOC!$MOC$ac_delim MOC!$MOC$ac_delim
GUI_TRUE!$GUI_TRUE$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_initdir!$e_initdir$ac_delim
e_spooldir!$e_spooldir$ac_delim e_spooldir!$e_spooldir$ac_delim
e_examplesdir!$e_examplesdir$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 e_qtmoc!$e_qtmoc$ac_delim
LIBOBJS!$LIBOBJS$ac_delim LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF _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 break
elif $ac_last_try; then elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

View File

@ -1,10 +1,9 @@
dnl Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> dnl Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
dnl dnl
dnl This program is free software; you can redistribute it and/or dnl This program is free software: you can redistribute it and/or modify
dnl modify it under the terms of the GNU General Public License dnl it under the terms of the GNU General Public License as published by
dnl as published by the Free Software Foundation; either dnl the Free Software Foundation, either version 3 of the License, or
dnl version 2 of the License, or (at your option) any later dnl (at your option) any later version.
dnl version.
dnl dnl
dnl This program is distributed in the hope that it will be useful, dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 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 GNU General Public License for more details.
dnl dnl
dnl You should have received a copy of the GNU General Public License 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 along with this program. If not, see <http://www.gnu.org/licenses/>.
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dnl
dnl === dnl ===
dnl dnl
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
dnl dnl
AC_INIT(src/gsmtp/gsmtp.h) AC_INIT(src/gsmtp/gsmtp.h)
AM_INIT_AUTOMAKE(emailrelay,1.5) AM_INIT_AUTOMAKE(emailrelay,1.6)
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE 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)])) AC_ARG_ENABLE(debug,AC_HELP_STRING([--enable-debug],[enable extra debug messages at compile-time (default disabled)]))
ENABLE_DEBUG 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 ===
dnl "--enable-ipv6" dnl "--enable-ipv6"
dnl dnl
@ -119,27 +110,30 @@ WITH_MAN2HTML
dnl === dnl ===
dnl directory tweaking and "--enable-fhs" ... dnl directory tweaking and "--enable-fhs" ...
dnl 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]) 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_ARG_ENABLE(fhs,AC_HELP_STRING([--enable-fhs],[force FHS-compliant directories, ignoring --prefix etc (default disabled)]))
AC_SUBST(e_docdir) AC_SUBST(e_docdir)
if test "$e_docdir" = "" ; then e_docdir="$docdir" ; fi
if test "$e_docdir" = "" ; then e_docdir="$datadir/$PACKAGE/doc" ; fi if test "$e_docdir" = "" ; then e_docdir="$datadir/$PACKAGE/doc" ; fi
AC_SUBST(e_initdir) 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) 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) 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) AC_SUBST(e_qtmoc)
if test "$e_qtmoc" = "" ; then e_qtmoc="moc" ; fi if test "$e_qtmoc" = "" ; then e_qtmoc="moc" ; fi
ENABLE_FHS ENABLE_FHS
dnl ===
dnl attempt to fix recursive makes where make is gmake -- may break something else
dnl
SET_MAKE=""
dnl === dnl ===
dnl generate files... dnl generate files...
dnl 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)

View File

@ -1,11 +1,10 @@
# #
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> ## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
## ##
## This program is free software; you can redistribute it and/or ## This program is free software: you can redistribute it and/or modify
## modify it under the terms of the GNU General Public License ## it under the terms of the GNU General Public License as published by
## as published by the Free Software Foundation; either ## the Free Software Foundation, either version 3 of the License, or
## version 2 of the License, or (at your option) any later ## (at your option) any later version.
## version.
## ##
## This program is distributed in the hope that it will be useful, ## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of ## but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
## GNU General Public License for more details. ## GNU General Public License for more details.
## ##
## You should have received a copy of the GNU General Public License ## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software ## along with this program. If not, see <http://www.gnu.org/licenses/>.
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
# #
stylesheet=emailrelay.css stylesheet=emailrelay.css
@ -26,7 +23,7 @@ html_files_in=doxygen_header.html
html_files_thru=index.html emailrelay-man.html $(stylesheet) html_files_thru=index.html emailrelay-man.html $(stylesheet)
html_files_out=readme.html developer.html reference.html userguide.html windows.html changelog.html html_files_out=readme.html developer.html reference.html userguide.html windows.html changelog.html
docbook_files_out=emailrelay.docbook 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) EXTRA_DIST = $(man_files_in) $(txt_files) $(html_files_in) $(html_files_thru) $(png_files)
noinst_SCRIPTS = .dox .docbook noinst_SCRIPTS = .dox .docbook
@ -37,15 +34,10 @@ CLEANFILES = $(noinst_SCRIPTS) $(man_files_out) $(html_files_out) $(docbook_file
SUFFIXES = .txt .html .db .mu SUFFIXES = .txt .html .db .mu
converter_html=$(top_builddir)/bin/txt2html.sh converter_html=$(top_builddir)/bin/txt2html.sh
converter_html_src=$(top_srcdir)/bin/txt2html.sh_
converter_txt2mu=$(top_builddir)/bin/txt2mu.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=$(top_builddir)/bin/mu2html.sh
converter_mu2html_src=$(top_srcdir)/bin/mu2html.sh_
converter_expand=$(top_builddir)/bin/expand.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=$(top_builddir)/bin/mu2docbook.sh
converter_mu2docbook_src=$(top_srcdir)/bin/mu2docbook.sh_
.txt.html: .txt.html:
$(converter_html) -a "$(AWK)" $(top_srcdir)/doc/$*.txt $(stylesheet) > $*.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: .mu.db:
$(converter_mu2docbook) -a "$(AWK)" -x < $(top_builddir)/doc/$*.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) 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) 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 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 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 .docbook: emailrelay.docbook
-xmlto -o docbook html emailrelay.docbook && touch .docbook && cp *.png 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: .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 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 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) developer.html reference.html userguide.html: $(converter_html)

View File

@ -112,7 +112,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@
POPLIB = @POPLIB@
QT_CFLAGS = @QT_CFLAGS@ QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@ QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
@ -141,8 +140,10 @@ dvidir = @dvidir@
e_docdir = @e_docdir@ e_docdir = @e_docdir@
e_examplesdir = @e_examplesdir@ e_examplesdir = @e_examplesdir@
e_initdir = @e_initdir@ e_initdir = @e_initdir@
e_libexecdir = @e_libexecdir@
e_qtmoc = @e_qtmoc@ e_qtmoc = @e_qtmoc@
e_spooldir = @e_spooldir@ e_spooldir = @e_spooldir@
e_sysconfdir = @e_sysconfdir@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
host_alias = @host_alias@ host_alias = @host_alias@
htmldir = @htmldir@ htmldir = @htmldir@
@ -175,7 +176,7 @@ html_files_in = doxygen_header.html
html_files_thru = index.html emailrelay-man.html $(stylesheet) html_files_thru = index.html emailrelay-man.html $(stylesheet)
html_files_out = readme.html developer.html reference.html userguide.html windows.html changelog.html html_files_out = readme.html developer.html reference.html userguide.html windows.html changelog.html
docbook_files_out = emailrelay.docbook 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) EXTRA_DIST = $(man_files_in) $(txt_files) $(html_files_in) $(html_files_thru) $(png_files)
noinst_SCRIPTS = .dox .docbook noinst_SCRIPTS = .dox .docbook
man1_MANS = $(man_files_in) 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/* CLEANFILES = $(noinst_SCRIPTS) $(man_files_out) $(html_files_out) $(docbook_files_out) doxygen/* *.db *.mu docbook/*
SUFFIXES = .txt .html .db .mu SUFFIXES = .txt .html .db .mu
converter_html = $(top_builddir)/bin/txt2html.sh converter_html = $(top_builddir)/bin/txt2html.sh
converter_html_src = $(top_srcdir)/bin/txt2html.sh_
converter_txt2mu = $(top_builddir)/bin/txt2mu.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 = $(top_builddir)/bin/mu2html.sh
converter_mu2html_src = $(top_srcdir)/bin/mu2html.sh_
converter_expand = $(top_builddir)/bin/expand.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 = $(top_builddir)/bin/mu2docbook.sh
converter_mu2docbook_src = $(top_srcdir)/bin/mu2docbook.sh_
all: all-am all: all-am
.SUFFIXES: .SUFFIXES:
@ -433,15 +429,11 @@ uninstall-man: uninstall-man1
.mu.db: .mu.db:
$(converter_mu2docbook) -a "$(AWK)" -x < $(top_builddir)/doc/$*.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) 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) 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 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 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 .docbook: emailrelay.docbook
-xmlto -o docbook html emailrelay.docbook && touch .docbook && cp *.png 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: .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 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 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) developer.html reference.html userguide.html: $(converter_html)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@ -3,40 +3,18 @@ E-MailRelay Internals
Module structure Module structure
---------------- ----------------
There are four C++ libraries in the E-MailRelay code: "glib" provides low-level There are four main C++ libraries in the E-MailRelay code: "glib" provides
classes for file-system abstraction, date and time representation, string low-level classes for file-system abstraction, date and time representation,
utility functions, logging, command line parsing etc., "gnet" provides network string utility functions, logging, command line parsing etc., "gnet" provides
classes using the Berkley socket and Winsock APIs, "gsmtp" contains SMTP and network classes using the Berkley socket and Winsock APIs, "gsmtp" contains SMTP
message-store classes, and "gpop" contains POP3 classes. All four libraries are and message-store classes, and "gpop" contains POP3 classes. All four libraries
portable between POSIX-like systems (eg. Linux) and Windows. are portable between POSIX-like systems (eg. Linux) and Windows.
Under Windows there is an additional library for event handling. Windows has Under Windows there is an additional library for event handling. Windows has
historically built network event processing on top of the GUI event system, historically built network event processing on top of the GUI event system which
rather then implementing network events using a generic event notification means that the "gnet" library has to be able to create GUI windows in order to
system as POSIX systems do. This means that the "gnet" library has to be able process network events. The extra GUI and event classes are put into a separate
to create GUI windows in order to process network events. The extra GUI and library in the "src/win32" directory, using the namespace "GGui".
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.
Event model 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 See *C10K Problem* [http://www.kegel.com/c10k.html] for a discussion of
different network event models. different network event models.
At higher levels the slot/signal design pattern is used to propagate events At higher levels the C++ slot/signal design pattern is used to propagate events
between objects (not to be confused with operating system signals). 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 Event handling and exceptions
----------------------- -----------------------------
The SMTP protocols (client-side and server-side) are implemented using state The use of non-blocking i/o in the network library means that most processing
machines. This fits well with the single-threaded, non-blocking event model operates within the context of an i/o event or timeout callback so the top level
since the protocol state can be stored as data within an object rather than of the call stack is nearly always the event loop code. This can make using C++
being implicit in the progress of a thread's execution. 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 Diagrams
-------- --------
@ -67,13 +118,9 @@ Class diagrams:
State transition diagrams: State transition diagrams:
* *GNet::Client* [gnet-client.png] * *GNet::Client* [gnet-client.png]
* *GSmtp::ServerProtocol* [gsmtp-serverprotocol.png] * *GSmtp::ServerProtocol* [gsmtp-serverprotocol.png]
* *GSmtp::ScannerClient* [gsmtp-scannerclient.png]
Sequence diagrams: Sequence diagrams:
* *Proxy mode forwarding* [sequence-3.png] * *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 Directory structure
------------------- -------------------
@ -107,17 +154,17 @@ Directory structure
Application-level classes for E-MailRelay. Application-level classes for E-MailRelay.
# src/gui
Installation and configuration GUI program using Qt 4.
# lib # 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 Test scripts and utilities.
# lib/msvc6.0
Standard headers which are missing (or broken) in msvc6.0
Portability 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" non-standard system headers etc. Conditional compilation directives ("#if"
etc.) are largely confined to these headers in order to improve readability. etc.) are largely confined to these headers in order to improve readability.
Deficiencies in the ISO standard headers files provided by the compiler are Deficiencies in the standard headers files provided by older compilers are fixed
fixed up by files in the "lib" directory tree. For example, the msvc6.0 compiler 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 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" 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 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. the "src" tree because they are not necessary for more modern compilers.
Standards-compliant compilers should not need to include any headers from the
"lib" directory tree.
Windows/unix portability is generally addressed by providing a common class Windows/unix portability is generally addressed by providing a common class
declaration with two implementations. Where necessary a "pimple" pattern is used 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. 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 Patterns
-------- --------
Gang-of-four Design Patterns (ISBN 0-201-63361-2): 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 - G::LogOutput
- GGui::ApplicationInstance - GGui::ApplicationInstance
- GNet::EventLoop - GNet::EventLoop
- GNet::TimerList
+ Facade + Facade
- G::File - G::File
- GNet::Address - GNet::Address
+ Adapter/Mediator + Decorator
- GSmtp::ProtocolMessage - GSmtp::ProtocolMessage
@ -252,8 +288,7 @@ Other patterns:
Idioms Idioms
------ ------
The "<<=" operator defined in "src/glib/gmemory.h" is used idiomatically 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.

View File

@ -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> </HEAD><BODY>
<H1>EMAILRELAY</H1> <H1>EMAILRELAY</H1>
Section: User Commands (1)<BR>Updated: local<BR><A HREF="#index">Index</A> 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">&nbsp;</A> <A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2> <H2>NAME</H2>
@ -143,7 +143,7 @@ Displays help text and exits.
<DT><B>-m, --immediate </B> <DT><B>-m, --immediate </B>
<DD> <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>&lt;ip-address&gt;</I> <DT><B>-I, --interface </B><I>&lt;ip-address&gt;</I>
<DD> <DD>
@ -200,6 +200,10 @@ Specifies the pop listening port number (requires <I>--pop</I>).
<DD> <DD>
Specifies the smtp listening port number. Specifies the smtp listening port number.
<DT><B>-w, --prompt-timeout </B><I>&lt;time&gt;</I>
<DD>
Sets the timeout (in seconds) for getting an initial prompt from the server.
<DT><B>-r, --remote-clients </B> <DT><B>-r, --remote-clients </B>
<DD> <DD>
@ -208,10 +212,6 @@ Allows remote clients to connect.
<DD> <DD>
Sets the response timeout (in seconds) when talking to a remote server (default is 1800). Sets the response timeout (in seconds) when talking to a remote server (default is 1800).
<DT><B>-R, --scanner </B><I>&lt;host:port&gt;</I>
<DD>
Specifies an external network server to process messages when they are stored.
<DT><B>-S, --server-auth </B><I>&lt;file&gt;</I> <DT><B>-S, --server-auth </B><I>&lt;file&gt;</I>
<DD> <DD>
@ -253,13 +253,16 @@ GNU style...
/usr/local/etc/emailrelay.conf.template /usr/local/etc/emailrelay.conf.template
<BR> <BR>
/usr/local/libexec/emailrelay /usr/local/libexec/emailrelay/emailrelay-filter-copy
<BR> <BR>
/usr/local/libexec/emailrelay-poke /usr/local/libexec/emailrelay/emailrelay-poke
<BR> <BR>
/usr/local/libexec/emailrelay-*.sh /usr/local/libexec/emailrelay/examples/*
<BR>
/usr/local/libexec/emailrelay/init/emailrelay
<BR> <BR>
/usr/local/man/man1/emailrelay*.1.gz /usr/local/man/man1/emailrelay*.1.gz
@ -301,7 +304,13 @@ FHS style...
/etc/init.d/emailrelay /etc/init.d/emailrelay
<BR> <BR>
/usr/lib/emailrelay-poke /usr/lib/emailrelay/emailrelay-filter-copy
<BR>
/usr/lib/emailrelay/emailrelay-poke
<BR>
/usr/lib/emailrelay/examples/*
<BR> <BR>
/usr/sbin/emailrelay /usr/sbin/emailrelay
@ -316,9 +325,6 @@ FHS style...
/usr/share/doc/emailrelay/* /usr/share/doc/emailrelay/*
<BR> <BR>
/usr/share/doc/emailrelay/examples/emailrelay-*.sh
<BR>
/usr/share/doc/emailrelay/index.html /usr/share/doc/emailrelay/index.html
<BR> <BR>
@ -335,23 +341,15 @@ FHS style...
<A NAME="lbAG">&nbsp;</A> <A NAME="lbAG">&nbsp;</A>
<H2>SEE ALSO</H2> <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> <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> <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="../man1/emailrelay-passwd.1.html">emailrelay-passwd</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)
<A NAME="lbAH">&nbsp;</A> <A NAME="lbAH">&nbsp;</A>
<H2>AUTHOR</H2> <H2>AUTHOR</H2>
@ -372,9 +370,9 @@ Graeme Walker, mailto:<A HREF="mailto:graeme_walker@users.sourceforge.net">graem
</DL> </DL>
<HR> <HR>
This document was created by 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> using the manual pages.<BR>
Time: 18:17:41 GMT, April 09, 2007 Time: 16:32:15 GMT, August 27, 2007
</BODY> </BODY>
</HTML> </HTML>
<!-- Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>. All rights reserved. --> <!-- Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>. All rights reserved. -->

View File

@ -1,10 +1,9 @@
.\" Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> .\" Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
.\" .\"
.\" This program is free software; you can redistribute it and/or .\" This program is free software: you can redistribute it and/or modify
.\" modify it under the terms of the GNU General Public License .\" it under the terms of the GNU General Public License as published by
.\" as published by the Free Software Foundation; either .\" the Free Software Foundation, either version 3 of the License, or
.\" version 2 of the License, or (at your option) any later .\" (at your option) any later version.
.\" version.
.\" .\"
.\" This program is distributed in the hope that it will be useful, .\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -12,9 +11,7 @@
.\" GNU General Public License for more details. .\" GNU General Public License for more details.
.\" .\"
.\" You should have received a copy of the GNU General Public License .\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software .\" along with this program. If not, see <http://www.gnu.org/licenses/>.
.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
.\"
.TH EMAILRELAY-PASSWD 1 local .TH EMAILRELAY-PASSWD 1 local
.SH NAME .SH NAME
emailrelay-passwd \- a password encoding utility for E-MailRelay emailrelay-passwd \- a password encoding utility for E-MailRelay

View File

@ -1,10 +1,9 @@
.\" Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> .\" Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
.\" .\"
.\" This program is free software; you can redistribute it and/or .\" This program is free software: you can redistribute it and/or modify
.\" modify it under the terms of the GNU General Public License .\" it under the terms of the GNU General Public License as published by
.\" as published by the Free Software Foundation; either .\" the Free Software Foundation, either version 3 of the License, or
.\" version 2 of the License, or (at your option) any later .\" (at your option) any later version.
.\" version.
.\" .\"
.\" This program is distributed in the hope that it will be useful, .\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -12,9 +11,7 @@
.\" GNU General Public License for more details. .\" GNU General Public License for more details.
.\" .\"
.\" You should have received a copy of the GNU General Public License .\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software .\" along with this program. If not, see <http://www.gnu.org/licenses/>.
.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
.\"
.TH EMAILRELAY-POKE 1 local .TH EMAILRELAY-POKE 1 local
.SH NAME .SH NAME
emailrelay-poke \- forces an E-MailRelay server to deliver spooled mail emailrelay-poke \- forces an E-MailRelay server to deliver spooled mail

View File

@ -1,10 +1,9 @@
.\" Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> .\" Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
.\" .\"
.\" This program is free software; you can redistribute it and/or .\" This program is free software: you can redistribute it and/or modify
.\" modify it under the terms of the GNU General Public License .\" it under the terms of the GNU General Public License as published by
.\" as published by the Free Software Foundation; either .\" the Free Software Foundation, either version 3 of the License, or
.\" version 2 of the License, or (at your option) any later .\" (at your option) any later version.
.\" version.
.\" .\"
.\" This program is distributed in the hope that it will be useful, .\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -12,9 +11,7 @@
.\" GNU General Public License for more details. .\" GNU General Public License for more details.
.\" .\"
.\" You should have received a copy of the GNU General Public License .\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software .\" along with this program. If not, see <http://www.gnu.org/licenses/>.
.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
.\"
.TH EMAILRELAY-SUBMIT 1 local .TH EMAILRELAY-SUBMIT 1 local
.SH NAME .SH NAME
emailrelay-submit \- a submission utility for E-MailRelay emailrelay-submit \- a submission utility for E-MailRelay

View File

@ -1,10 +1,9 @@
.\" Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> .\" Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
.\" .\"
.\" This program is free software; you can redistribute it and/or .\" This program is free software: you can redistribute it and/or modify
.\" modify it under the terms of the GNU General Public License .\" it under the terms of the GNU General Public License as published by
.\" as published by the Free Software Foundation; either .\" the Free Software Foundation, either version 3 of the License, or
.\" version 2 of the License, or (at your option) any later .\" (at your option) any later version.
.\" version.
.\" .\"
.\" This program is distributed in the hope that it will be useful, .\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -12,9 +11,7 @@
.\" GNU General Public License for more details. .\" GNU General Public License for more details.
.\" .\"
.\" You should have received a copy of the GNU General Public License .\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software .\" along with this program. If not, see <http://www.gnu.org/licenses/>.
.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
.\"
.TH EMAILRELAY 1 local .TH EMAILRELAY 1 local
.SH NAME .SH NAME
emailrelay \- e-mail transfer agent and proxy 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. Displays help text and exits.
.TP .TP
.B \-m, --immediate .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 .TP
.B \-I, --interface \fI<ip-address>\fR .B \-I, --interface \fI<ip-address>\fR
Defines the listening interface for new connections. 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 .B \-p, --port \fI<port>\fR
Specifies the smtp listening port number. Specifies the smtp listening port number.
.TP .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 .B \-r, --remote-clients
Allows remote clients to connect. Allows remote clients to connect.
.TP .TP
.B \-T, --response-timeout \fI<time>\fR .B \-T, --response-timeout \fI<time>\fR
Sets the response timeout (in seconds) when talking to a remote server (default is 1800). Sets the response timeout (in seconds) when talking to a remote server (default is 1800).
.TP .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 .B \-S, --server-auth \fI<file>\fR
Enables authentication of remote clients, using the given secrets file. Enables authentication of remote clients, using the given secrets file.
.TP .TP
@ -190,11 +187,13 @@ GNU style...
.br .br
/usr/local/etc/emailrelay.conf.template /usr/local/etc/emailrelay.conf.template
.br .br
/usr/local/libexec/emailrelay /usr/local/libexec/emailrelay/emailrelay-filter-copy
.br .br
/usr/local/libexec/emailrelay-poke /usr/local/libexec/emailrelay/emailrelay-poke
.br .br
/usr/local/libexec/emailrelay-*.sh /usr/local/libexec/emailrelay/examples/*
.br
/usr/local/libexec/emailrelay/init/emailrelay
.br .br
/usr/local/man/man1/emailrelay*.1.gz /usr/local/man/man1/emailrelay*.1.gz
.br .br
@ -222,7 +221,11 @@ FHS style...
.br .br
/etc/init.d/emailrelay /etc/init.d/emailrelay
.br .br
/usr/lib/emailrelay-poke /usr/lib/emailrelay/emailrelay-filter-copy
.br
/usr/lib/emailrelay/emailrelay-poke
.br
/usr/lib/emailrelay/examples/*
.br .br
/usr/sbin/emailrelay /usr/sbin/emailrelay
.br .br
@ -232,8 +235,6 @@ FHS style...
.br .br
/usr/share/doc/emailrelay/* /usr/share/doc/emailrelay/*
.br .br
/usr/share/doc/emailrelay/examples/emailrelay-*.sh
.br
/usr/share/doc/emailrelay/index.html /usr/share/doc/emailrelay/index.html
.br .br
/usr/share/doc/emailrelay/README /usr/share/doc/emailrelay/README
@ -244,15 +245,11 @@ FHS style...
.br .br
/var/spool/emailrelay/emailrelay.*.envelope /var/spool/emailrelay/emailrelay.*.envelope
.SH SEE ALSO .SH SEE ALSO
E-MailRelay user guide, (http://emailrelay.sourceforge.net/user.html). E-MailRelay user guide, http://emailrelay.sourceforge.net/userguide.html .
.br .br
E-MailRelay reference, (http://emailrelay.sourceforge.net/reference.html). E-MailRelay reference, http://emailrelay.sourceforge.net/reference.html .
.br .br
.BR emailrelay-submit (1), .BR emailrelay-submit (1),
.BR emailrelay-poke (1),
.BR emailrelay-passwd (1), .BR emailrelay-passwd (1),
.BR syslog (3),
.BR pppd (8),
.BR init.d (7)
.SH AUTHOR .SH AUTHOR
Graeme Walker, mailto:graeme_walker@users.sourceforge.net Graeme Walker, mailto:graeme_walker@users.sourceforge.net

View File

@ -10,12 +10,13 @@ body
padding: 0px ; padding: 0px ;
} }
div.two-column-header div.Header
{ {
background-color: #eee ; background-color: #ddd ;
padding-top: 10px ;
border-bottom: 1px #999 solid ; border-bottom: 1px #999 solid ;
height: 100px ; height: 80px ;
width: 100% ; width: 100% ;
} }
@ -25,30 +26,37 @@ h1
color: #09c ; color: #09c ;
} }
div.two-column-header h1 div.Header h1
{ {
margin: 0px ; margin: 0px ;
} }
div.two-column-content div.Content
{ {
margin-left: 210px ; /* menu width + 40px */ margin-left: 230px ;
padding: 40px ; padding: 5px ;
} }
div.two-column-menu div.Menu
{ {
background-color: #eee ; background-color: #ddd ;
float: left ; float: left ;
width: 180px ; width: 180px ;
margin-left: 30px ; margin-left: 25px ;
margin-top: 30px ; margin-right: 0px ;
margin-top: 100px ;
margin-bottom: 10px ; margin-bottom: 10px ;
border-style: solid ; border-style: dashed ;
border-width: 1px ; border-width: 1px ;
border-color: #999 ; border-color: #999 ;
padding: 3px ;
}
div.Footer
{
} }
div.div-main div.div-main
@ -59,32 +67,17 @@ div.div-main
div.div-toc div.div-toc
{ {
background-color: #eee ; background-color: #ddd ;
}
p.p-toc
{
padding: 5px ;
margin-top: 0px ;
margin-bottom: 0px ;
margin-left: 0.5em ;
text-align: left ;
} }
div.div-pre div.div-pre
{ {
margin-left: 3% ; margin-left: 3% ;
background-color: #eee ; background-color: #ddd ;
padding: 0.5em ; padding: 0.5em ;
border: none ; border: none ;
} }
h1
{
text-align: center ;
color: #09c ;
}
img img
{ {
border-width: 0px ; border-width: 0px ;
@ -109,17 +102,27 @@ h3.h3-toc
margin: 0px ; margin: 0px ;
padding: 0px ; padding: 0px ;
width: 100% ; 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 ; text-decoration: none ;
} }
p.p-toc p.p-toc
{ {
padding-top: 0px ; padding-top: 0px ;
padding-bottom: 0px ; padding-bottom: 0px ;
padding-left: 15px ; padding-left: 15px ;
margin: 0px ; margin: 0px ;
border-bottom: 1px #999 solid ; border-bottom: 1px #999 dashed ;
text-align: left ;
} }
a.a-toc a.a-toc
@ -173,7 +176,7 @@ a.a-href:visited
a.a-href:hover a.a-href:hover
{ {
color: #09c ; color: #09c ;
background-color: #eee ; background-color: #ddd ;
} }
em.quote em.quote

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

View File

@ -12,7 +12,7 @@
<li><a class="a-href" href="changelog.html">Change log</a></li> <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="userguide.html">User guide</a></li>
<li><a class="a-href" href="reference.html">Reference</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="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="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> <li><a class="a-href" href="emailrelay-man.html">Man page</a> (generated by man2html, if available)</li>

View File

@ -1,11 +1,6 @@
E-MailRelay Reference E-MailRelay Reference
===================== =====================
Introduction
------------
This is the E-MailRelay reference guide. It contains material which is
supplementary to the user guide.
Command line usage Command line usage
------------------ ------------------
The "emailrelay" program supports the following command-line usage: The "emailrelay" program supports the following command-line usage:
@ -68,7 +63,7 @@ where <switch> is:
Displays help text and exits. Displays help text and exits.
# --immediate (-m) # --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) # --interface (-I)
Defines the listening interface for new connections. Defines the listening interface for new connections.
@ -112,15 +107,15 @@ where <switch> is:
# --port (-p) # --port (-p)
Specifies the smtp listening port number. 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) # --remote-clients (-r)
Allows remote clients to connect. Allows remote clients to connect.
# --response-timeout (-T) # --response-timeout (-T)
Sets the response timeout (in seconds) when talking to a remote server (default is 1800). 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) # --server-auth (-S)
Enables authentication of remote clients, using the given secrets file. Enables authentication of remote clients, using the given secrets file.
@ -142,8 +137,8 @@ where <switch> is:
# --version (-V) # --version (-V)
Displays version information and exits. Displays version information and exits.
Under Windows there are a few differences. Use "--help --verbose" Under Windows there are a few minor differences. Use "--help --verbose" to see
to see the complete list. the complete list.
Message store 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 "content". The envelope files then have an additional suffix to implement a
simple locking scheme. simple locking scheme.
The envelope suffixes are: The envelope file suffixes are:
* ".new" -- while the envelope is first being written * ".new" -- while the envelope is first being written
* <none> -- while the message is spooled * <none> -- while the message is spooled
* ".busy" -- while the message is being forwarded * ".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): mail on to the system's default MTA (on port 25):
emailrelay --as-proxy localhost:smtp --port 10025 --no-syslog \ emailrelay --as-proxy localhost:smtp --port 10025 --no-syslog \
--filter $HOME/.emailrelay/filter \ --filter $HOME/myfilter --spool-dir $HOME/spool
--spool-dir $HOME/.emailrelay/spool
The pre-processor program should terminate with an exit code of zero to 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 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 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 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 line starting with "<<" or "[[" followed by ">>" or "]]" respectively. The text
failure reason, and passed back to the SMTP client. 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 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 content file: E-MailRelay remembers nothing about the message while the
pre-processor is running, except the filename. But if the message is deleted 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 by the pre-processor then E-MailRelay may be upset, so to avoid the error
error message use an exit code of 100. message use an exit code of 100.
If the pre-processor program creates completely new messages in the spool 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 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 ignored. To get E-MailRelay to pick up any new messages you create in the spool
the "--poll" switch, or run "emailrelay --as-client" from within the directory use the "--poll" switch, or run "emailrelay --as-client" from within
pre-processor program. the pre-processor program.
As an example of a simple pre-processor this shell script examines the sending 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 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. * 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. * 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. * 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 scripts may need to be run via "cscript" or a batch file wrapper.
* Windows Perl programs must be run from a batch file, or from a JScript/VBScript wrapper.
It is also possible to run a separate server process to pre-process messages by It is also possible to do message pre-processing in a separate server process by
using the "--scanner" switch, which has the advantage of not blocking the main using "net:<address>:<port>" as the "--filter" or "--client-filter" switch
E-MailRelay process during message pre-processing. The "--scanner" switch is parameter. E-MailRelay connects to this address and then uses a simple
used to specify the IP address and port that the scanner server is listening line-based dialog as each e-mail message is processed where it sends the
on. E-MailRelay connects to this address and then uses a simple line-based full path of the message content file in one line and expects the remote process
dialog as each e-mail message is received. E-MailRelay sends the full path of to respond with an "ok" line if the message is to be accepted or an error
the message content file, and the scanner is expected to respond with "ok" if message. One advantage of using a network pre-processor compared to running a
the message is to be accepted, or an error message. program is that the E-MailRelay server is not blocked while the messages are
being pre-processed.
Address verification Address verification
-------------------- --------------------
By default the E-MailRelay server will accept all addresses for incoming e-mails 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 as valid. However, this default behaviour can be modified by using an external
verifier program, specified with the "--verifier" command-line switch, so that 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 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 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" echo "cannot relay without authentication"
exit 2 # reject the recipient address exit 2 # reject the recipient address
fi fi
echo ""
echo "${address}" echo "${address}"
echo "${address}" # again
exit 1 # accept the recipient address exit 1 # accept the recipient address
or in JavaScript: or in JavaScript for Windows:
// verifier.js // verifier.js
var address = WScript.Arguments(0) ; var address = WScript.Arguments(0) ;
@ -404,13 +399,22 @@ or in JavaScript:
WScript.Echo( "cannot relay without authentication" ) ; WScript.Echo( "cannot relay without authentication" ) ;
WScript.Quit( 2 ) ; WScript.Quit( 2 ) ;
} }
WScript.Echo( address ) ; WScript.Echo( "" ) ;
WScript.Echo( address ) ; WScript.Echo( address ) ;
WScript.Quit( 1 ) ; WScript.Quit( 1 ) ;
If this verifier script is used with a suitable "--server-auth" file then it can 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. 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 Authentication
-------------- --------------
E-MailRelay supports the SMTP "AUTH" extension, as defined in RFC2554, on both 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. not replayable. Defined in RFC2195.
Authentication is enabled with the "--client-auth" and "--server-auth" 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: containing usernames and passwords:
emailrelay --as-server --server-auth /etc/emailrelay-clients.auth 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 "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 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 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 The "xtext" encoding scheme is defined properly in RFC1891, but basically it
says that non alphanumeric characters should be represented in hexadecimal as 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 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 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 The same secrets file may be specified for both "--client-auth" and
"--server-auth" switches. "--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" is passed to any external address verifier program specified by the "--verifier"
command-line switch; it is not used for any other purpose. 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 192.168.0.0/24 domain to connect without authentication desipte the
"--server-auth" switch: "--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 a server which implements the AUTH extension with one of the supported
mechanisms. If client authentication is enabled (with the "--client-auth" mechanisms. If client authentication is enabled (with the "--client-auth"
switch) but the remote server does not support the AUTH extension, or does not 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 support the LOGIN or CRAM-MD5 mechanism, then E-MailRelay will log an error
message and terminate with an error message. and not forward any messages.
Note that some ISPs require separate POP/IMAP authentication before SMTP access 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 from a particular IP address is allowed. This type of POP-before-SMTP
@ -527,8 +532,11 @@ such as "fetchmail".
Pop server Pop server
---------- ----------
If E-MailRelay has been built with POP3 support then the "--help --verbose" E-MailRelay can be used as a POP3 server so that POP clients have access to
output will show several additional command-line switches: spooled messages.
The following command-line switches are used:
# --pop # --pop
Enables the POP3 server. 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 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 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 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 # --pop-no-delete
@ -602,7 +610,8 @@ following precautions are taken:
there is no dependence on the current working directory or the PATH there is no dependence on the current working directory or the PATH
environment variable. environment variable.
Some other points are: Some other points to note are:
# umask # umask
The program runs for most of the time with a "umask" of 177, switching to 117 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 spool directory, and the files created end up owned by the submitter but with
group ownership of "daemon". 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 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 this document, but RFC2821 makes the following observation: "SMTP mail is
inherently insecure in that it is feasible for even [..] casual users to [..] 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 "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. getting the proxy server to scan the spool-directory for new messages.
The utility program "emailrelay-poke" can be used to issue the "flush" The "list" command lists the messages in the spool directory, "info" provides
command to an E-MailRelay server. For example: network status information and activity statistics, and "notify" enables
asynchronous event notification.
$ 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.
Files and directories Files and directories
--------------------- ---------------------
@ -684,9 +696,10 @@ Following a normal build from source, a "make install" puts files in the
following locations: following locations:
* /usr/local/etc/emailrelay.conf * /usr/local/etc/emailrelay.conf
* /usr/local/etc/emailrelay.conf.template * /usr/local/etc/emailrelay.conf.template
* /usr/local/libexec/emailrelay * /usr/local/libexec/emailrelay/emailrelay-filter-copy
* /usr/local/libexec/emailrelay-poke * /usr/local/libexec/emailrelay/emailrelay-poke
* /usr/local/libexec/emailrelay-*.sh * /usr/local/libexec/emailrelay/examples/*
* /usr/local/libexec/emailrelay/init/emailrelay
* /usr/local/man/man1/emailrelay*.1.gz * /usr/local/man/man1/emailrelay*.1.gz
* /usr/local/sbin/emailrelay * /usr/local/sbin/emailrelay
* /usr/local/sbin/emailrelay-passwd * /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). than the Filesystem Hierarchy Standard (FHS).
To force FHS compliance you can use the "--enable-fhs" switch when running 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 "configure". This results in the following file locations:
locations:
* /etc/emailrelay.conf * /etc/emailrelay.conf
* /etc/emailrelay.conf.template * /etc/emailrelay.conf.template
* /etc/init.d/emailrelay * /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
* /usr/sbin/emailrelay-passwd * /usr/sbin/emailrelay-passwd
* /usr/sbin/emailrelay-submit * /usr/sbin/emailrelay-submit
* /usr/share/doc/emailrelay/* * /usr/share/doc/emailrelay/*
* /usr/share/doc/emailrelay/examples/emailrelay-*.sh
* /usr/share/doc/emailrelay/index.html * /usr/share/doc/emailrelay/index.html
* /usr/share/doc/emailrelay/README * /usr/share/doc/emailrelay/README
* /usr/share/man/man1/emailrelay*.1.gz * /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 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 the "configure" command-line (but note that the "--enable-fhs" will override
them): them):
* --libexecdir=<dir>
* --mandir=<dir> * --mandir=<dir>
* --sbindir=<dir> * --sbindir=<dir>
* --sysconfdir=<dir> * e_libexecdir=<dir>
* e_sysconfdir=<dir>
* e_docdir=<dir> * e_docdir=<dir>
* e_examplesdir=<dir> * e_examplesdir=<dir>
* e_initdir=<dir> * e_initdir=<dir>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -52,7 +52,8 @@ Typical applications of E-MailRelay include:
* adding digital signatures or legal disclaimers to outgoing mail * adding digital signatures or legal disclaimers to outgoing mail
* doing store-and-forward for outgoing mail across a dial-up Internet connection * doing store-and-forward for outgoing mail across a dial-up Internet connection
* adding authentication where the existing infrastructure does not support it * 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 Running E-MailRelay
------------------- -------------------
@ -103,125 +104,36 @@ or run:
emailrelay --help --verbose emailrelay --help --verbose
Starting the daemon at boot-time Configuration
-------------------------------- -------------
The standard installation of E-MailRelay (using "make install") puts most of the The "emailrelay" program itself is mostly configured through command-line
files into the right places, but it does not set things up so that the daemon switches (such as "--port" and "--forward-to"), so there is no single
starts at boot time. You have to do that yourself because of the differences definitive configuration file.
between the various operating systems and distributions.
Many systems provide GUI programs and command-line tools to make the necessary However, in most installations on Unix-like system the E-MailRelay server will
links into the boot system: "ksysv" (KDE), "redhat-config-services", "insserv" be started up by the boot-time script called "emailrelay" in the "/etc/init.d"
(Suse), "chkconfig" (Redhat), "install_initd" (LSB) are examples. 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 On Windows the installation program creates a startup batch file called
manually as described below. "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 If you are using authentication then you will have to create the text files
"/sbin/init.d") containing a start/stop script for each daemon process, and then containing your authentication secrets (passwords and password hashes). The
symbolic links in the "rc<N>.d" subdirectories control which scripts are run "--server-auth", "--client-auth" and "--pop-auth" command-line switches are used
when entering or leaving a particular run-level (<N>). The links point back into to point to these files.
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.
So the goal is to set up symbolic links to the "emailrelay" start/stop script There is also a graphical configuration program called "emailrelay-gui" that
(not the binary) which "make install" should have put in "/etc/init.d" or may be available to help with configuring the system. This is intended to be
"/usr/local/libexec". 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
Before you start you will need to know where your "init.d" directory can be of an alreay-installed system.
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.
Logging 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 "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"). 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 For more verbose logging add the "--verbose" switch. If this becomes difficult
from all other mail programs), add a line like this to "/etc/syslog.conf": 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 emailrelay --log --verbose > emailrelay.log 2>&1
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".
Troubleshooting 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. something like "fetchmail" to do the POP/IMAP authentication.
If you can send mail messages sucessfully using telnet, then you should look at 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 E-MailRelay "--verbose" log output and compare what you do interactively
the program does. Usually when running as a server E-MailRelay logging goes to with what the program does.
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.
Preventing open mail relay Preventing open mail relay
-------------------------- --------------------------
If you are running E-MailRelay as a server with a permanent connection to the 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 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 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 E-MailRelay does not accept IP connections from remote clients. However, if you
"--remote-clients" switch is used then you need to be more careful. One option use the "--remote-clients" switch then you need to be more careful.
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.
Taking it one stage further, you may want to allow clients to connect from any If the only required access to the E-MailRelay server is from a local network
IP address without authentication, but only allow them to send mail to local and not from the Internet then you can use the "--interface" switch to listen
users. You can do this by requiring authentication with the "--server-auth" for incoming connections only on the local network interface. You should also
switch but then exempt all clients from authentication with a use a firewall in this scenario.
"NONE server *.*.*.* x" line in the secrets file. To complete the solution
you must have an address verifier script ("--verifier") which rejects remote Another option is to require all clients to authenticate by using the
addresses if the client has not authenticated. Again, refer to the reference "--server-auth" switch. If you then need local clients, such as your own e-mail
guide for further details. 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 Running as a POP server
----------------------- -----------------------
@ -364,139 +272,151 @@ like this:
APOP server user1 password1 APOP server user1 password1
APOP server user2 password2 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 "--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. 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 Usage patterns
-------------- --------------
The simplest ways of using E-MailRelay for SMTP are as a proxy or as a 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 store-and-forward MTA, but many other configurations are possible. For example,
could use the E-MailRelay server to do message storing, but use something else multiple E-MailRelay servers can run in parallel sharing the same spool directory,
to do the forwarding. Or you could implement simple routing by having a or they can be chained in series to that e-mail messages get transferred
"--filter" program that moves message files into the spool directory of another from one to the next.
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.
Remember that messages can be introduced directly into the E-MailRelay spool 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 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 at any time, as long as the envelope file is not locked (ie. with a special
extension. Your "--filter" program can edit messages in any way you want, and it filename extension). Your "--filter" program can edit messages in any way you
can even remove the current message from the spool directory as long as it lets want, and it can even remove the current message from the spool directory.
E-MailRelay know by terminating with an exit code of 100.
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. "--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 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 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 to the remote server. To avoid the overhead of polling the spool directory
transfer phase once the message has been sucessfully transfered to the next continuously you can use get the "--filter" program to force the "--poll" timer
server, but by using the "--poll" mechanism the client gets an OK response to expire as each new message is received by using a special exit value of 103.
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.
When using E-MailRelay as a POP server the "--pop-by-name" feature can be used 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 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 authenticated with: each user's messages are taken from their own sub-directory
main spool directory. This means that you have to decide how to move or copy the of the main spool directory. This means that you can decide how to move or copy
messages into those sub-directories. If messages are coming in over SMTP then the messages into those sub-directories. If messages are coming in over SMTP
you could install an SMTP "--filter" script to move each new message into the then you could install an SMTP "--filter" script to move each new message into
relevant sub-directory based on the message addressing. Or if you are submitting the relevant sub-directory based on the message addressing.
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.
For more ideas check out the "--client-filter", "--poll" and "--scanner" For more ideas check out the "--client-filter" and "--poll" switches, and don't
switches, and don't overlook the administration interface ("--admin") which you overlook the administration and control interface ("--admin") which you can use
can use to receive notification of message arrival or force message forwarding to receive notification of message arrival or force message forwarding at any
at any time. time.
SpamAssassin SpamAssassin
------------ ------------
The E-MailRelay server can use *Spam Assassin* [http://spamassassin.org] to mark The E-MailRelay server can use *SpamAssassin* [http://spamassassin.apache.org]
potential spam. To do this you will need to have a small shell script to call to mark or reject potential spam.
"spamassassin", and pass the name of this script to E-MailRelay using the
"--filter" command-line switch. 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: Your "--filter" shell script could look something like this:
#!/bin/sh #!/bin/sh
tmp="/tmp/`basename $0`.$$.tmp" spamassassin "$1" > "$1.tmp"
awk '{sub("\r$","");print}' "${1}" | spamassassin --local | awk '{print $0 "\r"}' > $tmp && mv $tmp "${1}" mv "$1.tmp" "$1"
rm -f $tmp 2>/dev/null
exit 0 exit 0
This just pipes the message content file into "spamassassin", using "awk" to Or an equivalent batch script on Windows:
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.
To delete spam altogether, rather than just marking it, you could add c:\Program Files\perl\site\bin\spamassassin.bat %1 > %1.tmp
"--exit-code" to the spamassassin command line and deal with messages according ren %1.tmp %1
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
exit 0 exit 0
On Windows there is less of a problem with carriage returns, but because You may need to set the "--filter-timeout" switch to control how long
"spamassassin" is a perl script it takes a bit of work to call it correctly: on E-MailRelay waits for the spam analysis to complete.
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.
An example JavaScript wrapper called "emailrelay-runperl.js" is included in You could also consider doing spam filtering off-line, completely independent
the distribution that by default calls "spamassassin". 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 There is also an experimental mechanism where E-MailRelay can talk direcly to
not on your path. 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 emailrelay --as-server --filter spam:localhost:783
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.
So this: This might be useful if spam filtering is creating a bottleneck in the
E-MailRelay server.
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.

View File

@ -1,13 +1,13 @@
E-MailRelay Windows installation E-MailRelay Windows
================================ ===================
Setup program Setup program
------------- -------------
Installing E-MailRelay on Windows should be straightfowrard if you have Installing E-MailRelay on Windows should be straightforward if you have
self-extracting archive program "emailrelay-setup.exe". Make sure that the setup self-extracting archive program "emailrelay-setup.exe". Make sure that the
program is in a writeable directory with plenty of space on the disk because setup program is in a writeable directory with plenty of space on the disk
when you run it is will extract an installation GUI program plus dependent DLLs because when you run it is will extract an installation GUI program plus
in into the same directory. dependent DLLs in into the same directory.
The installation GUI program will take you through the installation options and The installation GUI program will take you through the installation options and
then install the run-time files into your chosen directory. 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-server --verbose" to the server shortcut properties.
* Add "--as-client myisp.net:smtp --hidden --client-auth c:/emailrelay.auth" to the client shortcut. * 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 Move shortcuts to "Startup" folders as necessary.
"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. 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 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. * 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. * 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 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 although the installation/configuration GUI can only be built with MinGW because
of its dependence on Qt. of its dependence on Qt.
There is a workspace file for MSVC 6 in the "src" directory. For MinGW please There is a Visual Studio workspace file for MSVC 6 in the "src" directory. For
follow the guidelines in "mingw-common.mak" also in the "src" directory. MinGW please follow the guidelines in "mingw-common.mak" which is also in the
"src" directory.

View File

@ -1,11 +1,11 @@
Summary: Simple e-mail message transfer agent and proxy using SMTP Summary: Simple e-mail message transfer agent and proxy using SMTP
Name: emailrelay Name: emailrelay
Version: 1.5 Version: 1.6
Release: 1 Release: 1
License: GPL License: GPL3
Group: System Environment/Daemons Group: System Environment/Daemons
URL: http://emailrelay.sourceforge.net/ 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 BuildRoot: /tmp/emailrelay-install
%description %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 messages are stored in a local spool directory, and then forwarded to the next
SMTP server on request. 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 only requiring the address of the target SMTP server to be put on the command
line. 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. automatically dropped into several independent POP3 mailboxes.
C++ source code is available for Linux, FreeBSD, MacOS X etc, and Windows. 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 %prep
%setup %setup
%build %build
./configure --enable-fhs --without-man2html --without-doxygen ./configure --enable-fhs --disable-gui --without-man2html --without-doxygen
make make
%install %install
@ -50,16 +50,46 @@ test "$RPM_BUILD_ROOT" = "/" || rm -rf "$RPM_BUILD_ROOT"
%config /etc/emailrelay.conf %config /etc/emailrelay.conf
/etc/emailrelay.conf.template /etc/emailrelay.conf.template
/etc/init.d/emailrelay /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
/usr/sbin/emailrelay-passwd /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 %changelog

View File

@ -1,11 +1,10 @@
# #
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> ## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
## ##
## This program is free software; you can redistribute it and/or ## This program is free software: you can redistribute it and/or modify
## modify it under the terms of the GNU General Public License ## it under the terms of the GNU General Public License as published by
## as published by the Free Software Foundation; either ## the Free Software Foundation, either version 3 of the License, or
## version 2 of the License, or (at your option) any later ## (at your option) any later version.
## version.
## ##
## This program is distributed in the hope that it will be useful, ## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of ## but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,11 +12,9 @@
## GNU General Public License for more details. ## GNU General Public License for more details.
## ##
## You should have received a copy of the GNU General Public License ## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software ## along with this program. If not, see <http://www.gnu.org/licenses/>.
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
# #
EXTRA_DIST = emailrelay.conf.template EXTRA_DIST = emailrelay.conf.template
sysconf_DATA = emailrelay.conf.template e_sysconf_DATA = emailrelay.conf.template
install-data-hook: 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

View File

@ -48,9 +48,9 @@ am__vpath_adj = case $$p in \
*) f=$$p;; \ *) f=$$p;; \
esac; esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(sysconfdir)" am__installdirs = "$(DESTDIR)$(e_sysconfdir)"
sysconfDATA_INSTALL = $(INSTALL_DATA) e_sysconfDATA_INSTALL = $(INSTALL_DATA)
DATA = $(sysconf_DATA) DATA = $(e_sysconf_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@ AMTAR = @AMTAR@
@ -104,7 +104,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@
POPLIB = @POPLIB@
QT_CFLAGS = @QT_CFLAGS@ QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@ QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
@ -133,8 +132,10 @@ dvidir = @dvidir@
e_docdir = @e_docdir@ e_docdir = @e_docdir@
e_examplesdir = @e_examplesdir@ e_examplesdir = @e_examplesdir@
e_initdir = @e_initdir@ e_initdir = @e_initdir@
e_libexecdir = @e_libexecdir@
e_qtmoc = @e_qtmoc@ e_qtmoc = @e_qtmoc@
e_spooldir = @e_spooldir@ e_spooldir = @e_spooldir@
e_sysconfdir = @e_sysconfdir@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
host_alias = @host_alias@ host_alias = @host_alias@
htmldir = @htmldir@ htmldir = @htmldir@
@ -163,7 +164,7 @@ top_srcdir = @top_srcdir@
# #
# #
EXTRA_DIST = emailrelay.conf.template EXTRA_DIST = emailrelay.conf.template
sysconf_DATA = emailrelay.conf.template e_sysconf_DATA = emailrelay.conf.template
all: all-am all: all-am
.SUFFIXES: .SUFFIXES:
@ -196,22 +197,22 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-sysconfDATA: $(sysconf_DATA) install-e_sysconfDATA: $(e_sysconf_DATA)
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
test -z "$(sysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(sysconfdir)" test -z "$(e_sysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(e_sysconfdir)"
@list='$(sysconf_DATA)'; for p in $$list; do \ @list='$(e_sysconf_DATA)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \ f=$(am__strip_dir) \
echo " $(sysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sysconfdir)/$$f'"; \ echo " $(e_sysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(e_sysconfdir)/$$f'"; \
$(sysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sysconfdir)/$$f"; \ $(e_sysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(e_sysconfdir)/$$f"; \
done done
uninstall-sysconfDATA: uninstall-e_sysconfDATA:
@$(NORMAL_UNINSTALL) @$(NORMAL_UNINSTALL)
@list='$(sysconf_DATA)'; for p in $$list; do \ @list='$(e_sysconf_DATA)'; for p in $$list; do \
f=$(am__strip_dir) \ f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(sysconfdir)/$$f'"; \ echo " rm -f '$(DESTDIR)$(e_sysconfdir)/$$f'"; \
rm -f "$(DESTDIR)$(sysconfdir)/$$f"; \ rm -f "$(DESTDIR)$(e_sysconfdir)/$$f"; \
done done
tags: TAGS tags: TAGS
TAGS: TAGS:
@ -250,7 +251,7 @@ check-am: all-am
check: check-am check: check-am
all-am: Makefile $(DATA) all-am: Makefile $(DATA)
installdirs: installdirs:
for dir in "$(DESTDIR)$(sysconfdir)"; do \ for dir in "$(DESTDIR)$(e_sysconfdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done done
install: install-am install: install-am
@ -295,13 +296,13 @@ info: info-am
info-am: info-am:
install-data-am: install-data-am: install-e_sysconfDATA
@$(NORMAL_INSTALL) @$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook $(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am install-dvi: install-dvi-am
install-exec-am: install-sysconfDATA install-exec-am:
install-html: install-html-am install-html: install-html-am
@ -331,23 +332,24 @@ ps: ps-am
ps-am: ps-am:
uninstall-am: uninstall-sysconfDATA uninstall-am: uninstall-e_sysconfDATA
.MAKE: install-am install-data-am install-strip .MAKE: install-am install-data-am install-strip
.PHONY: all all-am check check-am clean clean-generic distclean \ .PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distdir dvi dvi-am html html-am info info-am \ distclean-generic distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \ install install-am install-data install-data-am \
install-data-hook install-dvi install-dvi-am install-exec \ install-data-hook install-dvi install-dvi-am \
install-exec-am install-html install-html-am install-info \ install-e_sysconfDATA install-exec install-exec-am \
install-info-am install-man install-pdf install-pdf-am \ install-html install-html-am install-info install-info-am \
install-ps install-ps-am install-strip install-sysconfDATA \ install-man install-pdf install-pdf-am install-ps \
installcheck installcheck-am installdirs maintainer-clean \ install-ps-am install-strip installcheck installcheck-am \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ installdirs maintainer-clean maintainer-clean-generic \
pdf-am ps ps-am uninstall uninstall-am uninstall-sysconfDATA mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
uninstall-am uninstall-e_sysconfDATA
install-data-hook: 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. # 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. # Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: .NOEXPORT:

View File

@ -33,7 +33,7 @@
# Description: Specifies an interface to listen on. The default is to listen # 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 # 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 # 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 #interface 192.168.0.10
@ -76,24 +76,29 @@
# Name: domain # Name: domain
# Format: domain <fqdn> # Format: domain <fqdn>
# Description: Sets an override for this host's fully qualified domain name. # 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 #domain myhost.mydomain.net
# Name: forward # Name: forward
# Format: forward # Format: forward
# Description: Forwards stored mail on startup. Requires --forward-to. # Description: Forwards stored mail on startup. Requires --forward-to.
# This is implicit in the --as-proxy switch.
# #
#forward #forward
# Name: forward-to # Name: forward-to
# Format: forward-to <host:port> # 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 #forward-to smarthost.mydomain.net
# Name: immediate # Name: immediate
# Format: immediate # Format: immediate
# Description: Forwards each message as soon as it is received. Requires --forward-to. # Description: Forwards each message as soon as it is received. Requires --forward-to.
# This is implicit in the --as-proxy switch.
# #
#immediate #immediate
@ -112,7 +117,7 @@
# Name: poll # Name: poll
# Format: poll <period> # Format: poll <period>
# Description: Enables polling of the spool directory for new messages with the # 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 #poll 120
@ -148,7 +153,7 @@
# Name: pop # Name: pop
# Format: pop # Format: pop
# Description: Enables the pop server if enabled at build-time: use "./configure --enable-pop". # Description: Enables the pop server.
# #
#pop #pop
@ -174,7 +179,7 @@
# Name: pop-by-name # Name: pop-by-name
# Format: pop-by-name # Format: pop-by-name
# Description: Serves messages from a user-specific subdirectory of the main spool directory. # 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 #pop-by-name

View File

@ -1,11 +1,10 @@
# #
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> ## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
## ##
## This program is free software; you can redistribute it and/or ## This program is free software: you can redistribute it and/or modify
## modify it under the terms of the GNU General Public License ## it under the terms of the GNU General Public License as published by
## as published by the Free Software Foundation; either ## the Free Software Foundation, either version 3 of the License, or
## version 2 of the License, or (at your option) any later ## (at your option) any later version.
## version.
## ##
## This program is distributed in the hope that it will be useful, ## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of ## but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,8 +12,6 @@
## GNU General Public License for more details. ## GNU General Public License for more details.
## ##
## You should have received a copy of the GNU General Public License ## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software ## along with this program. If not, see <http://www.gnu.org/licenses/>.
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
# #
SUBDIRS = gcc2.95 msvc6.0 sunpro5 SUBDIRS = gcc2.95 msvc6.0 sunpro5

View File

@ -106,7 +106,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@
POPLIB = @POPLIB@
QT_CFLAGS = @QT_CFLAGS@ QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@ QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
@ -135,8 +134,10 @@ dvidir = @dvidir@
e_docdir = @e_docdir@ e_docdir = @e_docdir@
e_examplesdir = @e_examplesdir@ e_examplesdir = @e_examplesdir@
e_initdir = @e_initdir@ e_initdir = @e_initdir@
e_libexecdir = @e_libexecdir@
e_qtmoc = @e_qtmoc@ e_qtmoc = @e_qtmoc@
e_spooldir = @e_spooldir@ e_spooldir = @e_spooldir@
e_sysconfdir = @e_sysconfdir@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
host_alias = @host_alias@ host_alias = @host_alias@
htmldir = @htmldir@ htmldir = @htmldir@

View File

@ -1,11 +1,10 @@
# #
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> ## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
## ##
## This program is free software; you can redistribute it and/or ## This program is free software: you can redistribute it and/or modify
## modify it under the terms of the GNU General Public License ## it under the terms of the GNU General Public License as published by
## as published by the Free Software Foundation; either ## the Free Software Foundation, either version 3 of the License, or
## version 2 of the License, or (at your option) any later ## (at your option) any later version.
## version.
## ##
## This program is distributed in the hope that it will be useful, ## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of ## but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
## GNU General Public License for more details. ## GNU General Public License for more details.
## ##
## You should have received a copy of the GNU General Public License ## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software ## along with this program. If not, see <http://www.gnu.org/licenses/>.
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
# #
EXTRA_DIST = iostream limits sstream xlocale EXTRA_DIST = iostream limits sstream xlocale

View File

@ -97,7 +97,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@
POPLIB = @POPLIB@
QT_CFLAGS = @QT_CFLAGS@ QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@ QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
@ -126,8 +125,10 @@ dvidir = @dvidir@
e_docdir = @e_docdir@ e_docdir = @e_docdir@
e_examplesdir = @e_examplesdir@ e_examplesdir = @e_examplesdir@
e_initdir = @e_initdir@ e_initdir = @e_initdir@
e_libexecdir = @e_libexecdir@
e_qtmoc = @e_qtmoc@ e_qtmoc = @e_qtmoc@
e_spooldir = @e_spooldir@ e_spooldir = @e_spooldir@
e_sysconfdir = @e_sysconfdir@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
host_alias = @host_alias@ host_alias = @host_alias@
htmldir = @htmldir@ htmldir = @htmldir@

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
/// ///
/// \file iostream /// \file iostream

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
/// ///
/// \file limits /// \file limits

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
/// ///
/// \file sstream /// \file sstream

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
/// ///
/// \file xlocale /// \file xlocale

View File

@ -1,11 +1,10 @@
# #
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> ## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
## ##
## This program is free software; you can redistribute it and/or ## This program is free software: you can redistribute it and/or modify
## modify it under the terms of the GNU General Public License ## it under the terms of the GNU General Public License as published by
## as published by the Free Software Foundation; either ## the Free Software Foundation, either version 3 of the License, or
## version 2 of the License, or (at your option) any later ## (at your option) any later version.
## version.
## ##
## This program is distributed in the hope that it will be useful, ## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of ## but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
## GNU General Public License for more details. ## GNU General Public License for more details.
## ##
## You should have received a copy of the GNU General Public License ## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software ## along with this program. If not, see <http://www.gnu.org/licenses/>.
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
# #
EXTRA_DIST = cstdio cstdlib cstring ctime cmath cstddef EXTRA_DIST = cstdio cstdlib cstring ctime cmath cstddef

View File

@ -97,7 +97,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@
POPLIB = @POPLIB@
QT_CFLAGS = @QT_CFLAGS@ QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@ QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
@ -126,8 +125,10 @@ dvidir = @dvidir@
e_docdir = @e_docdir@ e_docdir = @e_docdir@
e_examplesdir = @e_examplesdir@ e_examplesdir = @e_examplesdir@
e_initdir = @e_initdir@ e_initdir = @e_initdir@
e_libexecdir = @e_libexecdir@
e_qtmoc = @e_qtmoc@ e_qtmoc = @e_qtmoc@
e_spooldir = @e_spooldir@ e_spooldir = @e_spooldir@
e_sysconfdir = @e_sysconfdir@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
host_alias = @host_alias@ host_alias = @host_alias@
htmldir = @htmldir@ htmldir = @htmldir@

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
/// ///
/// \file cmath /// \file cmath

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
/// ///
/// \file cstddef /// \file cstddef

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
/// ///
/// \file cstdio /// \file cstdio

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
/// ///
/// \file cstdlib /// \file cstdlib

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
/// ///
/// \file cstring /// \file cstring

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
/// ///
/// \file ctime /// \file ctime

View File

@ -1,11 +1,10 @@
# #
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> ## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
## ##
## This program is free software; you can redistribute it and/or ## This program is free software: you can redistribute it and/or modify
## modify it under the terms of the GNU General Public License ## it under the terms of the GNU General Public License as published by
## as published by the Free Software Foundation; either ## the Free Software Foundation, either version 3 of the License, or
## version 2 of the License, or (at your option) any later ## (at your option) any later version.
## version.
## ##
## This program is distributed in the hope that it will be useful, ## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of ## but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,8 +12,6 @@
## GNU General Public License for more details. ## GNU General Public License for more details.
## ##
## You should have received a copy of the GNU General Public License ## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software ## along with this program. If not, see <http://www.gnu.org/licenses/>.
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
# #
EXTRA_DIST = xar EXTRA_DIST = xar

View File

@ -94,7 +94,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@
POPLIB = @POPLIB@
QT_CFLAGS = @QT_CFLAGS@ QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@ QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
@ -123,8 +122,10 @@ dvidir = @dvidir@
e_docdir = @e_docdir@ e_docdir = @e_docdir@
e_examplesdir = @e_examplesdir@ e_examplesdir = @e_examplesdir@
e_initdir = @e_initdir@ e_initdir = @e_initdir@
e_libexecdir = @e_libexecdir@
e_qtmoc = @e_qtmoc@ e_qtmoc = @e_qtmoc@
e_spooldir = @e_spooldir@ e_spooldir = @e_spooldir@
e_sysconfdir = @e_sysconfdir@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
host_alias = @host_alias@ host_alias = @host_alias@
htmldir = @htmldir@ htmldir = @htmldir@

View File

@ -2,11 +2,10 @@
# #
# Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> # Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
# #
# This program is free software; you can redistribute it and/or # This program is free software: you can redistribute it and/or modify
# modify it under the terms of the GNU General Public License # it under the terms of the GNU General Public License as published by
# as published by the Free Software Foundation; either # the Free Software Foundation, either version 3 of the License, or
# version 2 of the License, or (at your option) any later # (at your option) any later version.
# version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -14,9 +13,7 @@
# GNU General Public License for more details. # GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program. If not, see <http://www.gnu.org/licenses/>.
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# === # ===
# #
# xar # xar

View File

@ -1,11 +1,10 @@
# #
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> ## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
## ##
## This program is free software; you can redistribute it and/or ## This program is free software: you can redistribute it and/or modify
## modify it under the terms of the GNU General Public License ## it under the terms of the GNU General Public License as published by
## as published by the Free Software Foundation; either ## the Free Software Foundation, either version 3 of the License, or
## version 2 of the License, or (at your option) any later ## (at your option) any later version.
## version.
## ##
## This program is distributed in the hope that it will be useful, ## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of ## but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
## GNU General Public License for more details. ## GNU General Public License for more details.
## ##
## You should have received a copy of the GNU General Public License ## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software ## along with this program. If not, see <http://www.gnu.org/licenses/>.
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
# #
EXTRA_DIST = mingw.mak mingw-common.mak emailrelay.dsw EXTRA_DIST = mingw.mak mingw-common.mak emailrelay.dsw
SUBDIRS = glib gnet gsmtp gpop main win32 gui SUBDIRS = glib gnet gsmtp gpop main win32 gui

View File

@ -106,7 +106,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@
POPLIB = @POPLIB@
QT_CFLAGS = @QT_CFLAGS@ QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@ QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
@ -135,8 +134,10 @@ dvidir = @dvidir@
e_docdir = @e_docdir@ e_docdir = @e_docdir@
e_examplesdir = @e_examplesdir@ e_examplesdir = @e_examplesdir@
e_initdir = @e_initdir@ e_initdir = @e_initdir@
e_libexecdir = @e_libexecdir@
e_qtmoc = @e_qtmoc@ e_qtmoc = @e_qtmoc@
e_spooldir = @e_spooldir@ e_spooldir = @e_spooldir@
e_sysconfdir = @e_sysconfdir@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
host_alias = @host_alias@ host_alias = @host_alias@
htmldir = @htmldir@ htmldir = @htmldir@

View File

@ -72,6 +72,18 @@ Package=<4>
############################################################################### ###############################################################################
Project: "service"=".\main\service.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "submit"=".\main\submit.dsp" - Package Owner=<4> Project: "submit"=".\main\submit.dsp" - Package Owner=<4>
Package=<5> Package=<5>

View File

@ -1,11 +1,10 @@
# #
## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> ## Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
## ##
## This program is free software; you can redistribute it and/or ## This program is free software: you can redistribute it and/or modify
## modify it under the terms of the GNU General Public License ## it under the terms of the GNU General Public License as published by
## as published by the Free Software Foundation; either ## the Free Software Foundation, either version 3 of the License, or
## version 2 of the License, or (at your option) any later ## (at your option) any later version.
## version.
## ##
## This program is distributed in the hope that it will be useful, ## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of ## but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
## GNU General Public License for more details. ## GNU General Public License for more details.
## ##
## You should have received a copy of the GNU General Public License ## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software ## along with this program. If not, see <http://www.gnu.org/licenses/>.
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
##
# #
EXTRA_DIST=\ EXTRA_DIST=\
garg_win32.cpp \ garg_win32.cpp \
@ -23,13 +20,12 @@ EXTRA_DIST=\
gdaemon_win32.cpp \ gdaemon_win32.cpp \
gdatetime_win32.cpp \ gdatetime_win32.cpp \
gdirectory_win32.cpp \ gdirectory_win32.cpp \
gexecutable_win32.cpp \
gfs_win32.cpp \ gfs_win32.cpp \
gidentity_win32.cpp \ gidentity_win32.cpp \
glogoutput_win32.cpp \ glogoutput_win32.cpp \
gprocess_win32.cpp \ gprocess_win32.cpp \
gfile_win32.cpp \ gfile_win32.cpp \
gregistry_win32.cpp \
gregistry.h \
mingw.mak mingw.mak
INCLUDES = -I$(top_srcdir)/lib/$(COMPILER_VERSION) INCLUDES = -I$(top_srcdir)/lib/$(COMPILER_VERSION)
noinst_LIBRARIES = libglib.a noinst_LIBRARIES = libglib.a
@ -43,6 +39,8 @@ libglib_a_SOURCES = \
gconvert.h \ gconvert.h \
gcleanup.h \ gcleanup.h \
gcleanup_unix.cpp \ gcleanup_unix.cpp \
gcounter.cpp \
gcounter.h \
gdaemon.h \ gdaemon.h \
gdaemon_unix.cpp \ gdaemon_unix.cpp \
gdate.cpp \ gdate.cpp \
@ -57,8 +55,9 @@ libglib_a_SOURCES = \
gdirectory_unix.cpp \ gdirectory_unix.cpp \
gexception.cpp \ gexception.cpp \
gexception.h \ gexception.h \
gexe.cpp \ gexecutable_unix.cpp \
gexe.h \ gexecutable.cpp \
gexecutable.h \
gfile.cpp \ gfile.cpp \
gfile.h \ gfile.h \
gfile_unix.cpp \ gfile_unix.cpp \
@ -86,12 +85,16 @@ libglib_a_SOURCES = \
groot.cpp \ groot.cpp \
groot.h \ groot.h \
gsetter.h \ gsetter.h \
gsignalsafe.h \
gsleep.h \
gslot.cpp \ gslot.cpp \
gslot.h \ gslot.h \
gstatemachine.h \ gstatemachine.h \
gstr.cpp \ gstr.cpp \
gstr.h \ gstr.h \
gstrings.h \ gstrings.h \
gtest.cpp \
gtest.h \
gtime.cpp \ gtime.cpp \
gtime.h \ gtime.h \
gxtext.cpp \ gxtext.cpp \

View File

@ -45,16 +45,18 @@ ARFLAGS = cru
libglib_a_AR = $(AR) $(ARFLAGS) libglib_a_AR = $(AR) $(ARFLAGS)
libglib_a_LIBADD = libglib_a_LIBADD =
am_libglib_a_OBJECTS = md5.$(OBJEXT) garg.$(OBJEXT) \ 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) \ gdaemon_unix.$(OBJEXT) gdate.$(OBJEXT) gdatetime.$(OBJEXT) \
gdatetime_unix.$(OBJEXT) gdirectory.$(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) \ gfile.$(OBJEXT) gfile_unix.$(OBJEXT) gfs_unix.$(OBJEXT) \
ggetopt.$(OBJEXT) gidentity_unix.$(OBJEXT) glog.$(OBJEXT) \ ggetopt.$(OBJEXT) gidentity_unix.$(OBJEXT) glog.$(OBJEXT) \
glogoutput.$(OBJEXT) glogoutput_unix.$(OBJEXT) \ glogoutput.$(OBJEXT) glogoutput_unix.$(OBJEXT) \
gmd5_native.$(OBJEXT) gpath.$(OBJEXT) gpidfile.$(OBJEXT) \ gmd5_native.$(OBJEXT) gpath.$(OBJEXT) gpidfile.$(OBJEXT) \
gprocess_unix.$(OBJEXT) groot.$(OBJEXT) gslot.$(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) libglib_a_OBJECTS = $(am_libglib_a_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@ DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp depcomp = $(SHELL) $(top_srcdir)/depcomp
@ -125,7 +127,6 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@ PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@ PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG = @PKG_CONFIG@
POPLIB = @POPLIB@
QT_CFLAGS = @QT_CFLAGS@ QT_CFLAGS = @QT_CFLAGS@
QT_LIBS = @QT_LIBS@ QT_LIBS = @QT_LIBS@
RANLIB = @RANLIB@ RANLIB = @RANLIB@
@ -154,8 +155,10 @@ dvidir = @dvidir@
e_docdir = @e_docdir@ e_docdir = @e_docdir@
e_examplesdir = @e_examplesdir@ e_examplesdir = @e_examplesdir@
e_initdir = @e_initdir@ e_initdir = @e_initdir@
e_libexecdir = @e_libexecdir@
e_qtmoc = @e_qtmoc@ e_qtmoc = @e_qtmoc@
e_spooldir = @e_spooldir@ e_spooldir = @e_spooldir@
e_sysconfdir = @e_sysconfdir@
exec_prefix = @exec_prefix@ exec_prefix = @exec_prefix@
host_alias = @host_alias@ host_alias = @host_alias@
htmldir = @htmldir@ htmldir = @htmldir@
@ -189,13 +192,12 @@ EXTRA_DIST = \
gdaemon_win32.cpp \ gdaemon_win32.cpp \
gdatetime_win32.cpp \ gdatetime_win32.cpp \
gdirectory_win32.cpp \ gdirectory_win32.cpp \
gexecutable_win32.cpp \
gfs_win32.cpp \ gfs_win32.cpp \
gidentity_win32.cpp \ gidentity_win32.cpp \
glogoutput_win32.cpp \ glogoutput_win32.cpp \
gprocess_win32.cpp \ gprocess_win32.cpp \
gfile_win32.cpp \ gfile_win32.cpp \
gregistry_win32.cpp \
gregistry.h \
mingw.mak mingw.mak
INCLUDES = -I$(top_srcdir)/lib/$(COMPILER_VERSION) INCLUDES = -I$(top_srcdir)/lib/$(COMPILER_VERSION)
@ -210,6 +212,8 @@ libglib_a_SOURCES = \
gconvert.h \ gconvert.h \
gcleanup.h \ gcleanup.h \
gcleanup_unix.cpp \ gcleanup_unix.cpp \
gcounter.cpp \
gcounter.h \
gdaemon.h \ gdaemon.h \
gdaemon_unix.cpp \ gdaemon_unix.cpp \
gdate.cpp \ gdate.cpp \
@ -224,8 +228,9 @@ libglib_a_SOURCES = \
gdirectory_unix.cpp \ gdirectory_unix.cpp \
gexception.cpp \ gexception.cpp \
gexception.h \ gexception.h \
gexe.cpp \ gexecutable_unix.cpp \
gexe.h \ gexecutable.cpp \
gexecutable.h \
gfile.cpp \ gfile.cpp \
gfile.h \ gfile.h \
gfile_unix.cpp \ gfile_unix.cpp \
@ -253,12 +258,16 @@ libglib_a_SOURCES = \
groot.cpp \ groot.cpp \
groot.h \ groot.h \
gsetter.h \ gsetter.h \
gsignalsafe.h \
gsleep.h \
gslot.cpp \ gslot.cpp \
gslot.h \ gslot.h \
gstatemachine.h \ gstatemachine.h \
gstr.cpp \ gstr.cpp \
gstr.h \ gstr.h \
gstrings.h \ gstrings.h \
gtest.cpp \
gtest.h \
gtime.cpp \ gtime.cpp \
gtime.h \ gtime.h \
gxtext.cpp \ 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.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/garg_unix.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)/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)/gdaemon_unix.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdate.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@ @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.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdirectory_unix.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)/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.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gfile_unix.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@ @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)/groot.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gslot.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)/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)/gtime.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gxtext.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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Po@am__quote@

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
// //
// garg.cpp // garg.cpp
@ -29,6 +26,20 @@
#include "gassert.h" #include "gassert.h"
#include <cstring> #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() G::Arg::Arg()
{ {
// now use parse() // now use parse()
@ -50,18 +61,6 @@ G::Arg & G::Arg::operator=( const Arg & rhs )
return *this ; 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() void G::Arg::setPrefix()
{ {
G_ASSERT( m_array.size() > 0U ) ; G_ASSERT( m_array.size() > 0U ) ;
@ -96,17 +95,17 @@ void G::Arg::protect( std::string & s )
{ {
// replace all quoted spaces with a replacement // replace all quoted spaces with a replacement
// (could do better: escaped quotes, tabs, single quotes) // (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 ; bool in_quote = false ;
const char quote = '"' ; const char quote = '"' ;
const char space = ' ' ; const char space = ' ' ;
const char replacement = '\0' ; 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( s.at(pos) == quote ) in_quote = ! in_quote ;
if( in_quote && s.at(pos) == space ) s[pos] = replacement ; 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 ) 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 ) ; return find( cs , sw , sw_args , NULL ) ;
} }
bool G::Arg::find( bool cs , const std::string & sw , size_t sw_args , bool G::Arg::find( bool cs , const std::string & sw , size_type sw_args , size_type * index_p ) const
size_t * 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() ) 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 ; return false ;
} }
//static
bool G::Arg::match( bool cs , const std::string & s1 , const std::string & s2 ) bool G::Arg::match( bool cs , const std::string & s1 , const std::string & s2 )
{ {
return 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) ; 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 ) ; const bool found = find( true , sw , sw_args , &i ) ;
if( found ) if( found )
removeAt( i , sw_args ) ; 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() ) ; G_ASSERT( sw_index > 0U && sw_index < m_array.size() ) ;
if( 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 ; StringArray::iterator p = m_array.begin() + sw_index ;
p = m_array.erase( p ) ; 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 ) ; 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 ) ; const bool found = find( true , sw , sw_args , &i ) ;
return found ? i : 0U ; return found ? i : 0U ;
} }
size_t G::Arg::c() const G::Arg::size_type G::Arg::c() const
{ {
return m_array.size() ; 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() ) ; G_ASSERT( i < m_array.size() ) ;
return m_array[i] ; return m_array[i] ;
@ -207,7 +205,6 @@ std::string G::Arg::prefix() const
return m_prefix ; return m_prefix ;
} }
//static
const char * G::Arg::prefix( char * argv [] ) // throw() const char * G::Arg::prefix( char * argv [] ) // throw()
{ {
const char * exe = argv[0] ; const char * exe = argv[0] ;

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
/// ///
/// \file garg.h /// \file garg.h
@ -47,6 +44,8 @@ namespace G
class G::Arg class G::Arg
{ {
public: public:
typedef unsigned int size_type ;
Arg( int argc , char *argv[] ) ; Arg( int argc , char *argv[] ) ;
///< Constructor taking argc/argv. ///< Constructor taking argc/argv.
@ -71,12 +70,12 @@ public:
~Arg() ; ~Arg() ;
///< Destructor. ///< Destructor.
size_t c() const ; size_type c() const ;
///< Returns the number of tokens in the ///< Returns the number of tokens in the
///< command line, including the program ///< command line, including the program
///< name. ///< name.
std::string v( size_t i ) const ; std::string v( size_type i ) const ;
///< Returns the i'th argument. ///< Returns the i'th argument.
///< Precondition: i < c() ///< Precondition: i < c()
@ -90,23 +89,21 @@ public:
///< block. ///< block.
bool contains( const std::string & sw , 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 ///< Returns true if the command line
///< contains the given switch with enough ///< contains the given switch with enough
///< command line arguments left to satisfy ///< command line arguments left to satisfy
///< the given number of switch arguments. ///< 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 the index of the given switch.
///< Returns zero if not present. ///< Returns zero if not present.
void remove( const std::string & sw , size_t sw_args = 0U ) ; bool remove( const std::string & sw , size_type sw_args = 0U ) ;
///< Removes the given switch and its ///< Removes the given switch and its arguments.
///< arguments. ///< Returns false if the switch does not exist.
///<
///< Precondition: contains()
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 ///< Removes the given argument and the
///< following 'sw_args' ones. ///< following 'sw_args' ones.
@ -118,7 +115,7 @@ public:
private: private:
static std::string moduleName( HINSTANCE h ) ; 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() ; void setPrefix() ;
static bool match( bool , const std::string & , const std::string & ) ; static bool match( bool , const std::string & , const std::string & ) ;
void parseCore( const std::string & ) ; void parseCore( const std::string & ) ;

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
// //
// garg_unix.cpp // garg_unix.cpp

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
// //
// garg_win32.cpp // garg_win32.cpp
@ -27,7 +24,7 @@
std::string G::Arg::moduleName( HINSTANCE hinstance ) std::string G::Arg::moduleName( HINSTANCE hinstance )
{ {
char buffer[260] ; char buffer[10000U] ;
size_t size = sizeof(buffer) ; size_t size = sizeof(buffer) ;
*buffer = '\0' ; *buffer = '\0' ;
::GetModuleFileName( hinstance , buffer , size-1U ) ; ::GetModuleFileName( hinstance , buffer , size-1U ) ;

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
/// ///
/// \file gassert.h /// \file gassert.h

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
/// ///
/// \file gcleanup.h /// \file gcleanup.h
@ -26,6 +23,7 @@
#include "gdef.h" #include "gdef.h"
#include "gpath.h" #include "gpath.h"
#include "gsignalsafe.h"
#include "gexception.h" #include "gexception.h"
/// \namespace G /// \namespace G
@ -47,7 +45,7 @@ public:
///< An optional early-initialisation function. ///< An optional early-initialisation function.
///< May be called more than once. ///< 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 ///< Adds the given handler to the list which
///< are to be called when the process ///< are to be called when the process
///< terminates abnormally. The handler ///< terminates abnormally. The handler

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
// //
// gcleanup_unix.cpp // gcleanup_unix.cpp
@ -45,7 +42,7 @@ namespace G
class G::CleanupImp class G::CleanupImp
{ {
public: 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 installDefault( int ) ;
static void callHandlers() ; static void callHandlers() ;
static void ignore( int ) ; static void ignore( int ) ;
@ -61,7 +58,7 @@ private:
/// A private linked-list structure used by G::CleanupImp. /// A private linked-list structure used by G::CleanupImp.
struct Link struct Link
{ {
void (*fn)(const char*) ; void (*fn)(SignalSafe,const char*) ;
const char * arg ; const char * arg ;
Link * next ; Link * next ;
} ; } ;
@ -79,7 +76,7 @@ void G::Cleanup::init()
CleanupImp::ignore( SIGPIPE ) ; 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 ) if( arg != NULL )
CleanupImp::add( fn , arg ) ; CleanupImp::add( fn , arg ) ;
@ -101,7 +98,7 @@ void G::CleanupImp::init()
//installHandler( SIGUSR2 ) ; //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 ; Link * p = new Link ;
p->fn = fn ; p->fn = fn ;
@ -156,13 +153,12 @@ void G::CleanupImp::ignore( int signum )
throw Error( "sigaction" ) ; throw Error( "sigaction" ) ;
} }
void G::CleanupImp::callHandlers() void G::CleanupImp::callHandlers()
{ {
G::Root claim_root ; G::Root claim_root ;
for( const Link * p = m_head ; p != NULL ; p = p->next ) for( const Link * p = m_head ; p != NULL ; p = p->next )
{ {
(*(p->fn))(p->arg) ; (*(p->fn))(SignalSafe(),p->arg) ;
} }
} }

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
// //
// gcleanup_win32.cpp // gcleanup_win32.cpp
@ -29,7 +26,7 @@ void G::Cleanup::init()
// no-op // no-op
} }
void G::Cleanup::add( void (*)(const char*) , const char * ) void G::Cleanup::add( void (*)(SignalSafe,const char*) , const char * )
{ {
// not implemented // not implemented
} }

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
/// ///
/// \file gconvert.h /// \file gconvert.h
@ -39,8 +36,7 @@ G_EXCEPTION( ConvertOverflow , "arithmetic overflow" ) ;
/// overflow checking. /// overflow checking.
/// \see boost::numeric_cast<>() /// \see boost::numeric_cast<>()
/// ///
template <class Tout, class Tin> template <typename Tout, typename Tin>
inline
Tout Convert( const Tin & in ) Tout Convert( const Tin & in )
{ {
Tout out = in ; Tout out = in ;

29
src/glib/gcounter.cpp Normal file
View 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
View 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

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
/// ///
/// \file gdaemon.h /// \file gdaemon.h

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
// //
// gdaemon_unix.cpp // gdaemon_unix.cpp
@ -25,14 +22,12 @@
#include "gdaemon.h" #include "gdaemon.h"
#include "gprocess.h" #include "gprocess.h"
//static
void G::Daemon::detach( PidFile & pid_file ) void G::Daemon::detach( PidFile & pid_file )
{ {
pid_file.check() ; // absolute path pid_file.check() ; // absolute path
detach() ; detach() ;
} }
//static
void G::Daemon::detach() void G::Daemon::detach()
{ {
// see Stevens, ISBN 0-201-563137-7, ch 13. // see Stevens, ISBN 0-201-563137-7, ch 13.

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
// //
// gdaemon_win32.cpp // gdaemon_win32.cpp
@ -25,13 +22,11 @@
#include "gdaemon.h" #include "gdaemon.h"
#include "gprocess.h" #include "gprocess.h"
//static
void G::Daemon::detach( PidFile & ) void G::Daemon::detach( PidFile & )
{ {
detach() ; detach() ;
} }
//static
void G::Daemon::detach() void G::Daemon::detach()
{ {
// no-op // no-op

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
// //
// gdate.cpp // gdate.cpp
@ -28,13 +25,11 @@
#include <iomanip> #include <iomanip>
#include <sstream> #include <sstream>
//static
int G::Date::yearUpperLimit() int G::Date::yearUpperLimit()
{ {
return 2035 ; // see mktime() return 2035 ; // see mktime()
} }
//static
int G::Date::yearLowerLimit() int G::Date::yearLowerLimit()
{ {
return 1970 ; // see mktime() return 1970 ; // see mktime()
@ -252,7 +247,6 @@ G::Date & G::Date::operator--()
return *this ; return *this ;
} }
//static
unsigned int G::Date::lastDay( unsigned int month , unsigned int year ) unsigned int G::Date::lastDay( unsigned int month , unsigned int year )
{ {
unsigned int end = 30U ; unsigned int end = 30U ;
@ -273,7 +267,6 @@ unsigned int G::Date::lastDay( unsigned int month , unsigned int year )
return end ; return end ;
} }
//static
bool G::Date::isLeapYear( unsigned int y ) bool G::Date::isLeapYear( unsigned int y )
{ {
return y >= 1800U && ( y % 400U == 0U || ( y % 100U != 0U && y % 4U == 0U ) ) ; return y >= 1800U && ( y % 400U == 0U || ( y % 100U != 0U && y % 4U == 0U ) ) ;

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
/// ///
/// \file gdate.h /// \file gdate.h

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
// //
// gdatetime.cpp // gdatetime.cpp

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
/// ///
/// \file gdatetime.h /// \file gdatetime.h
@ -59,10 +56,9 @@ public:
///< Converts from epoch time to local broken-down-time. ///< Converts from epoch time to local broken-down-time.
static Offset offset( EpochTime epoch_time ) ; static Offset offset( EpochTime epoch_time ) ;
///< Returns the offset between UTC and localtime ///< Returns the offset between UTC and localtime as at
///< as at 'epoch_time'. The returned pair has ///< 'epoch_time'. The returned pair has 'first' set to
///< 'first' set to true if localtime is ///< true if localtime is ahead of (ie. east of) UTC.
///< ahead of (ie. east of) UTC.
///< ///<
///< (Note that this may be a relatively expensive ///< (Note that this may be a relatively expensive
///< operation.) ///< operation.)

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
// //
// gdatetime_unix.cpp // gdatetime_unix.cpp

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
// //
// gdatetime_win32.cpp // gdatetime_win32.cpp

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
/// ///
/// \file gdebug.h /// \file gdebug.h

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
/// ///
/// \file gdef.h /// \file gdef.h
@ -66,10 +63,10 @@
/* Check operating-system switches /* Check operating-system switches
*/ */
#if !defined( G_WIN32 ) && !defined( G_UNIX ) #if !defined( G_WIN32 ) && !defined( G_UNIX )
#error invalid compilation switches #error invalid compilation switches - define G_WIN32 or G_UNIX
#endif #endif
#if defined( G_WIN32 ) && defined( G_UNIX ) #if defined( G_WIN32 ) && defined( G_UNIX )
#error invalid compilation switches #error invalid compilation switches - define G_WIN32 or G_UNIX
#endif #endif
/* Define supplementary o/s compilation switches /* Define supplementary o/s compilation switches
@ -107,8 +104,7 @@
#endif #endif
#endif #endif
/* Define Windows-style types (only used for /* Define Windows-style types (only used for unimplemented declarations under unix)
* unimplemented declarations under unix)
*/ */
#if ! defined( G_WINDOWS ) #if ! defined( G_WINDOWS )
typedef unsigned char BOOL ; typedef unsigned char BOOL ;
@ -117,8 +113,7 @@
typedef unsigned int HANDLE ; typedef unsigned int HANDLE ;
#endif #endif
/* Include commonly-used system headers (good for /* Include commonly-used system headers (good for pre-compilation)
* pre-compilation)
*/ */
#ifdef __cplusplus #ifdef __cplusplus
#include <cstddef> #include <cstddef>

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
// //
// gdirectory.cpp // gdirectory.cpp
@ -73,4 +70,53 @@ G::Path G::Directory::path() const
return m_path ; 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 /// \file gdirectory.cpp

View File

@ -1,11 +1,10 @@
// //
// Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net> // Copyright (C) 2001-2007 Graeme Walker <graeme_walker@users.sourceforge.net>
// //
// This program is free software; you can redistribute it and/or // This program is free software: you can redistribute it and/or modify
// modify it under the terms of the GNU General Public License // it under the terms of the GNU General Public License as published by
// as published by the Free Software Foundation; either // the Free Software Foundation, either version 3 of the License, or
// version 2 of the License, or (at your option) any later // (at your option) any later version.
// version.
// //
// This program is distributed in the hope that it will be useful, // This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -13,9 +12,7 @@
// GNU General Public License for more details. // GNU General Public License for more details.
// //
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program. If not, see <http://www.gnu.org/licenses/>.
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// === // ===
/// ///
/// \file gdirectory.h /// \file gdirectory.h
@ -28,6 +25,7 @@
#include "gpath.h" #include "gpath.h"
#include "gexception.h" #include "gexception.h"
#include <string> #include <string>
#include <vector>
#include <sys/types.h> #include <sys/types.h>
/// \namespace G /// \namespace G
@ -36,6 +34,7 @@ namespace G
class DirectoryIteratorImp ; class DirectoryIteratorImp ;
class Directory ; class Directory ;
class DirectoryIterator ; class DirectoryIterator ;
class DirectoryList ;
} }
/// \class G::Directory /// \class G::Directory
@ -59,8 +58,8 @@ public:
explicit Directory( const std::string & path ) ; explicit Directory( const std::string & path ) ;
///< Constructor. ///< Constructor.
virtual ~Directory() ; ~Directory() ;
///< Virtual destructor. ///< Destructor.
bool valid( bool for_creating_files = false ) const ; bool valid( bool for_creating_files = false ) const ;
///< Returns true if the object represents a valid ///< Returns true if the object represents a valid
@ -83,7 +82,7 @@ public:
Directory( const Directory & other ) ; Directory( const Directory & other ) ;
///< Copy constructor. ///< Copy constructor.
Directory &operator=( const Directory & ) ; Directory & operator=( const Directory & ) ;
///< Assignment operator. ///< Assignment operator.
static Directory root() ; static Directory root() ;
@ -101,8 +100,7 @@ private:
} ; } ;
/// \class G::DirectoryIterator /// \class G::DirectoryIterator
/// An iterator for Directory. /// A Directory iterator. The iteration model is
/// The iteration model is
/// \code /// \code
/// while(iter.more()) { (void)iter.filePath() ; } /// while(iter.more()) { (void)iter.filePath() ; }
/// \endcode /// \endcode
@ -121,7 +119,7 @@ public:
///< Returns true on error. The caller should stop the iteration. ///< Returns true on error. The caller should stop the iteration.
bool more() ; bool more() ;
///< Returns true if more. ///< Returns true if more and advances by one.
bool isDir() const ; bool isDir() const ;
///< Returns true if the current item is a directory. ///< Returns true if the current item is a directory.
@ -141,11 +139,48 @@ public:
///< Returns the name of the current item. ///< Returns the name of the current item.
private: private:
DirectoryIterator( const DirectoryIterator & ) ; DirectoryIterator( const DirectoryIterator & ) ; // not implemented
void operator=( const DirectoryIterator & ) ; void operator=( const DirectoryIterator & ) ; // not implemented
private: private:
DirectoryIteratorImp * m_imp ; 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 #endif

Some files were not shown because too many files have changed in this diff Show More