Commit Graph

26 Commits

Author SHA1 Message Date
Devin Carraway
19a0f5ded1 [PATCH] prefork: add multi-address support
Allows qpsmtpd-prefork to listen on multiple address/port combinations
simultaneously, based on the corresponding implementation in forkserver.

Signed-off-by: Robert <rspier@pobox.com>
2009-04-27 07:38:14 -07:00
Devin Carraway
6b81c68666 Sanitize the shell environment before loading modules 2009-04-15 01:44:34 -07:00
Devin Carraway
e8ee72a352 prefork: support --listen-address for consistency with forkserver
forkserver uses --listen-address to specify the listening socket address, while
prefork uses --interface.  Add the former as an alias for the latter, for
consistency & ease of integration.  The two still aren't commandline-compatible,
but they're fairly close.

Signed-off-by: Ask Bjørn Hansen <ask@develooper.com>
2009-04-11 14:45:10 -07:00
Ask Bjørn Hansen
ff0c6134a9 Update URL 2009-04-02 23:35:05 -07:00
Radu Greab
f4afd7a18d Diego warned me that the construct I used, signal sent to negative PID, is not portable. Replaced it with his construct, the negative signal. Also added the short sleep after socket close, as in his patch.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@948 958fd67b-6ff1-0310-b445-bb7760255be9
2008-09-29 10:11:33 +00:00
Matt Sergeant
59b826d4bb Fix to check client is writable before writing to it.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@946 958fd67b-6ff1-0310-b445-bb7760255be9
2008-09-26 17:40:04 +00:00
Diego d'Ambra
03c2bf7608 prefork: improve shutdown of parent (and children) on very busy systems
To improve the shutdown of parent and children, send the exiting signal
 to the process group (maybe %children is not up to date on very busy
 systems).

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@943 958fd67b-6ff1-0310-b445-bb7760255be9
2008-09-04 11:43:52 +00:00
Radu Greab
ab6dd83b6c Clean up exit codes.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@942 958fd67b-6ff1-0310-b445-bb7760255be9
2008-09-04 11:43:08 +00:00
Diego d'Ambra
409372ce58 Detect and reset locked shared memory.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@941 958fd67b-6ff1-0310-b445-bb7760255be9
2008-09-04 11:42:35 +00:00
Radu Greab
aa802e6844 Untaint the value of the --interface option.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@940 958fd67b-6ff1-0310-b445-bb7760255be9
2008-09-04 11:41:48 +00:00
Radu Greab
e4f0cb0f8c Inside the main loop skip the sleep when children have exited. Instead, proceed directly to the pool adjustment. While at it, simplify processing by moving the update of shared memory from the SIGCHLD handler to the main loop.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@939 958fd67b-6ff1-0310-b445-bb7760255be9
2008-09-04 11:41:13 +00:00
Diego d'Ambra
18d1b9f1da Detach and daemonize only after reading the configuration and loading the plugins, to give the init scripts a chance to detect failed startups due to broken configuration or plugins.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@938 958fd67b-6ff1-0310-b445-bb7760255be9
2008-09-04 11:38:54 +00:00
Hanno Hecker
a64742cc7c prefork, forkserver: restart on SIGHUP: * reset to defaults * clear config cache * reload all plugins (includes compiling, register()/init())
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@927 958fd67b-6ff1-0310-b445-bb7760255be9
2008-06-15 09:28:02 +00:00
Hanno Hecker
f0a27f8c37 prefork: --pid-file option now works
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@907 958fd67b-6ff1-0310-b445-bb7760255be9
2008-05-15 17:07:33 +00:00
Hanno Hecker
502e1d286e prefork: - add --detach option to daemonize like forkserver
- use user/group switching from forkserver to support secondary
	   groups (needed with plugins/queue/postfix-queue)


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@905 958fd67b-6ff1-0310-b445-bb7760255be9
2008-05-14 19:09:02 +00:00
Hanno Hecker
ea243c2f2f add reset() to Qpsmtpd::Connection to clear the connection notes after
the post-connection hooks - needed for -prefork and STARTTLS


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@893 958fd67b-6ff1-0310-b445-bb7760255be9
2008-05-09 17:40:31 +00:00
Hanno Hecker
0be3400ede prefork: using POSIX::dup2 failed after a few million connections, so
close and reopen STDIN (S. Priebe)


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@798 958fd67b-6ff1-0310-b445-bb7760255be9
2007-09-25 06:10:23 +00:00
Hanno Hecker
2a5c554cf9 prefork: support two or more parallel running instances (on different ports).
* no 4 or 5 digit long port numbers where the first four digits are the 
    same are supported (e.g. 20025, 20026, 2002), see IPC::Shareable.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@787 958fd67b-6ff1-0310-b445-bb7760255be9
2007-09-03 16:28:34 +00:00
Hanno Hecker
85cd1aae2b prefork: clear a previously running instance by cloning the base instance
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@784 958fd67b-6ff1-0310-b445-bb7760255be9
2007-09-02 07:32:57 +00:00
Hanno Hecker
f1281afe99 prefork: fix missing "->new" after IO::Socket::INET
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@760 958fd67b-6ff1-0310-b445-bb7760255be9
2007-07-30 17:44:58 +00:00
Matt Sergeant
ccf990e032 IPv6 support from issue #7.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@740 958fd67b-6ff1-0310-b445-bb7760255be9
2007-05-17 22:16:27 +00:00
John Peacock
b7f468404b Fixup qpsmtpd-prefork, et al, to correctly load Constants.
Make child process pretty name optional for qpsmtpd-prefork.
Ignore rather than crash for uninstalled plugins.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@675 958fd67b-6ff1-0310-b445-bb7760255be9
2006-11-22 16:30:37 +00:00
John Peacock
3837fabc9f Ask and ye shall receive
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@659 958fd67b-6ff1-0310-b445-bb7760255be9
2006-09-14 19:48:37 +00:00
John Peacock
9bb950d1d0 Additional patch to qpsmtpd-prefork from Lars Roland:
Patch against current svn which removes references to highperf, and
  various other cleanups in the code.  

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@641 958fd67b-6ff1-0310-b445-bb7760255be9
2006-06-01 14:13:44 +00:00
John Peacock
e9e95dd09b Patch to qpsmtpd-prefork from Matt Sergeant:
missing disconnect code, so QUIT never works
  removes the daemonize stuff

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@640 958fd67b-6ff1-0310-b445-bb7760255be9
2006-05-31 21:06:40 +00:00
John Peacock
67dc86e255 New pre-forking qpsmtpd daemon, courtesy of Lars Roland at SoftScan.
Initial load with minor tweaks by John Peacock.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@639 958fd67b-6ff1-0310-b445-bb7760255be9
2006-05-31 20:54:03 +00:00