Commit Graph

37 Commits

Author SHA1 Message Date
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
b085388cda TcpServer: optimize DNS lookups for PTR
a. don't use search path (/etc/resolv.conf)
b. explicitely specify PTR in query request
2013-12-01 03:45:12 -05:00
Matt Simerson
5b06929e95 find . -name '*.pm' -exec perltidy -b {} \; 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
Matt Simerson
96dd90f808 TcpServer: assign default value during declaration 2013-08-05 15:01:50 -07:00
Matt Simerson
c44db8c9e2 removed TODO, p0f v3 doesn't need that extra info 2012-05-06 16:01:57 -07:00
jaredj
5c3bd220aa Run hook_reset_transaction after all connections
This makes hook_reset_transaction a bit more useful by running it on
disconnections.  It also ensures that hook_disconnect runs when the
client disconnects without QUITing.
2010-09-15 14:32:53 +08:00
Matt Simerson
671a6953b0 add TCPLOCAL* variables to $qp->connection
(patch remade against latest rspier/qpsmtpd)

added remote_port, local_ip, local_port, and local_host to $qp->connection, as the p0f plugin relies on it.
added notes to TcpServer.pm and the p0f plugin noting the dependence, and the lack of support for models other than tcpserver.

Signed-off-by: Robert <rspier@pobox.com>
2010-05-11 21:15:57 -07:00
Filippo Carletti
660ed14823 don't initialize the hooks array if it is already initialized 2010-02-13 21:23:03 -08:00
Hanno Hecker
59ed062aa9 keep the square brackets around the IP as "remote_host" if the reverse lookup failed
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@957 958fd67b-6ff1-0310-b445-bb7760255be9
2008-11-16 08:28:29 +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
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
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
Peter J. Holzer
469c01a1f4 Increased log level of SMTP commands and responses to LOGINFO.
These may be useful during normal operations.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@685 958fd67b-6ff1-0310-b445-bb7760255be9
2006-12-16 10:01:50 +00:00
Peter J. Holzer
d2c79e9736 Added support for (x)inetd.
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@681 958fd67b-6ff1-0310-b445-bb7760255be9
2006-12-16 09:30:32 +00:00
John Peacock
6c3dc88f37 Buffer output of Qpsmtpd::TcpServer::respond() for broken clients who don't
follow RFC's for multiline responses.
Patch from Brian Szymanski <ski-qpsmtpd@allafrica.com>

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@664 958fd67b-6ff1-0310-b445-bb7760255be9
2006-10-04 13:49:49 +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
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
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
Matt Sergeant
d26797c6d2 Make the original string available in the Connection notes
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@357 958fd67b-6ff1-0310-b445-bb7760255be9
2005-01-30 05:40:24 +00:00
Robert Spier
1670530a1a more logging
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@347 958fd67b-6ff1-0310-b445-bb7760255be9
2004-11-27 06:41:06 +00:00
Robert Spier
ebcb01a54f Subject: [PATCH] Use timeoutsmtpd as well as timeout
from Justin Erenkrantz and John Peacock


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@344 958fd67b-6ff1-0310-b445-bb7760255be9
2004-11-25 19:50:18 +00:00
Matt Sergeant
bfd609fb32 Fix timeout config warnings.
Fix alarm not being reset at end of while loop


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@342 958fd67b-6ff1-0310-b445-bb7760255be9
2004-11-19 08:44:24 +00:00
Devin Carraway
15c90f04fa Log the connecting client hostname/address, rather than waiting for the
SMTP greeting.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@283 958fd67b-6ff1-0310-b445-bb7760255be9
2004-08-01 06:56:33 +00:00
Ask Bjørn Hansen
a9f0538bcc Don't keep adding ip addresses to the process status line ($0) when running under PPerl.
Include the date and time the session started in the process status line.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@233 958fd67b-6ff1-0310-b445-bb7760255be9
2004-06-05 10:06:44 +00:00
Matt Sergeant
9c700b18e1 New for 0.28: Log levels and $Include for config/plugins
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@217 958fd67b-6ff1-0310-b445-bb7760255be9
2004-03-05 12:46:24 +00:00
Ask Bjørn Hansen
1223c26ccf Filter out all uncommon characters from the remote_host
setting. (thanks to Frank Denis / Jedi/Sector One for the hint).


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@142 958fd67b-6ff1-0310-b445-bb7760255be9
2003-04-21 08:28:12 +00:00
Ask Bjørn Hansen
4c4360d038 Set the process name to "qpsmtpd [1.2.3.4 : host.name.tld]"
is it possible to embed ANSI escape codes in a hostname? Hmn, probably not.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@139 958fd67b-6ff1-0310-b445-bb7760255be9
2003-04-16 16:35:14 +00:00
Ask Bjørn Hansen
22ca786bac check_earlytalker plugin. Deny the connection if the client talks
before we show our SMTP banner.  (From Devin Carraway)

  Patch Qpsmtpd::SMTP to allow connect plugins to give DENY and
  DENYSOFT return codes.  Based on patch from Devin Carraway.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@133 958fd67b-6ff1-0310-b445-bb7760255be9
2003-04-15 17:01:43 +00:00
Ask Bjørn Hansen
806fcf25e8 Reorganize most of Qpsmtpd.pm into Qpsmtpd/SMTP.pm.
Add spool_dir option (thanks to Ross Mueller <ross@visual.com>)

  Add plugin name to the "hooks" data structure, so we can log plugin
  module had an error when we run a hook.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@78 958fd67b-6ff1-0310-b445-bb7760255be9
2002-09-24 10:56:35 +00:00
Ask Bjørn Hansen
8aa2bac088 work with perl 5.5.3
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@75 958fd67b-6ff1-0310-b445-bb7760255be9
2002-09-20 18:55:20 +00:00
Ask Bjørn Hansen
eed27e5fb1 Fixed "could not print ..." log warning.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@74 958fd67b-6ff1-0310-b445-bb7760255be9
2002-09-12 07:31:56 +00:00
Ask Bjørn Hansen
75e0f9e568 check that we are being started under tcpserver
git-svn-id: https://svn.perl.org/qpsmtpd/branches/v010@40 958fd67b-6ff1-0310-b445-bb7760255be9
2002-08-06 12:34:03 +00:00
Ask Bjørn Hansen
d9d509019d add "disconnect" hook
git-svn-id: https://svn.perl.org/qpsmtpd/branches/v010@35 958fd67b-6ff1-0310-b445-bb7760255be9
2002-07-15 11:49:49 +00:00
Ask Bjørn Hansen
e0d93d10ef semi working plugin stuff
git-svn-id: https://svn.perl.org/qpsmtpd/branches/v010@30 958fd67b-6ff1-0310-b445-bb7760255be9
2002-07-06 07:16:23 +00:00
Ask Bjørn Hansen
bcd0d6d534 data method; we can now receive mails with this...
git-svn-id: https://svn.perl.org/qpsmtpd/branches/v010@28 958fd67b-6ff1-0310-b445-bb7760255be9
2002-07-04 01:45:19 +00:00
Ask Bjørn Hansen
6df92cd56e half baked version of the new object mail engine
(note the branch, v010)


git-svn-id: https://svn.perl.org/qpsmtpd/branches/v010@23 958fd67b-6ff1-0310-b445-bb7760255be9
2002-07-03 13:10:44 +00:00