rather than ->transaction() when passing to hook)
Merge some other changes from 0.31.1 branch
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@582 958fd67b-6ff1-0310-b445-bb7760255be9
Support a finished() callback as the readable() thing didn't work.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@577 958fd67b-6ff1-0310-b445-bb7760255be9
from plugins/count_unrecognized_commands kicks in.
Several buffered lines are read and processed by
Danga::Client::process_read_buf() without checking if the socket was
closed. The attached patch seems to fix it.
-- Brian Grossman
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@571 958fd67b-6ff1-0310-b445-bb7760255be9
RFC-2821 Section 4.5.1 specifically requires <postmaster> (without
domain name) as a legal RCPT TO: address.
* t/qpsmtpd-address.t
Test the above.
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@560 958fd67b-6ff1-0310-b445-bb7760255be9
Add POD to describe how to use the objects. Make the addr_cmp
method private (no need to expose it).
* t/qpsmtpd-address.t
Include tests of overloaded comparison, including sorting.
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@559 958fd67b-6ff1-0310-b445-bb7760255be9
Don't overload '<=>' operator casually. Swap host/user portion
when comparing (makes it easy to sort by domain).
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@558 958fd67b-6ff1-0310-b445-bb7760255be9
Since we are already overloading stringify, we might as well
overload comparisons as well (this may be too simplistic a test).
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@557 958fd67b-6ff1-0310-b445-bb7760255be9
lib/Qpsmtpd/SMTP.pm
Take the AUTH method and put it in SMTP.pm where it belongs.
* lib/Qpsmtpd.pm
lib/Qpsmtpd/Plugin.pm
Expose the auth_user/auth_mechanism property to plugin writers.
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@556 958fd67b-6ff1-0310-b445-bb7760255be9
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
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
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
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
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
this nastiness in the auth support instead. But this works for now.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@541 958fd67b-6ff1-0310-b445-bb7760255be9
superficial research suggests that some MTAs have unexpectedly short timeouts
waiting for SMTP greetings (default of 30sec for Exim4.5, most notably)
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@534 958fd67b-6ff1-0310-b445-bb7760255be9
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
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