Re: [Mimedefang] MimeDefang 2.69

2010-07-21 Thread Kees Theunissen
On Wed, 21 Jul 2010, Jon Rowlan wrote:

>Hi all,
>
>I am trying to get MD up and running on the testing version of Debian,
>this includes 2,69 of MD.
>
>I am seeing two problems ..
>
>First off a line in the startup script includes ..
>
>"echo -y $MX_RECIPOK_PERDOMAIN_LIMIT"

That part of that line should read:

  echo "-y $MX_RECIPOK_PERDOMAIN_LIMIT"


>
>This is resolving as
>
>echo -y 0
>
>and I get an error:
>
>/etc/init.d/mimedefang: 425: echo -y 0: not found
>
>I think this is a new item as I can't find any articles that refer to
>this variable.

This bug was reported a few weeks ago on this list as a bug in 2.70
and has been fixed in 2.71 (still beta?). Search the list archive
for this message:
  Date: Tue, 29 Jun 2010 23:13:01 +0200
  From: ml ml 
  Subject: [Mimedefang] Bug in mimedefang-2.70/examples/init-script



Regards,

Kees.

-- 
Kees Theunissen
F.O.M.-Institute for Plasma Physics Rijnhuizen, Nieuwegein, Netherlands
E-mail: theun...@rijnh.nl,  Tel: (+31|0)306096724,  Fax: (+31|0)306031204

___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] MimeDefang 2.69

2010-07-21 Thread David F. Skoll
Jon Rowlan wrote:

> First off a line in the startup script includes ..
> "echo -y $MX_RECIPOK_PERDOMAIN_LIMIT"

I believe this is fixed in 2.71-BETA-1... please give it a try.

Also, Postfix users: PLEASE tell me if 2.71 works with Postfix!

> /etc/init.d/mimedefang force-reload
> /etc/init.d/sendmail reload

> I get an error that suggests that the MD multiplexor is not yet ready

Yes, it can take a while.  Just wait a bit (as you discovered) and it
will work.

Regards,

David.
___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


[Mimedefang] MimeDefang 2.69

2010-07-21 Thread Jon Rowlan
Hi all,

I am trying to get MD up and running on the testing version of Debian,
this includes 2,69 of MD.

I am seeing two problems ..

First off a line in the startup script includes ..

"echo -y $MX_RECIPOK_PERDOMAIN_LIMIT"

This is resolving as

echo -y 0

and I get an error:

/etc/init.d/mimedefang: 425: echo -y 0: not found

I think this is a new item as I can't find any articles that refer to
this variable.

Also, if I have a script that runs this:

/etc/init.d/mimedefang force-reload
/etc/init.d/sendmail reload

I get an error that suggests that the MD multiplexor is not yet ready

Reloading Mail Transport Agent (MTA): sendmailWARNING: Xmimedefang:
local socket name /var/spool/MIMEDefang/mimedefang.sock missing

Whereas if I wait a few seconds this last error does not occur.

Is it ok to sleep just after md reload and sendmail reload and is the
echo -y 0 error anything to worry about.

Everything seems to be running fine.

Thanks all,

jON

___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] MIMEDefang 2.69 - One compile issue - One Modification.

2010-06-18 Thread -
--- On Thu, 6/17/10, David F. Skoll  wrote:
> >>> As MIMEDefang does use other DNS-related calls (e.g. bad-mx, dnsbl
> >>> calls, etc.), it should be including the bind library
> >> anyway.
> 
> >> Completely wrong; I'll leave it as an exercise for the reader to
> >> determine why.
> 
> > I found that you're partially correct here.  It's still needed,
> 
> No, it's not needed at all.  Again, I leave proving that as an exercise
> for the reader.

Libbind is still needed because libmilter references two functions from it.  
Some systems may have a different library for the DNS calls (lwres), but it has 
the same functions as libbind which supersedes.
___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] MIMEDefang 2.69 - One compile issue - One Modification.

2010-06-17 Thread David F. Skoll
- wrote:

>>> As MIMEDefang does use other DNS-related calls (e.g. bad-mx, dnsbl
>>> calls, etc.), it should be including the bind library
>> anyway.

>> Completely wrong; I'll leave it as an exercise for the reader to
>> determine why.

> I found that you're partially correct here.  It's still needed,

No, it's not needed at all.  Again, I leave proving that as an exercise
for the reader.

-- David.
___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] MIMEDefang 2.69 - One compile issue - One Modification.

2010-06-17 Thread -
--- On Thu, 6/17/10, David F. Skoll  wrote:
> 
> > 1) A bug report was already done (last week). Claus A. addressed it
> > on comp.mail.sendmail (on June 6).
> 
> freehostent, etc. are deprecated according to "man freehostent" on Debian
> Lenny:
> 
> "These functions are deprecated (and unavailable in glibc).  Use
>  getaddrinfo(3) and getnameinfo(3) instead."

More that deprecated.  Actually GONE from glibc - but available in libbind.
 
> So libmilter should be fixed.  This is not a MIMEDefang problem.
> 
> > As MIMEDefang does use other DNS-related calls (e.g. bad-mx, dnsbl
> > calls, etc.), it should be including the bind library
> anyway.
> 
> Completely wrong; I'll leave it as an exercise for the reader to
> determine why.

I found that you're partially correct here.  It's still needed, but it's 
something that the linker can do on its own, so you don't have to.  However, 
the first problem (with libmilter) caused the second one - where I had to 
manually link the extra library.  Oh well.
___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] MIMEDefang 2.69 - One compile issue - One Modification.

2010-06-17 Thread David F. Skoll
- wrote:

> 1) A bug report was already done (last week).  Claus A. addressed it
> on comp.mail.sendmail (on June 6).

freehostent, etc. are deprecated according to "man freehostent" on Debian
Lenny:

"These functions are deprecated (and unavailable in glibc).  Use
 getaddrinfo(3) and getnameinfo(3) instead."

So libmilter should be fixed.  This is not a MIMEDefang problem.

> As MIMEDefang does use other DNS-related calls (e.g. bad-mx, dnsbl
> calls, etc.), it should be including the bind library anyway.

Completely wrong; I'll leave it as an exercise for the reader to determine
why.

-- David.
___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] MIMEDefang 2.69 - One compile issue - One Modification.

2010-06-17 Thread -
--- On Thu, 6/17/10, David F. Skoll  wrote:
> Date: Thursday, June 17, 2010, 10:23 AM - wrote:
> > 2) I don't see that as unusual.  On my system, I happen to have the
> > library that has the REAL routine instead of the dummy stub that
> > only performs a return (which is all that the libmilter version does
> > - when the real routine is not present).  Relying on libmilter's
> > hack is the problem.
> 
> Nothing in MIMEDefang calls freehostent.  This is an internal milter
> problem; the appropriate place to file a bug is at sendmail.org.

1)  A bug report was already done (last week).  Claus A. addressed it on 
comp.mail.sendmail (on June 6).

  
http://groups.google.com/group/comp.mail.sendmail/browse_thread/thread/9b0f7afd87dbe669#

2)  Using the milter, "-lmilter" does not automatically include "-lbind" which 
is necessary as the milter library DOES depend on the bind library.  As 
MIMEDefang does use other DNS-related calls (e.g. bad-mx, dnsbl calls, etc.), 
it should be including the bind library anyway.

The bug in the milter library only seems to appear when IPv6 support is 
compiled in - as the code that references the function is only used with IPv6 
address lookups.  People running IPv4-only systems won't notice it.

___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] MIMEDefang 2.69 - One compile issue - One Modification.

2010-06-17 Thread David F. Skoll
- wrote:

> 1)  I don't develop, so I don't have any autoconf code to offer.

OK; then until someone else complains and/or offers
code, I guess I'll forget about it.

> 2) I don't see that as unusual.  On my system, I happen to have the
> library that has the REAL routine instead of the dummy stub that
> only performs a return (which is all that the libmilter version does
> - when the real routine is not present).  Relying on libmilter's
> hack is the problem.

Nothing in MIMEDefang calls freehostent.  This is an internal milter
problem; the appropriate place to file a bug is at sendmail.org.

-- David.
___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] MIMEDefang 2.69 - One compile issue - One Modification.

2010-06-17 Thread -
--- On Thu, 6/17/10, David F. Skoll  wrote:
> > Needs "-lbind" when freehostent (3) is defined in libbind and NOT
> > "stubbed" in libmilter.
> 
> That's a pretty unusual environment.  Do you have any autoconf code
> to detect the situation?

1)  I don't develop, so I don't have any autoconf code to offer.  Sendmail 
doesn't use autoconf either.

2)  I don't see that as unusual.  On my system, I happen to have the library 
that has the REAL routine instead of the dummy stub that only performs a return 
(which is all that the libmilter version does - when the real routine is not 
present).  Relying on libmilter's hack is the problem.

The function is a DNS-related call, so why shouldn't it be in libbind?  Why 
should it be expected to be in libmilter?

___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] MIMEDefang 2.69 - One compile issue - One Modification.

2010-06-17 Thread David F. Skoll
- wrote:

> Needs "-lbind" when freehostent (3) is defined in libbind and NOT
> "stubbed" in libmilter.

That's a pretty unusual environment.  Do you have any autoconf code
to detect the situation?

Regards,

David.
___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] MIMEDefang 2.69 is released

2010-06-16 Thread David F. Skoll
- wrote:
>> * Remove Anomy::HTMLCleaner support.

> Why?  This seems capricious without a reason.

Anomy::HTMLCleaner is buggy and unmaintained.  We removed support for
it from mimedefang.pl.

You are, of course, free to use Anomy::HTMLCleaner yourself in your filter
if you like.

> One change I'd really like to see: Replace "bounce" with "reject"
> everwhere, since that's really what MIMEDefang is doing with a
> message when it calls action_bounce().

Yeah, that's a good idea... however, our plans are to rework mimedefang.pl
into a much cleaner piece of Perl that has a nicer filter API.  So we'll
probably be getting rid of the action_xxx functions anyway; everything
will be OO.

(Don't worry... our plans are to ship a MIMEDefang::Legacy module to
let existing filter code keep working.)

Regards,

David.
___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


[Mimedefang] MIMEDefang 2.69 - One compile issue - One Modification.

2010-06-16 Thread -
gcc -g -O2 -Wall -Wstrict-prototypes -pthread -o mimedefang mimedefang.o 
drop_privs_threaded.o utils.o rm_r.o syslog-fac.o dynbuf.o milter_cap.o 
gen_id.o  -L../sendmail-8.14.5.Alpha0/obj.Linux.2.6.34.i686/libmilter -lmilter 
-lpthread -lnsl 
../sendmail-8.14.5.Alpha0/obj.Linux.2.6.34.i686/libmilter/libmilter.a(listener.o)(.text+0x5d5):
 In function `mi_milteropen':
: undefined reference to `freehostent'
collect2: ld returned 1 exit status
make: *** [mimedefang] Error 1


Needs "-lbind" when freehostent (3) is defined in libbind and NOT "stubbed" in 
libmilter.

See http://www.isc.org/software/libbind - version 6.0.


All other references to "bounce" (vs. reject) seem to be in documentation 
files.  I leave that for you to change.  Here is a unified-diff to the 
operational files for that change:


--- mimedefang.pl.in2010-06-17 01:49:19.0 +
+++ mimedefang.pl.in2010-06-17 01:55:59.0 +
@@ -1135,13 +1135,13 @@
 # %ARGUMENTS:
 #  None
 # %RETURNS:
-#  True if message has been rejected (with action_bounce or action_tempfail);
+#  True if message has been rejected (with action_reject or action_tempfail);
 #  false otherwise.
 #***
 sub message_rejected () {
 return 0 if (!in_message_context("message_rejected"));
 return (defined($Actions{'tempfail'}) ||
-   defined($Actions{'bounce'})   ||
+   defined($Actions{'reject'})   ||
defined($Actions{'discard'}));
 }
 
@@ -1477,6 +1477,19 @@
 return 1;
 }
 
+sub action_reject ($;$$) {
+my($reply, $code, $dsn) = @_;
+return 0 if (!in_message_context("action_reject"));
+
+$reply = "Forbidden for policy reasons" unless (defined($reply) and 
($reply ne ""));
+$code = 554 unless (defined($code) and $code =~ /^5\d\d$/);
+$dsn = "5.7.1" unless (defined($dsn) and $dsn =~ /^5\.\d{1,3}\.\d{1,3}$/);
+
+write_result_line('B', $code, $dsn, $reply);
+$Actions{'reject'}++;
+return 1;
+}
+
 #***
 # %PROCEDURE: action_bounce
 # %ARGUMENTS:
@@ -1486,21 +1499,11 @@
 # %RETURNS:
 #  Nothing
 # %DESCRIPTION:
-#  Causes the SMTP transaction to fail with an SMTP 554 failure code and the
-#  specified reply text.  If code or DSN are omitted or invalid,
-#  use 554 and 5.7.1.
+#  Backwards-compatible function call name for actin_reject() for versions
+#  of MIMEDefang prior to 2.70.
 #***
 sub action_bounce ($;$$) {
-my($reply, $code, $dsn) = @_;
-return 0 if (!in_message_context("action_bounce"));
-
-$reply = "Forbidden for policy reasons" unless (defined($reply) and 
($reply ne ""));
-$code = 554 unless (defined($code) and $code =~ /^5\d\d$/);
-$dsn = "5.7.1" unless (defined($dsn) and $dsn =~ /^5\.\d{1,3}\.\d{1,3}$/);
-
-write_result_line('B', $code, $dsn, $reply);
-$Actions{'bounce'}++;
-return 1;
+action_reject(@_);
 }
 
 #***
@@ -2286,7 +2289,7 @@
 foreach $recip (@Recipients) {
if (!resend_message_one_recipient($recip)) {
md_syslog('crit', 'stream_by_recipient: COULD NOT RESEND MESSAGE - 
PLEASE INVESTIGATE');
-   action_bounce("Unable to stream message");
+   action_reject("Unable to stream message");
 
# We return 1 to avoid rest of filter
return 1;
@@ -2334,7 +2337,7 @@
foreach $key (keys %Domains) {
if (!resend_message(@{$Domains{$key}})) {
md_syslog('crit', 'stream_by_domain: COULD NOT RESEND MESSAGE - 
PLEASE INVESTIGATE');
-   action_bounce("Unable to stream message");
+   action_reject("Unable to stream message");
 
# We return 1 to avoid rest of filter
return 1;
@@ -5887,8 +5890,8 @@
 close FILE;
 
 if (!defined($entity) && $MaxMIMEParts > 0) {
-   # Message is too complex; bounce it
-   action_bounce("Message contained too many MIME parts.  We do not accept 
such complicated messages.");
+   # Message is too complex; reject it
+   action_reject("Message contained too many MIME parts.  We do not accept 
such complicated messages.");
signal_unchanged();
signal_complete();
return;
--- mimedefang.c2010-06-16 19:08:24.0 +
+++ mimedefang.c   2010-06-17 02:15:42.0 +
@@ -1662,7 +1662,7 @@
if (*rptr == 'T' ||
*rptr == 'D' ||
*rptr == 'B') {
-   /* We are tempfailing, discarding or bouncing the message */
+   /* We are tempfailing, discarding or rejecting the message */
rejecting = 1;
break;
}
@@ -1701,8 +1701,8 @@
 
switch(*rptr) {
case 'B':
-   /* Bounce */
-   syslog(LOG_DEBUG, "%s: Bouncing because filter instructed us to",
+   /

Re: [Mimedefang] MIMEDefang 2.69 is released

2010-06-16 Thread -
--- On Wed, 6/16/10, David F. Skoll  wrote:
> MIMEDefang 2.69 is available at ...
> 
> 2010-05-13  Dave O'Neill 
> * Remove Anomy::HTMLCleaner support.

Why?  This seems capricious without a reason.
 
> * header_timezone() now generates a strictly RFC2822-compliant timezone
> string without needing POSIX::strftime()

I would rather have an RFC 5322-compliant timezone.  ;-)



One change I'd really like to see:  Replace "bounce" with "reject" everwhere, 
since that's really what MIMEDefang is doing with a message when it calls 
action_bounce().  (Keep "action_bounce()" as an alias function to 
"action_reject()" for some time so that people may upgrade immediately without 
broken filters - but also have time to rewrite them.)

___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


[Mimedefang] MIMEDefang 2.69 is released

2010-06-16 Thread David F. Skoll
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

MIMEDefang 2.69 is available at http://www.mimedefang.org/download
Changelog since 2.68 follows.

Regards,

David.


2010-06-16  David F. Skoll 

* MIMEDefang 2.69 RELEASED

* Clarify wording of mimedefang-filter man page.

2010-06-16  Dave O'Neill 

* Remove obsolete code that used to attempt to generate working
directory names.  Deactivate the no-longer-needed "-M" mimedefang
option.

2010-05-13  David F. Skoll 

* Add new "-y" option to mimedefang-multiplexor.  This limits
the number of concurrent "recipok" commands on a per-domain basis.

2010-05-13  Dave O'Neill 

* Remove Anomy::HTMLCleaner support.

* use MIME::Parser::Filer's ignore_filename() call instead of
subclassing to override evil_filename().  Same effect, less code.

* refactor resend_message_one_recipient() to use
resend_message_specifying_mode() instead of reimplementing it.

* header_timezone() now generates a strictly RFC2822-compliant timezone
string without needing POSIX::strftime()

2010-03-02  Dave O'Neill 

* Ensure that decode_mimewords() is called in scalar context. 

2010-02-24  David F. Skoll  

* MIMEDefang 2.68 RELEASED


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFMGTaTwYQuKhJvQuARAh1IAKCDuYnnIxNjV8dYl7JP8hmJSy5wUwCfZ2Ko
hf01Ehdo8cUXWdrUCzigmss=
=ldkT
-END PGP SIGNATURE-
___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang