Commit Graph

507 Commits

Author SHA1 Message Date
John Peacock
a8b6956d81 * lib/Qpsmtpd/Transaction.pm
Fix fairly egregious error.  If the size_threashold is smaller than
    the body while writing, the file handle would be closed prematurely.
    Ouch.  I don't like it here from a stylistic point of view, but at 
    least it will actually work now.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@553 958fd67b-6ff1-0310-b445-bb7760255be9
2005-10-20 02:10:32 +00:00
John Peacock
e6efda626f * lib/Qpsmtpd/Address.pm
Convert objects to hash.  Neuter parse() to wrapper around new().
    Add overload stringify to $obj->format().

* t/qpsmtpd-address.t
    Remove tests specific to parse().  Add test for overloaded "".

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@552 958fd67b-6ff1-0310-b445-bb7760255be9
2005-10-10 15:49:50 +00:00
Matt Sergeant
111afb91db No strict refs when assigning to a glob
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@551 958fd67b-6ff1-0310-b445-bb7760255be9
2005-10-07 14:30:10 +00:00
John Peacock
b808a139cf * lib/Qpsmtpd/Transaction.pm
IO::File is buffering the message, so that the AV software doesn't get a
  a chance to scan anything when size_threshold > 0.

* qpsmtpd
  Apparently no one is running tcpserver any longer, since it wasn't loading
  the plugins anymore.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@550 958fd67b-6ff1-0310-b445-bb7760255be9
2005-09-23 19:16:37 +00:00
John Peacock
4b3fdf50bd * lib/Qpsmtpd.pm
By default, spool all messages to disk.

* config.sample/size_threshold
  Provide minimal explanation for how to avoid spooling small messages.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@549 958fd67b-6ff1-0310-b445-bb7760255be9
2005-09-22 17:29:13 +00:00
John Peacock
29ac60322e * lib/Qpsmtpd.pm
Rename config file from memory_threshold to size_threshold to track the
  internal usage.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@548 958fd67b-6ff1-0310-b445-bb7760255be9
2005-09-22 17:19:47 +00:00
John Peacock
9cbf206a4a * lib/Qpsmtpd/TcpServer.pm
Don't try to load the plugins if they are already loaded.

* lib/Qpsmtpd/Transaction.pm
  Get the size_threshold by inheritance.
  Extract the spooling of the body as a new sub.
  Always spool the body when calling body_filename().
  Compare the body_size to the cached size_threshold.

* lib/Qpsmtpd.pm
  Cache the size_threshold and provide an accessor method.

* qpsmtpd-forkserver
  Initialize both the spool_dir and size_threshold caches before forking.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@547 958fd67b-6ff1-0310-b445-bb7760255be9
2005-09-22 17:14:20 +00:00
Ask Bjørn Hansen
87baf0fbf1 yay for 4 space indentation (but let's not run this until post 0.31)
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@543 958fd67b-6ff1-0310-b445-bb7760255be9
2005-08-16 04:57:03 +00:00
Matt Sergeant
0d8d9f03b8 Merge from trunk r540:541
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@542 958fd67b-6ff1-0310-b445-bb7760255be9
2005-08-15 18:43:19 +00:00
Devin Carraway
6f23c46e93 Generalize '$include' support from plugin configuration to cover all config
calls.  Add circular-reference checking.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@537 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-31 05:54:36 +00:00
Devin Carraway
da5c0a74fe Fix unitialized-value warning if the PID file existed but was zero-length
at startup time.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@536 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-30 09:32:36 +00:00
Devin Carraway
bde5a3fef9 Merge r534 from trunk (caution about using large wait times in
check_earlytalker)


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@535 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-30 07:22:13 +00:00
Devin Carraway
347ce0dd0c Mention exim-bsmtp plugin in changelog
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@531 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-29 08:10:35 +00:00
Devin Carraway
81f71b4a88 Mention --detach in changelog
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@530 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-29 08:08:51 +00:00
Devin Carraway
deb3380d06 Apply slight variation on patch from Peter Holzer to allow specification of
an explicit $QPSMTPD_CONFIG variable to specify where the config lives,
overriding $QMAIL/control and /var/qmail/control if set.  The usual "last
location with the file wins" rule still applies.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@529 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-29 08:05:42 +00:00
Devin Carraway
a9bb35d180 Enable svn:keywords
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@528 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-29 07:41:54 +00:00
Devin Carraway
26bc3e25b8 Import Exim BSMTP queue plugin, updated to 0.31 API
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@527 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-29 07:41:10 +00:00
Devin Carraway
a4e4c5217c Fix whitespace (spaces for a tab)
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@526 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-29 07:24:04 +00:00
Devin Carraway
00e06cc612 Remove PID file on exit, if we were told to create one with --pid-file
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@525 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-29 07:22:36 +00:00
Devin Carraway
a2064bc22e Add --detach commandline option to forkserver; if supplied, daemonize just
prior to entering the main accept loop.

Split handling of --pid-file so that preexisting pid files are dealt with and
the file is opened before priveleges are dropped, but the writing out of the
new file happens after dropping privs and (if applicable) forking the
daemonized process, so the correct PID is recorded.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@524 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-29 06:42:00 +00:00
Devin Carraway
a3ff03fec9 Merge r493 from trunk to truncate PID file before re-use
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@523 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-29 06:21:02 +00:00
John Peacock
ea28e88fa6 Extend require_resolvable_fromhost to include a configurable list of
"impossible" addresses to combat spammer forging.  (Hanno Hecker)

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@522 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-28 20:25:54 +00:00
Ask Bjørn Hansen
37fb26af81 my suggestion for a .perltidyrc. I tried it on a few files and it
cleaned up more than it changed.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@520 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-23 11:11:32 +00:00
John Peacock
58f7129ada [merge from trunk] Use qmail/control/smtpdgreeting if it exists, otherwise
show the original qpsmtpd greeting (with version information).

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@518 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-19 14:20:05 +00:00
Matt Sergeant
820a3bcb2b return DECLINED for bad_ssl
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@516 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-18 12:51:57 +00:00
John Peacock
a69b2e1526 [merge from trunk] Missed hook to data_post to add headers
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@514 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-18 11:13:17 +00:00
Matt Sergeant
162cf7d132 Notice /var/qmail/control dir (Joe Schaefer)
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@509 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-15 21:13:49 +00:00
Matt Sergeant
bcbe2ac25f Don't do exists() on a method call
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@506 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-14 13:25:48 +00:00
John Peacock
3707751b42 This fixes the redefined warnings.
All plugins don't have register() any more, but they all have plugin_name().

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@505 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-14 11:05:11 +00:00
John Peacock
bfd72e8ade Fix test failures due to hook renames
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@504 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-14 10:38:11 +00:00
John Peacock
35f45f208b These changes to trunk were missed when 0.31 was branched.
r588@jpeacock (orig r490):  jpeacock | 2005-07-09 07:03:53 -0400
  r547@jpeacock:  jpeacock | 2005-07-02 07:20:17 -0400
  Replace pithy comment with something more neutral.
  Thanks Gordon Rowell <gordonr@gormand.com.au>
  r548@jpeacock:  jpeacock | 2005-07-02 07:24:21 -0400
  Example patterns for badrcptto plugin - Gordon Rowell <gordonr@gormand.com.au>
  r586@jpeacock:  jpeacock | 2005-07-09 06:54:47 -0400
  Don't use varlog() directly unless you are passing all parameters.
  Don't try to log() anything during loading of logging plugins.
  r587@jpeacock:  jpeacock | 2005-07-09 06:59:57 -0400
  Cannot use new-style hooking with logging plugins (yet).
 
 r590@jpeacock (orig r491):  jpeacock | 2005-07-10 06:56:55 -0400
  r589@jpeacock:  jpeacock | 2005-07-10 06:54:32 -0400
  Track hooks as array and hash.
  Re-revert changes to logging plugins to use new-style hooking.
  logging/adaptive assumed that register() has been called before hook_logging.
 


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@503 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-14 02:31:01 +00:00
Matt Sergeant
f0b31cbb9b MERGE 498:499 FROM https://svn.perl.org/qpsmtpd/trunk
Better fix for pipe being closed bug


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@500 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-12 22:14:48 +00:00
Matt Sergeant
11da7e2778 Work around race condition (not fixed, but mostly fixed)
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@495 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-11 16:00:03 +00:00
Matt Sergeant
8c018d75ac Pass args to unrecognized_command
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@494 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-11 12:24:26 +00:00
Matt Sergeant
8a3c3c40b0 tls support
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@489 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-08 16:50:24 +00:00
Ask Bjørn Hansen
ae83f011ac rename 0.31 branch
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@482 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-07 20:41:37 +00:00
Matt Sergeant
c78dad0a3b Revert to proper versions
git-svn-id: https://svn.perl.org/qpsmtpd/branches/v031@481 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-07 20:10:03 +00:00
Matt Sergeant
a1324b5ddb Version 0.31 branch
git-svn-id: https://svn.perl.org/qpsmtpd/branches/v031@480 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-07 19:48:19 +00:00
Robert Spier
90daeb3786 r483@dog: rspier | 2005-07-06 21:17:00 -0700
The great plugin renaming in the name of inheritance and standardization commit.
 
 1. new concept of standard hook_ names.
 2. Plugin::init
 3. renamed many subroutines in plugins (and cleaned up register subs)
 4. updated README.plugins
 


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@479 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-07 04:17:39 +00:00
Ask Bjørn Hansen
254b4fd2b2 return 500 rather than 521 for DENY in the unrecognized_command hook
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@478 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-06 22:22:29 +00:00
Matt Sergeant
7711e5a024 Fix docs for unrecognized_command
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@477 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-06 22:18:35 +00:00
Matt Sergeant
c3562e256d Allow DENY to be returned from unrecognised_command again
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@476 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-06 22:16:08 +00:00
Ask Bjørn Hansen
4f0c4d94a1 The unrecognized_command hook now understands the DENY_DISCONNECT return
and the DENY return is deprecated.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@473 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-06 21:52:45 +00:00
Matt Sergeant
d48cd2e37e No idea what that was doing in there...
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@472 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-06 20:36:02 +00:00
Matt Sergeant
71f6fc1dff Fix plugin docs to reflect reality
Re-order plugin docs to appear in the order things generally get called
Fix SMTP.pm to reflect what's documented in README.plugins :-)


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@471 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-06 20:30:14 +00:00
Matt Sergeant
6e01a45b0f Update PREREQ_PM
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@470 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-06 19:09:07 +00:00
Matt Sergeant
1988c490e2 Remove some changes cruft (it's in Changes after all)
Add reference to qpsmtpd-forkserver
Update required modules


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@469 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-06 19:06:01 +00:00
Ask Bjørn Hansen
96f8575bb5 lowercase distribution name
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@468 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-06 14:31:37 +00:00
Matt Sergeant
3fc6a4f318 Make sure we process all servers after select()
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@466 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-06 12:13:53 +00:00
Devin Carraway
1e68345cf2 Clean up whitespace (mainloop had a swath of 4-space indentation, while everything else used 2-space; also removed some tabs towards the beginning.)
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@465 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-06 07:53:41 +00:00