Commit Graph

40 Commits

Author SHA1 Message Date
Matt Simerson be9f4aef0c update tcpenv and lrpip calls to use -> syntax
don't load plugins twice.

Not exactly sure where that feature crept in some time ago. It was suppressed by checking to see if a queue plugin was already registered, and then bailing out on subsequent register_hook runs. I noticed it in testing, b/c I didn't have a queue plugin loaded. This removes the duplicate calls to register_hook.

* adds caching of the AUTH methods. You can't add new plugins or register new
  hooks w/o restarting QP, so cache the list and avoid having to generate it on every connection.

* other PBP changes (early exits, less indention, fewer unnecessary parens, etc.)
2015-01-28 19:58:58 -08:00
Matt Simerson 4a11e2cb71 Revert "Turn warnings into $qpsmtpd->log() calls" 2015-01-03 21:45:59 -08:00
Jared Johnson d3ec361ab8 Turn warnings into $qpsmtpd->log() calls
This can be convenient, especially when one wants to emit a warning that will
show up when running the test suite but still be properly logged in production
2014-12-15 20:07:45 -06:00
Jonathan Hall 897a1fd8aa Remove a ton of 'return ()', and a few other minor readability tweaks. 2014-09-17 20:28:51 -05:00
Matt Simerson a2816c50a7 update URL of Qpsmtpd web site to github 2014-05-21 12:44:10 -07:00
Matt Simerson 1e3136a0d0 revert movement of qp bins to bin/
plugin dir, config dir, spool dir, all have different logic about where/how to find their config. The logic needs some untangling and unification before attempting this again.
2013-08-05 15:05:37 -07:00
Matt Simerson 791237841b replace run with separate run for the 2 common
deployment methods. Rather than having to edit the run file, it's much easier to rename the run file.
Moved qpsmtpd* into bin/
2013-08-05 15:05:37 -07:00
Matt Simerson 6b431807c3 perltidy -b qpsmtpd* 2013-08-05 15:05:15 -07:00
Matt Simerson 1bfebd0bfd TcpServer, improve IPv6 support, by Michael Holzt 2013-08-05 15:02:17 -07:00
Hanno Hecker 0b0e4e911a prefork: use new instance instead of cloning
Create a new instance instead of cloning^copying the base instance,
see http://www.nntp.perl.org/group/perl.qpsmtpd/2008/07/msg8134.html ff.
2010-09-17 00:39:48 -07:00
Jared Johnson 04f8f7dd98 More robust child spawning for prefork
This should help the prefork daemon to keep up with demand better without using
much more in the way of resources

Signed-off-by: Ask Bjørn Hansen <ask@develooper.com>
2009-09-15 14:39:04 -07:00
Robert b2c3fd5625 Add back the use lib 'lib' to qpsmtpd-prefork.
(I messed up the git foo in 19a0f5ded1 when I initially tried to keep this.)
2009-06-02 15:41:39 -07:00
Charlie Brady 75decb184b Always call setsid, even when we're not daemonizing.
>> However, I'm back to seeing the connection processes being left behind,
>> despite an explicit quit from the remote host.
> It looks to me as though qpsmtpd should have started a new process
> group with the parent process, but hasn't. Or the developer assumed
> that qpsmtpd would be set up as leader of a process group, but it
> isn't in this circumstance.

Signed-off-by: Robert <rspier@pobox.com>
2009-06-02 15:39:41 -07:00
Devin Carraway 8527f784c0 prefork: Fix startup when no interface addresses are specified
Signed-off-by: Ask Bjørn Hansen <ask@develooper.com>
2009-06-02 15:37:31 -07:00
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