Commit Graph

502 Commits

Author SHA1 Message Date
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
John Peacock
508be70d26 ne is for strings, != is for numbers (Leonardo Helman)
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@636 958fd67b-6ff1-0310-b445-bb7760255be9
2006-04-26 15:31:03 +00:00
John Peacock
401ca8ce6e More descriptive POD for tls certificate support (Guillaume Filion).
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@635 958fd67b-6ff1-0310-b445-bb7760255be9
2006-04-25 00:08:20 +00:00
John Peacock
af93447e78 Redo AUTH PLAIN and AUTH LOGIN correctly(?) this time. (Michael Holzt)
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@634 958fd67b-6ff1-0310-b445-bb7760255be9
2006-04-24 15:48:24 +00:00
John Peacock
ff4e92bb4e Resolve ticket #38806 (Inadequate validation of authentication data)
Charlie Brady.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@633 958fd67b-6ff1-0310-b445-bb7760255be9
2006-04-07 19:21:10 +00:00
John Peacock
7c6cbdd000 Move the Qpsmtpd::Auth POD to a top-level README to be more obvious.
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@632 958fd67b-6ff1-0310-b445-bb7760255be9
2006-04-07 19:06:39 +00:00
John Peacock
8fcb46177b Add Qpsmtpd::Command to gather all parsing logic in one place (Hanno
Hecker)


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@631 958fd67b-6ff1-0310-b445-bb7760255be9
2006-04-07 18:58:02 +00:00
John Peacock
b89a6d9e4c * plugins/queue/smtp-forward
s/register/init/ to match new plugin style (jpeacock)

* lib/Qpsmtpd/Address.pm
  t/qpsmtpd-address.t
    Ill-formed addresses should return null not partial garbage.
    Resolves https://rt.perl.org/rt3/Ticket/Display.html?id=38746
    Patch by Hanno Hecker.

* plugins/virus/clamav
    Clamav alternate config file.
    Resolves https://rt.perl.org/rt3/Ticket/Display.html?id=38736
    Patch by Robin Bowes.

* lib/Qpsmtpd/SMTP.pm
  lib/Qpsmtpd.pm
    Return multiline responses from plugins.
    Resolves https://rt.perl.org/rt3/Ticket/Display.html?id=38741
    Patch by Charlie Brady.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@630 958fd67b-6ff1-0310-b445-bb7760255be9
2006-03-20 16:47:05 +00:00
Ask Bjørn Hansen
123346f1f5 r4567@g5: ask | 2006-03-09 04:35:43 -0800
move old branches aside


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@629 958fd67b-6ff1-0310-b445-bb7760255be9
2006-03-09 12:37:25 +00:00
John Peacock
3aa64debd8 remove way too agressive blocking of DENY'd servers
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@628 958fd67b-6ff1-0310-b445-bb7760255be9
2006-03-06 21:33:46 +00:00
John Peacock
bd19ded5a2 Need to cover situation where there are *no* hooks. Should we actually return
OK from run_hooks() in the case where no hooks are there to fire?

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@627 958fd67b-6ff1-0310-b445-bb7760255be9
2006-03-01 17:25:51 +00:00
John Peacock
82a32ed558 Automatically disconnect DENY'd server if it doesn't go willingly.
Implement queue_pre and queue_post hooks.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@626 958fd67b-6ff1-0310-b445-bb7760255be9
2006-03-01 16:46:55 +00:00
John Peacock
4a824a2e7d Improve support for listening to multiple ports and/or multiple IP addresses.
Document using plugins/tls to handle SMTPS (port 465).

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@625 958fd67b-6ff1-0310-b445-bb7760255be9
2006-03-01 16:44:20 +00:00
John Peacock
2c683f22ef Implement multiple IP:PORT listen in forkserver (Devin Carraway).
Add support in plugins/tls to use SMTPS (John Peacock).

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@624 958fd67b-6ff1-0310-b445-bb7760255be9
2006-02-28 21:10:11 +00:00
Devin Carraway
a07ed2ca77 Oops. Don't emit a newline between header and body when queueing over bsmtp,
because the body itself already contains one.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@623 958fd67b-6ff1-0310-b445-bb7760255be9
2006-02-28 07:04:52 +00:00
Ask Bjørn Hansen
3f8ab06a36 r4523@g5: ask | 2006-02-27 13:42:54 -0800
Improve Qpsmtpd::Transaction documentation (Fred Moyer)


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@622 958fd67b-6ff1-0310-b445-bb7760255be9
2006-02-27 21:43:08 +00:00
Ask Bjørn Hansen
00a73023c8 r4522@g5: ask | 2006-02-27 13:41:42 -0800
Make the clamdscan plugin temporarily deny mail if if can't talk to clamd
 (Filippo Carletti)


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@621 958fd67b-6ff1-0310-b445-bb7760255be9
2006-02-27 21:43:04 +00:00
Ask Bjørn Hansen
351f0b7f7f r4521@g5: ask | 2006-02-27 13:41:09 -0800
set the version to 0.33-dev


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@620 958fd67b-6ff1-0310-b445-bb7760255be9
2006-02-27 21:43:00 +00:00
Ask Bjørn Hansen
af79e2ffa2 r4516@g5: ask | 2006-02-26 05:02:30 -0800
change release date to today
 r4517@g5:  ask | 2006-02-26 05:03:34 -0800
 tag 0.32


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@618 958fd67b-6ff1-0310-b445-bb7760255be9
2006-02-26 12:22:16 +00:00
Ask Bjørn Hansen
3a1ad02b66 r4448@g5: ask | 2006-02-17 11:04:44 -0800
update license year


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@616 958fd67b-6ff1-0310-b445-bb7760255be9
2006-02-17 19:04:52 +00:00
Ask Bjørn Hansen
d8d7b7a407 r4445@g5: ask | 2006-02-17 11:00:12 -0800
prepare for 0.32 -- plan release for next thursday
 r4446@g5:  ask | 2006-02-17 11:00:48 -0800
 tag 0.32rc1


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@615 958fd67b-6ff1-0310-b445-bb7760255be9
2006-02-17 19:02:02 +00:00
John Peacock
3574e75cd1 Better handling of <> in address comparisons
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@614 958fd67b-6ff1-0310-b445-bb7760255be9
2006-02-07 18:42:16 +00:00
John Peacock
3361b73e50 Document changes to branch in preparation for releasing 0.32
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@613 958fd67b-6ff1-0310-b445-bb7760255be9
2006-02-07 11:14:04 +00:00
John Peacock
6f145149ae Apparently, I never tested TLS and AUTH at the same time. It turns out
that you have to explicitely read from <STDIN> in order for IO::Socket::SSL
to correctly translate the data (i.e. reading from <> isn't sufficient).

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@612 958fd67b-6ff1-0310-b445-bb7760255be9
2006-02-07 02:03:00 +00:00
John Peacock
16b2a9c766 Correct minor cut/paste error
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@610 958fd67b-6ff1-0310-b445-bb7760255be9
2006-02-05 01:28:44 +00:00
Devin Carraway
ffd453d012 Import file & syslog log plugins. File plugins include strftime(3) formatting
and unique session naming support based roughly on patch from pjh.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@609 958fd67b-6ff1-0310-b445-bb7760255be9
2006-02-02 08:46:49 +00:00
John Peacock
0f5d720359 Add explicit SSL_ca_file parameter to calls to create the SSL session.
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@604 958fd67b-6ff1-0310-b445-bb7760255be9
2006-01-25 14:50:47 +00:00
Ask Bjørn Hansen
a67b39e282 r4215@g5: ask | 2006-01-24 23:11:01 -0800
From:   gordonr@gormand.com.au
 Subject: Re: Submitting plugins (was Re: New plugin: denybounce)
 Date: January 24, 2006 9:02:35 PM PST
 To:   ask@develooper.com
 Cc:   gavin@openfusion.com.au, qpsmtpd@perl.org
 Message-Id: <43D7066B.3050106@gormand.com.au>
 
 Ask Bjørn Hansen wrote:
 On Jan 24, 2006, at 1:08 PM, Gordon Rowell wrote:
 - License statement - either as per qpsmtpd or as per Perl or  similar open license
 No, it really should be MIT licensed ("as per qpsmtpd") to go in the  distribution.
 There are a few exceptions (only your plugins at a cursory glance),  but those are mistakes.  :-)
 
 I don't have an issue with my qpsmtpd plugins being changed to state:
 
 
 =head1 AUTHOR
 
 Copyright 2005 Gordon Rowell <gordonr@gormand.com.au>
 
 This software is free software and may be distributed under the same
 terms as qpsmtpd itself.
 
 
 Though as a distro maintainer, we do have a sizeable issue with license proliferation. It really is a bit of a nightmare when two licenses are almost, but not completely, the same.
 
 Thanks,
 
 Gordon
 
 r4216@g5:  ask | 2006-01-24 23:12:21 -0800
 merge license fix from trunk


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@603 958fd67b-6ff1-0310-b445-bb7760255be9
2006-01-25 07:12:34 +00:00
John Peacock
1d0f889d3c Support for RFC 1893 - Enhanced Mail System Status Codes
Patch by Hanno Hecker <hah@uu-x.de>.

Adds the RFC 1893 status codes to the messages which are returned to the
sending client.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@602 958fd67b-6ff1-0310-b445-bb7760255be9
2006-01-25 02:59:31 +00:00
John Peacock
5c2c8455d5 Oops! Neglected to add this. Should have been part of r599.
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@601 958fd67b-6ff1-0310-b445-bb7760255be9
2006-01-11 17:03:45 +00:00
John Peacock
d228f9c11d this patch enables the configurable flags for the postfix-queue plugin.
By default no flags are set (old behaviour). Known flags for cleanup are
FLAG_FILTER, FLAG_BCC_OK and FLAG_MAP_OK, see POD for details.

Patch by: Hanno Hecker <hah@uu-x.de>

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@600 958fd67b-6ff1-0310-b445-bb7760255be9
2006-01-11 16:48:08 +00:00
John Peacock
c0920346e5 the pre-connection and post-connection hooks are not working in
qpsmtpd-forkserver. This patch merges Peter's patch (with the possibilty
to DENY/DENSOFT the connection) and my first attempt. The --max-from-ip
check was moved from core to the hosts_allow plugin. 

Patch by: Hanno Hecker <hah@uu-x.de>

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@599 958fd67b-6ff1-0310-b445-bb7760255be9
2006-01-11 16:21:08 +00:00
John Peacock
bfcd620a83 Fix problems with tls and relay_client.
* lib/Qpsmtpd/Connection.pm
    Abstract out parameters which can be reused (e.g. TLS) or can be
    set when creating the Connection object via start().

* plugins/tls
    Simplify code to use $self->clone() construct and also suppress
    IO::Socket::SSL debug noise, now that this is working.

* plugins/tls_cert
    New file to automate creating self-signed certificates for TLS.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@597 958fd67b-6ff1-0310-b445-bb7760255be9
2006-01-05 02:12:46 +00:00
Devin Carraway
239daaf55a Drop root privileges before loading plugins, rather than after. This reduces
root exposure, and avoids (e.g.) files being created as root which then won't
be writable by the normal qpsmtpd user.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@584 958fd67b-6ff1-0310-b445-bb7760255be9
2005-12-11 02:19:43 +00:00
John Peacock
c9779a3376 * plugins/virus/clamdscan
Use LOGNOTICE instead of LOGERROR when bailing early due to
    non-multipart message.

    Test clamd->ping() before scanning, and bail if it doesn't
    answer (with an appropriate error).

    Patch submitted by Dave Rolsky <autarch@urth.org>.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@583 958fd67b-6ff1-0310-b445-bb7760255be9
2005-12-10 21:11:04 +00:00
Ask Bjørn Hansen
27975f5cee r6471@embla: ask | 2005-11-18 01:37:48 -0800
version 0.31.1


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@574 958fd67b-6ff1-0310-b445-bb7760255be9
2005-11-18 09:43:01 +00:00
Ask Bjørn Hansen
3197905b4e r6446@embla: ask | 2005-11-18 01:30:05 -0800
rename 0.31 branch to 0.3x


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@573 958fd67b-6ff1-0310-b445-bb7760255be9
2005-11-18 09:42:45 +00:00
Ask Bjørn Hansen
c3aac1df0f r6445@embla: ask | 2005-11-18 01:29:10 -0800
oops, adding missing files to MANIFEST!  (thanks Budi Ang)


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@572 958fd67b-6ff1-0310-b445-bb7760255be9
2005-11-18 09:41:31 +00:00
Ask Bjørn Hansen
440068cf5c Update Changes file
Fix typo in README.plugins

prepare for 0.31 to be released wednesday


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@564 958fd67b-6ff1-0310-b445-bb7760255be9
2005-11-14 09:05:46 +00:00
John Peacock
8a18bb00a1 * lib/Qpsmtpd/Address.pm
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
2005-11-08 18:18:02 +00:00
John Peacock
37ec3b151e * lib/Qpsmtpd/Address.pm
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
2005-11-02 18:48:32 +00:00
John Peacock
3b09cc25d7 * lib/Qpsmtpd/Address.pm
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
2005-11-01 15:14:48 +00:00
John Peacock
7bc7916bda * lib/Qpsmtpd/Address.pm
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
2005-10-31 17:51:11 +00:00
John Peacock
5959cc1c32 * lib/Qpsmtpd/Auth.pm
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
2005-10-31 17:12:37 +00:00
John Peacock
e67bbed2ac * lib/Qpsmtpd/Transaction.pm
Doh!  I should flush() not close(), since other code assume the handle
    is still active.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@554 958fd67b-6ff1-0310-b445-bb7760255be9
2005-10-20 18:47:28 +00:00
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