[Mimedefang] ADMINISTRIVIA: Name change

2015-04-20 Thread Dianne Skoll
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, everyone, I'm the lead author of MIMEDefang, RP-PPPoE and Remind. This is just a heads-up to let you know that I now go by the name "Dianne Skoll", though my email address is still A very short explanation may be found on my w

[Mimedefang] MIMEDefang 2.77 is available

2015-04-20 Thread Dianne Skoll
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm pleased to announce the availability of MIMEDefang 2.77 at http://www.mimedefang.org/download There's only one change since 2.76: 2015-04-20 Dianne Skoll * MIMEDefang 2.77 RELEASED * Change old author's

Re: [Mimedefang] Mimedefang breaks DKIM signing of single-part, plain text emails

2015-04-23 Thread Dianne Skoll
On Thu, 23 Apr 2015 08:15:21 -0600 Peter Nagel wrote: > So, I tried replacing -- > $rebuilt = $rebuilt->parts(0); > with -- > $rebuilt->make_singlepart; > which handles that conversion more intelligently, and now it appears > to work like a charm. Oh, thanks! I'll release a new version

[Mimedefang] MIMEDefang 2.78 is available

2015-04-23 Thread Dianne Skoll
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, MIMEDefang 2.78 is at http://www.mimedefang.org/download Not much in the way of changes... Regards, Dianne. 2015-04-23 Dianne Skoll * MIMEDefang 2.78 RELEASED * Fix bug in logic that coalesces multiparts to single-parts if

Re: [Mimedefang] Missed executable attachments with empty Content-Type

2015-04-28 Thread Dianne Skoll
On Tue, 28 Apr 2015 14:34:59 +0200 Tomasz Ostrowski wrote: > I've just received a trojan/exploit attachment with CHM extension, > which should be filtered by MIMEdefang but wasn't. Well, it surely depends on your filter? Anyway, I made a SpamAssassin rule to block these. Feel free to use/adapt

Re: [Mimedefang] Missed executable attachments with empty Content-Type

2015-04-28 Thread Dianne Skoll
On Tue, 28 Apr 2015 15:44:03 +0200 Tomasz Ostrowski wrote: > My filter is depending on "re_match" function provided by MIMEdefang. > Also suggested-minimum-filter-for-windows-clients is using it. That's odd, because when I run a similar message through MIME::Parser, I get this: $ perl mimedefa

Re: [Mimedefang] Missed executable attachments with empty Content-Type

2015-04-28 Thread Dianne Skoll
On Tue, 28 Apr 2015 09:58:24 -0400 Dianne Skoll wrote: > However, you're right... MIMEDefang is not picking up the attachment > name. I will look into it. Actually, I'm wrong... in CanIt, we do pick up the attachment name by using $entity->head->recommended_filename. I

Re: [Mimedefang] Any way to get MD to accept a Postfix queue ID at RCPT time?

2015-04-28 Thread Dianne Skoll
On Tue, 28 Apr 2015 13:33:16 -0400 "Bill Cole" wrote: > MIMEDefang seems to have internalized the fact that traditionally > (and still by default) Postfix provides no 'i' until after it has > decided to accept at least one recipient. So this overkill logging > line in filter_recipient: Ye

Re: [Mimedefang] Any way to get MD to accept a Postfix queue ID at RCPT time?

2015-04-28 Thread Dianne Skoll
Hi, Actually, this is a more thought-through patch. I don't use Postfix, but if any Postfix users would care to give this a try, I'd appreciate it. Regards, Dianne. commit 936bebc684c7d2f8807fb8df72a2a920f4771e66 Author: Dianne Skoll Date: Tue Apr 28 15:51:45 2015 -0400 Pos

Re: [Mimedefang] Any way to get MD to accept a Postfix queue ID at RCPT time?

2015-04-29 Thread Dianne Skoll
On Wed, 29 Apr 2015 00:36:26 -0400 "Bill Cole" wrote: > Built and installed 2.78 plus that patch, ~4 hours ago on my personal > system, works as intended without any sign of trouble on 219 > messages, all single-rcpt. Great! It'll be in the next release. > Doing the build reminded me of a lon

Re: [Mimedefang] Missed executable attachments with empty Content-Type

2015-04-29 Thread Dianne Skoll
On Wed, 29 Apr 2015 12:14:52 +0200 Tomasz Ostrowski wrote: > I'm very sorry if I've written something rude - I didn't mean to. > English isn't my primary language - I might have failed to convey a > tone of my statement. I didn't think you were rude at all; I think KAM might have overreacted sl

[Mimedefang] rfc822_date test (was Re: Any way to get MD to accept a Postfix queue ID at RCPT time?)

2015-04-29 Thread Dianne Skoll
On Wed, 29 Apr 2015 10:17:34 -0400 "Bill Cole" wrote: > I am quite happy to hear that it was a summer intern who wrote that. > It didn't seem up to the quality I'm used to seeing in MD and I'm > glad it isn't a sign of encroaching senility (but I project...) :) No, I'm not senile yet. OK, sinc

Re: [Mimedefang] rfc822_date test (was Re: Any way to get MD to accept a Postfix queue ID at RCPT time?)

2015-04-29 Thread Dianne Skoll
On Wed, 29 Apr 2015 16:53:16 +0200 Fred de Brouwer wrote: > It might be worthwhile to check the POSIX strftime Clib-function: Yes. And here's the proposed test... far more sane than before if you consider overriding Perl built-in functions to be "sane" :) Oh, and the reason we don't use the PO

Re: [Mimedefang] How to parse pdf files or pass them to spamassassin

2015-05-29 Thread Dianne Skoll
On Fri, 29 May 2015 15:38:33 +0200 Benoit Panizzon wrote: > => Extract text from PDF and pass it to spamassassin to match > blacklisted URI's within the PDF. There is a program called pdftotext, which on Debian systems is part of the poppler-utils package. I'm sure it's packaged in most Linux d

Re: [Mimedefang] How to parse pdf files or pass them to spamassassin

2015-05-29 Thread Dianne Skoll
Replying to myself... > So I'm thinking you could run the PDF through that, add a text/plain > part to INPUTMSG with MIME::tools and pass that to SpamAssassin. You > wouldn't actually modify the original message; just temporarily add > the text/plain part. Something like this: There are a coupl

Re: [Mimedefang] How to parse pdf files or pass them to spamassassin

2015-05-29 Thread Dianne Skoll
On Fri, 29 May 2015 16:29:31 +0200 Benoit Panizzon wrote: > But I notice that the was the link is embedded in the PDF, prevents > it to be extracted by pdftotext. Ah. Well, there's also pdftohtml. Perhaps that preserves the link? Regards, Dianne. _

[Mimedefang] OT - Code quality (was Re: TIP: 2 ways NOT to get MD to report autolearning info and 1 way that works.)

2015-06-23 Thread Dianne Skoll
On Tue, 23 Jun 2015 11:27:51 -0400 "Bill Cole" wrote: > don't be afraid to read the code. Diane writes well-formatted > well-commented Perl that is very easy to follow. Thank you! I do *now* but I'm not so sure I did ~15 years ago when I started on MIMEDefang. :) Regards, Dianne. ___

Re: [Mimedefang] right value for MX_MAXIMUM

2015-06-24 Thread Dianne Skoll
On Wed, 24 Jun 2015 05:43:20 -0600 "Muthu N.C" wrote: > In a day I am getting the below error multiple times. By looking at > the md-mx-ctrl rawstats, all the 80 slaves are busy at that time. We > are receiving around 500 e-mails in a minute. 500/minute is about 720K per day which is reasonably

Re: [Mimedefang] right value for MX_MAXIMUM

2015-06-25 Thread Dianne Skoll
On Thu, 25 Jun 2015 07:44:36 -0600 "Muthu N.C" wrote: > Talking about the performance, the issue is happening multiple times > in a day. When this happens the load is going up to 8 and sometimes > 12. The cpu utilisation is not much, the iowait reaches to 12 to 30%. Those are not horrible load a

Re: [Mimedefang] Seeing weird SMFI errors

2015-07-26 Thread Dianne Skoll
On Sun, 26 Jul 2015 18:03:38 -0600 Philip Prindeville wrote: > Jul 26 17:44:31 mail mimedefang[31780]: t6QNhOYb027848: > smfi_addheader returned MI_FAILURE Sendmail timed out (that's in the Milter (mimedefang): timeout before data read log line) so it tempfailed the mail and exited. MIMEDefang,

Re: [Mimedefang] Seeing weird SMFI errors

2015-07-27 Thread Dianne Skoll
On Mon, 27 Jul 2015 00:11:09 -0600 Philip Prindeville wrote: > Update: I changed the timeout argument to T=S:2m;R:2m;E:10m and > rebuilt sendmail.cf, then restarted the service. > The problem seems to have gone away, but I’m not sure why. Obviously, your filter was taking more than 5 minutes bu

Re: [Mimedefang] Problem with MIME::Tools and base64 encoded message/rfc822 attachements

2015-07-27 Thread Dianne Skoll
On Tue, 28 Jul 2015 00:35:52 +0200 Franz Schwartau wrote: > Why doesn't it work with a base64 encoded attachement? RFC 2046, section 5.2.1: https://tools.ietf.org/html/rfc2046#section-5.2.1 No encoding other than "7bit", "8bit", or "binary" is permitted for the body of a "message/rfc822"

Re: [Mimedefang] Seeing weird SMFI errors

2015-07-28 Thread Dianne Skoll
On Tue, 28 Jul 2015 14:27:45 -0600 Philip Prindeville wrote: > Am I correctly seeing that filter_helo() is being called twice for > the same connection? Looks that way. I bet the sequence was: EHLO STARTTLS EHLO (this time over the encrypted connection) Regards, Dianne. _

Re: [Mimedefang] Seeing weird SMFI errors

2015-08-04 Thread Dianne Skoll
On Tue, 4 Aug 2015 12:02:16 -0600 Philip Prindeville wrote: > Err, cipher_bits… or tls_version… except that, if I remember > correctly, these can’t be accessed until after filter_sender(), right? True, in MIMEDefang. The symbols are available via the milter API, but MIMEDefang does not get them

Re: [Mimedefang] Seeing weird SMFI errors

2015-08-04 Thread Dianne Skoll
On Tue, 4 Aug 2015 14:45:42 -0400 "Kevin A. McGrail" wrote: > On 8/4/2015 2:02 PM, Philip Prindeville wrote: > > Is there any other way to figure out if this is HELO that follows a > > STARTTLS? > Save state and re-call the helo check again in filter_sender, perhaps? This is why I resisted even

Re: [Mimedefang] Seeing weird SMFI errors

2015-08-04 Thread Dianne Skoll
On Tue, 04 Aug 2015 18:04:32 -0600 Philip Prindeville wrote: [...] > Potentially, yes... If it's doing a denial of service attack I might > want to notice the rate of incoming connections, save them into a .db > file, and start blocking them in filter_relay() as a way to > rate-limit. Right,

Re: [Mimedefang] Seeing weird SMFI errors

2015-08-11 Thread Dianne Skoll
On Tue, 11 Aug 2015 14:00:44 -0600 Philip Prindeville wrote: > What about adding ${tls_version} to the list of parameters to > filter_helo? Feel free. Regards, Dianne. ___ NOTE: If there is a disclaimer or other legal boilerplate in the above message

Re: [Mimedefang] Seeing weird SMFI errors

2015-08-11 Thread Dianne Skoll
On Tue, 11 Aug 2015 16:24:25 -0600 Philip Prindeville wrote: > You'll take a patch? Possibly, but I think I've made my feelings pretty clear, that filter_helo is not really something I like in MIMEDefang. I'd prefer to remove it, to be honest. But yes, if you send a patch I'll consider it. Re

Re: [Mimedefang] Timeout on md_check_against_smtp_server?

2015-08-15 Thread Dianne Skoll
On Sat, 15 Aug 2015 12:39:04 +0100 Dave Osbourne wrote: > I wonder if there is away to enforce a timeout on > md_check_against_smtp_server? The general-purpose way of enforcing timeouts is with alarm. { local $SIG{ALRM} = sub { die "Timeout"; }; my @result; eval { alarm(60

[Mimedefang] Somewhat off-topic: Perl module that might possible interest list members

2015-09-17 Thread Dianne Skoll
Hi, all, In addition to CanIt and MIMEDefang, I use the very capable Email::Filter module for my personal email. It acts as a local delivery agent and automatically sorts my mail into specific folders and does some other magic. Anyway, I've created and uploaded a module called Mail::ThreadKiller

Re: [Mimedefang] Embedded Perl

2015-09-21 Thread Dianne Skoll
On Mon, 21 Sep 2015 14:04:04 -0700 Amit Gupta wrote: > Hi, I'm using Centos7.1 and mimedefang 2.75 (still need to upgrade to > latest). The documentation indicates that if you start mimedefang with > the -E parameter, it uses embedded perl which is supposedly faster. I > was wondering if someone

Re: [Mimedefang] Embedded Perl

2015-09-21 Thread Dianne Skoll
On Mon, 21 Sep 2015 18:53:04 -0400 "Bill Cole" wrote: > As MD & Perl have matured and systems have gotten much bigger and > much faster it has become less of a burden to just fork and exec > fully independent slaves and let them live a very long time, so it > is somewhat questionable whether embe

Re: [Mimedefang] Embedded Perl (continued)

2015-09-22 Thread Dianne Skoll
On Tue, 22 Sep 2015 07:57:18 -0700 Amit Gupta wrote: > My situation is that the number of mimedefang.pl processes jumps to > about 70 during peak loads (we are processing a couple hundres > messages per minute on average). How much RAM do you have? 70 parallel scanners is not outlandish on busy

Re: [Mimedefang] Embedded Perl (continued)

2015-09-22 Thread Dianne Skoll
On Tue, 22 Sep 2015 08:20:16 -0700 Amit Gupta wrote: > We have 16GB of ram, though there are other processes running on this > machine such as DB that will be segmented later. I'm curious how much > resident memory each of your mimedefang.pl processes uses? About 110MB, but not sure how much of

Re: [Mimedefang] Block executables in 7Z archive - solution

2015-10-08 Thread Dianne Skoll
On Thu, 8 Oct 2015 13:36:23 +0200 Tomasz Ostrowski wrote: [...] > This requires 7za program (from p7zip package) installed on server. > This will also block 7z archives with encrypted filenames. There's also the "unar" package that contains the "lsar" program; it can list the contents of dozens

Re: [Mimedefang] $RelayAddr and IPv6?

2015-10-26 Thread Dianne Skoll
On Mon, 26 Oct 2015 17:31:01 -0400 James Ralston wrote: > The MIMEDefang documentation implies that $RelayAddr will only ever be > a dotted-quad IPv4 address: The docs are wrong. On an IPv6-enabled system, $RelayAddr can be an IPv6 address (represented as a string.) > But if MIMEDefang doesn't

Re: [Mimedefang] Fwd: syncing sent item from pop3 account to webmail sent folder

2015-11-30 Thread Dianne Skoll
Hi, Please note that this has nothing to do with MIMEDefang. I am going to block further replies on this thread. Regards, Dianne. ___ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore

Re: [Mimedefang] Understanding the -q flag

2016-01-05 Thread Dianne Skoll
On Tue, 5 Jan 2016 12:16:49 -0800 Amit Gupta wrote: > So if your slave limit is 100 and they are all processing emails, but > you need to process 500 emails that moment, does this mean 400 emails > will be queued for processing as soon as the slaves start freeing up? Yes. However, with those sp

Re: [Mimedefang] virus scan stopped working after update to 2.78

2016-02-04 Thread Dianne Skoll
On Thu, 4 Feb 2016 10:51:01 -0600 Cliff Hayes wrote: > I did not change mimedefang-filter or anything else. Clamd is > running without errors like always. No error messages in maillog or > messages file. What do I do? You start diagnosing. You are unlikely to get help from the mailing list be

[Mimedefang] Off-Topic: AFO.NET (was Re: virus scan stopped working after update to 2.78)

2016-02-04 Thread Dianne Skoll
On Thu, 4 Feb 2016 10:51:01 -0600 Cliff Hayes wrote: [... some stuff ...] Oh, hey! Are you using MIMEDefang to provide filtering for your email filtering service at http://afo.net/filtering.php#wgf ? I notice you block "Information promoting adultery, infidelity, same gender and/or trans-gende

Re: [Mimedefang] Off-Topic: AFO.NET (was Re: virus scan stopped working after update to 2.78)

2016-02-04 Thread Dianne Skoll
On Thu, 4 Feb 2016 19:22:28 + Paul Murphy wrote: > Don't skip over this part: > R-rated >Sites which contain lingerie, swimsuits, and revealing > pictures. Ah. I've attached a little gift. Regards, Dianne. ___ NOTE: If there i

Re: [Mimedefang] Installed FPScan and it's just hanging and then timing out.

2016-02-04 Thread Dianne Skoll
Hi, I'm having a hard time following what you did. Can you post a diff of the old non-working mimedefang.pl vs the new, working mimedefang.pl? Regards, Dianne. ___ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is N

Re: [Mimedefang] Installed FPScan and it's just hanging and then timing out.

2016-02-05 Thread Dianne Skoll
On Fri, 5 Feb 2016 07:47:25 +0100 (CET) Steffen Kaiser wrote: > First(ly), I would try to patch mimedefang.pl in sub > message_contains_virus_fpscan () to include > "--nospin progress bar and WHY do software developers write virus-scanners that assume interactivity by default? I mean how man

Re: [Mimedefang] Permissions on /varspool/MIMEDefang

2016-02-11 Thread Dianne Skoll
Hi, > After your most recent release I have had problems with the > permissions on /var/spool/MIMEDefang being reset to 0750 after a > reboot. I need the permission to be 0770 to allow for clamd scanner > to use the directory. I eventually discovered this line > in /usr/lib/tmpfiles.d/mimedefang.c

Re: [Mimedefang] long dns timeouts when first dns in /etc/resolv.conf is down

2016-03-14 Thread Dianne Skoll
On Mon, 14 Mar 2016 14:11:38 +0100 Marcus Schopen wrote: > It shouldn't make a difference to mimedefang if one of > the dns server is down. Any ideas? I think this is an artifact of the Net::DNS Perl module, which doesn't seem to handle multiple name servers very well. I ran the following test

Re: [Mimedefang] documentation bug/omission for newbies

2016-04-18 Thread Dianne Skoll
On Sun, 17 Apr 2016 17:42:31 -0400 starlight.201...@binnacle.cx wrote: > Would have saved me that day if the above tidbit were mentioned and > that one can easily write something similar to > my $bdyscn_flag = 0; > my $part0 = $entity->parts(0); > ... elaborate code omitted But that's a rather r

Re: [Mimedefang] documentation bug/omission for newbies

2016-04-18 Thread Dianne Skoll
On Mon, 18 Apr 2016 15:32:37 -0400 starlight.201...@binnacle.cx wrote: > Hmm, I don't see how that works. The filter() method is described as > being called for each part where I want to examine just the body, > explicitly disregard subsequent parts and attachments. Also I don't > see any simpli

Re: [Mimedefang] documentation bug/omission for newbies

2016-04-19 Thread Dianne Skoll
On Tue, 19 Apr 2016 20:11:39 -0400 starlight.201...@binnacle.cx wrote: > Is easy for a technically competent person new to MIME > to be smacked by the nuances, but a little up-front > explanation would for the same audience be of great > help and potentially save a lot of time. I made 158 slides

Re: [Mimedefang] documentation bug/omission for newbies

2016-04-20 Thread Dianne Skoll
Hi, Just a general comment: If someone hands you a MIME::Entity object, you shouldn't assume it's single-part. Nor should you assume it's multi-part. Your code should adapt to whatever it has been given. It turns out MIMEDefang does always start out with a multipart (for boring technical reaso

[Mimedefang] Poll: Who uses the "filter_tick" and "map" functionality of MIMEDefang? (-X and -N options to mimedefang-multiplexor)

2016-04-27 Thread Dianne Skoll
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, all, I'm looking at stripping out unused features from MIMEDefang. 1) Does anyone use the "-X n" feature that calls a function called filter_tick every "n" seconds? If not... I'd like to nuke. 2) Does anyone use the "-N map_sock" feature that p

[Mimedefang] Sendmail SOCKETMAP

2016-04-27 Thread Dianne Skoll
On Wed, 27 Apr 2016 18:41:57 +0100 Dave Osbourne wrote: [Dianne] > > 2) Does anyone use the "-N map_sock" feature that provides a > > SOCKETMAP to Sendmail 8.13+? If not... again, I'd like to nuke. [Dave] > I don't really know what this is... have a exposed my ignorance? We > do use sendmail t

Re: [Mimedefang] Poll: Who uses the "filter_tick" and "map" functionality of MIMEDefang? (-X and -N options to mimedefang-multiplexor)

2016-04-27 Thread Dianne Skoll
On Wed, 27 Apr 2016 20:11:24 +0200 (CEST) Frank Doepper wrote: > I do heavy RCPT-caching and IP-rating with a SQLite DB and use > filter_tick to expire old entries from the tables. Darn! :) OK, filter_tick stays. Regards, Dianne. ___ NOTE: If there

Re: [Mimedefang] Sendmail SOCKETMAP

2016-04-27 Thread Dianne Skoll
On Wed, 27 Apr 2016 20:54:43 +0200 "Andrzej A. Filip" wrote: > If your ambition is hardly limited then you may donate sendmail.org > "socketmap alike over UDP". It could be simple assuming design for > unix sockets. In our tests, the overhead wasn't the socket communication; it was the cost of d

Re: [Mimedefang] Sendmail SOCKETMAP

2016-04-27 Thread Dianne Skoll
On Wed, 27 Apr 2016 21:17:03 +0200 "Andrzej A. Filip" wrote: > With or without sendmail's "excessive" schemes of lookups? I don't know; I guess the bottom line was that I was insufficiently motivated to look into this, so I just dropped it. > IMHO I may make sense to create list of features wi

Re: [Mimedefang] Poll: Who uses the "filter_tick" and "map" functionality of MIMEDefang? (-X and -N options to mimedefang-multiplexor)

2016-04-27 Thread Dianne Skoll
On Wed, 27 Apr 2016 22:45:42 + Paul Murphy wrote: > I use filter_tick on very small servers to keep a database connection > alive (<200 messages per day, and overnight 3-4 hours can pass > without a message), That's not a good approach; you don't know which process handles the tick, so anoth

Re: [Mimedefang] Installation problem (MySQL)

2016-05-03 Thread Dianne Skoll
Hi, > u41607H2097975: Slave 0 stderr: plugin: eval failed: > install_driver(mysql) failed: Can't locate loadable object for module > DBD::mysql in @INC (@INC Somewhere there should be an "auto/DBD/mysql/mysql.so" shared library; I suspect the error message is complaining about that file being mis

Re: [Mimedefang] Fwd: Multiple antivirus filtering

2016-05-11 Thread Dianne Skoll
On Wed, 11 May 2016 10:16:25 +0200 "j.emerlik" wrote: > Is there in Mimedefang possibility to disable one of antiviruses for > outgoing emails traffic filtering ? Sure. MIMEDefang lets you write your policy in Perl. As long as you have some way to distinguish outbound from inbound email, just

Re: [Mimedefang] "cmd read returned"

2016-05-24 Thread Dianne Skoll
On Tue, 24 May 2016 15:12:59 +0100 Dave Osbourne wrote: > I'm not a great help, but I think that I've seen that if there is any > STDOUT in anything (either the PERL or anything it calls) ... any > errors or debugging have to go to a file... Yes, anything going to STDOUT will mess things up roy

Re: [Mimedefang] Found typo in module (./script/mimedefang-util @ v2.78)...

2016-05-26 Thread Dianne Skoll
On Wed, 25 May 2016 22:36:25 +0200 Fred de Brouwer wrote: > It it missing the path to the perl binary... Oops! I will fix it. Regards, Dianne. ___ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID.

Re: [Mimedefang] SRS with mimedefang

2016-06-02 Thread Dianne Skoll
On Thu, 02 Jun 2016 15:24:50 +0200 Marcus Schopen wrote: > is there a way to implement SRS using mimedefang? Yes, but it involves a lot of programming and requires Sendmail 8.14 or later. We implemented SRS in a Perl module, but unfortunately it's proprietary and we can't release the code. The

Re: [Mimedefang] mimedefang-filter $Subject variable encoding

2016-06-09 Thread Dianne Skoll
On Thu, 9 Jun 2016 13:30:52 -0700 Amit Gupta wrote: > Should the $Subject variable be mime encoded? Yes. > $Subject = encode_mimeword($subject); I think you want encode_mimewords($subject, Charset => 'UTF-8') mimewords, plural, and you need to supply the Charset. Regards, Dianne. __

Re: [Mimedefang] mimedefang-filter $Subject variable encoding

2016-06-10 Thread Dianne Skoll
On Fri, 10 Jun 2016 07:36:28 +0200 Christoph Lehmann wrote: > This is a good one for the man / documentation. Can you provide an > example there, Dianne? Well, for example, let's say you want the subject to be: $internal_perl_string = "J'adore lété"; Assuming the Perl string is in i

Re: [Mimedefang] mimedefang send a copy of all mails to a directory

2016-06-27 Thread Dianne Skoll
On Mon, 27 Jun 2016 15:01:22 +0200 Shaun Megaw wrote: > sub filter_begin > { > system('cp', 'INPUTMSG', '/home/shaun'); > } > This created a file called /home/shaun/INPUTMSG which is over written > by each new mail Well, yes. It's doing what you told it to do. > Is there a way to send a copy

Re: [Mimedefang] The -y option

2016-06-27 Thread Dianne Skoll
On Mon, 27 Jun 2016 10:43:34 -0400 Joseph Brennan wrote: > The mimedefang process is now taking between 0.1 and 0.3 %CPU. It > grew to well over 50% with -y. > No one else has noticed this? It's a huge difference. I've not used the -y option in production, so no, I didn't notice. Thanks for poi

Re: [Mimedefang] The -y option

2016-06-27 Thread Dianne Skoll
On Mon, 27 Jun 2016 14:47:16 -0400 Joseph Brennan wrote: > Besides, given Redhat's provisioning of a positively ancient release > (8.14.4) in their RPM, I think the Sendmail folks could very fairly > point out that it's ancient history to them. I only mention it > because Redhat users may trip ov

Re: [Mimedefang] add_recipient and delete_recipient

2016-07-14 Thread Dianne Skoll
On Thu, 14 Jul 2016 17:21:19 -0300 Javier Kohan wrote: > filter_recipient { > ... > if( $recipient meets some condition ) { > > # change us...@domain1.com to us...@domain2.com. > #change_domain() is checked to work > $newrec=change_domain($recipient); > add_recipient($ne

Re: [Mimedefang] add_recipient and delete_recipient

2016-07-16 Thread Dianne Skoll
Hi, > # Si no se puede leer el dominio, dejamos que sendmail se ocupe. > return ( 'CONTINUE', 'ok' ) unless ( $dominio = extrae_dominio($recip) ); I suspect that's where you are going wrong. You are using numeric comparison rather than string comparison. I think you probably want:

Re: [Mimedefang] add_recipient and delete_recipient

2016-07-16 Thread Dianne Skoll
On Sat, 16 Jul 2016 21:43:35 -0400 Dianne Skoll wrote: > I suspect that's where you are going wrong. You are using numeric > comparison rather than string comparison. I think you probably want: And in fact you do that in a number of places. And actually, "=" is not

Re: [Mimedefang] add_recipient and delete_recipient

2016-07-17 Thread Dianne Skoll
On Sun, 17 Jul 2016 13:52:10 -0300 Javier Kohan wrote: > The log lines inmediately after add_recipient and delete_recipient are > beeing executed because I see their output in the logs. I must be > doing anything wrong but cannot see what. Could you post the entire set of logs for a sample mes

Re: [Mimedefang] reread mimedefang after sa-update

2016-09-14 Thread Dianne Skoll
On Wed, 14 Sep 2016 07:54:50 +0200 Marcus Schopen wrote: > do I need to reread or reload mimedefang after sa-update e.g. > /etc/cron.daily/spamassassin to get the changes in spamassassin rules > recognized by mimedefang? Yep. "md-mx-ctrl reread" is a pretty non-invasive operation, so it's quit

Re: [Mimedefang] reread mimedefang after sa-update

2016-09-14 Thread Dianne Skoll
On Wed, 14 Sep 2016 17:46:07 +0200 Marcus Schopen wrote: > Sep 14 17:39:55 scansrv mimedefang-multiplexor[24029]: Cannot destroy > and recreate a Perl interpreter safely on this platform. Filter rules > will NOT be reread. Huh! That is very weird. I don't get anything like that on Debian Jess

Re: [Mimedefang] reread mimedefang after sa-update

2016-09-14 Thread Dianne Skoll
On Wed, 14 Sep 2016 18:12:39 +0200 Marcus Schopen wrote: > Okay, but this might harm a mail which is in process. Any ideas how to > fix above error? No... no idea. If you don't use embedded Perl (ie, leave the -E flag off of the mimedefang-multiplexor command line) then you will be able to use

Re: [Mimedefang] reread mimedefang after sa-update

2016-09-14 Thread Dianne Skoll
On Wed, 14 Sep 2016 20:39:19 +0200 Marcus Schopen wrote: > Hmmm, what's the performance loss if not using embedded Perl? There is some, but it's mostly related to startup costs. Once things are running, there's not a huge difference. Unless you're running a busy machine (lets say more than 500

Re: [Mimedefang] reread mimedefang after sa-update

2016-09-15 Thread Dianne Skoll
On Thu, 15 Sep 2016 00:48:01 -0500 Richard Laager wrote: > So configure.in has a check for this pthread flag, but does not use > $PTHREAD_FLAG as part of the $CFLAGS for the SAFE_EMBED_PERL test. > Patch attached, which results in SAFE_EMBED_PERL set and reread > working for me on Ubuntu 16.04.

Re: [Mimedefang] clamav-unofficial-sigs and pyzor

2016-09-19 Thread Dianne Skoll
On Mon, 19 Sep 2016 07:46:11 +0200 Marcus Schopen wrote: > my be a little bit off topic, but are there any experience with the > efficiency of pyzor and clamav-unofficial-sigs [1]. No comment on pyzor because I don't use it, but some of the clamav-unofficial-sigs are useful. We use the followin

Re: [Mimedefang] filter_bad_filename based on recipient

2016-09-19 Thread Dianne Skoll
On Mon, 19 Sep 2016 14:48:16 +0200 Marcus Schopen wrote: > is it possible to define $bad_exts in sub filter_bad_filename based on > domain name? I'd like to filter ".docm"-attachments, but not globally > for all domains on that server, just for my private domain. Seems to > be that $recipient is

Re: [Mimedefang] %2C instead of whitspaces in sendmail log

2016-09-20 Thread Dianne Skoll
On Tue, 20 Sep 2016 17:24:44 +0200 Marcus Schopen wrote: > when I try to log the spam score names to sendmail log using > md_graphdefang_log('spam_full_report', $hits, $names, $RelayAddr); > all whitespaces are replaced by "%2C" e.g.: Graphdefang writes out logs that have comma-separated comp

Re: [Mimedefang] mimedefang mailing list page

2016-09-21 Thread Dianne Skoll
On Wed, 21 Sep 2016 14:15:11 +0200 "Vieri Di Paola" wrote: > I noticed that Norton Safe Web (DNS) blocks access to mimedefang's > mailing list page and throws this warning: Norton Safe Web is being idiotic. That's a trapped incident on our anti-spam cluster, which has nothing whatsoever to do w

Re: [Mimedefang] mimedefang mailing list page

2016-09-21 Thread Dianne Skoll
Hi, all, I have started the procedures with Symantec to get delisted. I'm not optimistic they will care or have a clue. Regards, Dianne. ___ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may

Re: [Mimedefang] $QueueId not allways defined

2016-09-24 Thread Dianne Skoll
On Fri, 23 Sep 2016 21:51:19 + Thomas Kristensen wrote: > I just installed postfix and mimedefang, and i works pretty nice. > But in some cases that $QueueId is not defined, only as NOQUEUE. Sendmail picks a Queue ID as soon as the MAIL From: SMTP command is received. However, Postfix does

Re: [Mimedefang] $QueueId not allways defined

2016-09-24 Thread Dianne Skoll
On Fri, 23 Sep 2016 22:49:39 -0400 "Bill Cole" wrote: > So if you're not running MD 2.78 plus the patch available at > http://lists.roaringpenguin.com/pipermail/mimedefang/2015-April/037618.html Ooh... I really should release 2.79. I have a few patches in the queue. Maybe next week... Regards

Re: [Mimedefang] $QueueId not allways defined

2016-09-25 Thread Dianne Skoll
On Sat, 24 Sep 2016 17:20:16 + Thomas Kristensen wrote: > But it still doesnt work. I still got the NOQUEUE in filter_begin. Right, you need to apply the patch. Regards, Dianne. ___ NOTE: If there is a disclaimer or other legal boilerplate in the

Re: [Mimedefang] $QueueId not allways defined

2016-09-26 Thread Dianne Skoll
On Mon, 26 Sep 2016 05:59:59 + Thomas Kristensen wrote: > How do i apply the patch? I need to apply it to the source and then > compile a my self, right? Yes. I will probably release 2.79 soon, with the patch. Regards, Dianne. ___ NOTE: If there

[Mimedefang] MIMEDefang 2.79 is released

2016-09-26 Thread Dianne Skoll
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, MIMEDefang 2.79 is available at http://mimedefang.org/download Release notes follow. Regards, Dianne. 2016-09-26 Dianne Skoll * MIMEDefang 2.79 RELEASED * Add the --data-dump option to scripts/mimedefang-util

Re: [Mimedefang] MIMEDefang 2.79 is released

2016-09-26 Thread Dianne Skoll
On Mon, 26 Sep 2016 17:32:25 + Thomas Kristensen wrote: > Any ETA on the ubuntu apt release? I don't have any connection with that... I'm just upstream for all the distros. Regards, Dianne. ___ NOTE: If there is a disclaimer or other legal boiler

Re: [Mimedefang] MIMEDefang 2.79 is released

2016-09-29 Thread Dianne Skoll
On Wed, 28 Sep 2016 19:54:56 -0400 "Bill Cole" wrote: > The shebang line in script/mimedefang-util is hardcoded with > /usr/bin/perl rather than having a .in file with @PERL@. D'oh, I guess I should fix that... Regards, Dianne. ___ NOTE: If there is

[Mimedefang] Multiple MIMEDefang instances (was Re: strip down mimedefang-filter to sub filter_recipient for md_check_against_smtp_server checks)

2016-10-11 Thread Dianne Skoll
Hi, While in principle, you can run multiple MIMEDefang instances, I really don't see the point. MIMEDefang lets you write your policy in Perl, so I cannot see a use case that requires more than one instance of MIMEDefang. Regards, Dianne. ___ NOTE: I

Re: [Mimedefang] Multiple MIMEDefang instances (was Re: strip down mimedefang-filter to sub filter_recipient for md_check_against_smtp_server checks)

2016-10-11 Thread Dianne Skoll
On Tue, 11 Oct 2016 18:07:42 +0200 Marcus Schopen wrote: > I run milter-greylist and I don't want to run messages into > greylisting before I checked if recipients are valid (fills up > greylisting database with non existing recipients). You can do greylisting from within MIMEDefang. I'm sure t

Re: [Mimedefang] Multiple MIMEDefang instances (was Re: strip down mimedefang-filter to sub filter_recipient for md_check_against_smtp_server checks)

2016-10-11 Thread Dianne Skoll
On Tue, 11 Oct 2016 20:25:36 +0200 Marcus Schopen wrote: > Hmmm, to be honest I'm not the perl guru to implement all features I > use from milter-greylist in mimedefang. So, running two mimedefang > instances is the solution then? Yes, I guess so. Regards, Dianne. _

Re: [Mimedefang] Connecting Clamd via inet socket?

2016-12-02 Thread Dianne Skoll
On Fri, 2 Dec 2016 16:57:32 +0100 Benoit Panizzon wrote: > Does anyone know, if it's possible to use > ClamdSock = "host:port"; > in MIMEDefang? No; the built-in code uses IO::Socket::UNIX and can only scan local files. You need to write your own wrapper code if you want to stream files to anot

Re: [Mimedefang] Connecting Clamd via inet socket?

2016-12-02 Thread Dianne Skoll
On Fri, 02 Dec 2016 13:22:09 -0500 "Bill Cole" wrote: > socat UNIX-LISTEN:/var/run/fakeclamd.sock,mode=777,fork > TCP:: That won't work because the MIMEDefang code uses SCAN, which gets passed a local filename. Better just to modify the Perl wrappers to use IO::Socket::INET and use the stream-

Re: [Mimedefang] DZIP Extension

2016-12-12 Thread Dianne Skoll
On Mon, 12 Dec 2016 12:38:06 -0500 "Kevin A. McGrail" wrote: > Seeing some fake invoice/in the wild garbage with .dzip extension > getting through today. > If you are doing some extension blocking, etc. might want to take a > look. Yes, we're seeing those too... they're doing something a bit s

Re: [Mimedefang] add_header all RelaysUntrusted _RELAYSUNTRUSTED_

2016-12-14 Thread Dianne Skoll
On Wed, 14 Dec 2016 12:54:38 +0100 Marcus Schopen wrote: > > I'd like to set a "add_header all RelaysUntrusted > > _RELAYSUNTRUSTED_" to my headers, to see in case of IPs in > > trusted_networks on which IPs dnsrbl and dnswl checks run on. But > > putting this to sa-mimedefang.cf has no effect.

Re: [Mimedefang] calling external shell script without waiting for its end

2017-01-02 Thread Dianne Skoll
On Mon, 02 Jan 2017 19:26:44 +0100 Marcus Schopen wrote: > When calling an external bash script in filter_end like > system("/usr/local/bin/skript.sh $QueueID > /dev/null &"); I hope you trust the contents of $QueueID implicitly... The MIMEDefang working directory gets deleted when the filte

Re: [Mimedefang] Block .js extension was Fwd: G Suite Update Alerts

2017-01-26 Thread Dianne Skoll
On Thu, 26 Jan 2017 08:10:13 -0500 "Kevin A. McGrail" wrote: > OK, so I seem to post only about extensions lately... Gmail is going > to block .js which mirrors in the wild attempts in zip files as well > that we have seen VERY minorly in recent days. Huh. We take a more nuanced approach. We b

Re: [Mimedefang] Delaying 2xx as long as possible with stream_by_xyz()

2017-01-27 Thread Dianne Skoll
On Thu, 26 Jan 2017 22:50:46 -0500 "Kevin A. McGrail" wrote: > In filter_begin when we call stream_by_xyz, have we accepted the > mail? Or can we still do interactive SMTP responses? The latter... you can still do interactive SMTP responses. Regards, Dianne. ___

Re: [Mimedefang] Delaying 2xx as long as possible with stream_by_xyz()

2017-01-30 Thread Dianne Skoll
Sorry, I was wrong. The stream_by_XXX methods set a flag that makes Sendmail discard the original message, So you cannot do anything useful in the original SMTP conversation after streaming. Regards, Dianne. ___ NOTE: If there is a disclaimer or other

Re: [Mimedefang] MD 2.79 - very minor patch for mimedefang.multiplexor.c

2017-02-06 Thread Dianne Skoll
On Sun, 5 Feb 2017 15:07:32 -0500 "Kevin A. McGrail" wrote: > I'm sure it's an ancient gcc that I'm using but throwing an error > compiling 2.79. This is the only issue that stops compilation so I > fixed it to define the var before setting a value. D'oh, thanks. The older C standard permitt

Re: [Mimedefang] MD 2.79 - very minor patch for mimedefang.multiplexor.c

2017-02-21 Thread Dianne Skoll
On 2/19/2017 5:56 PM, Philip Prindeville wrote: > Which raises the philosophical question, how long do compilers from > a different millennium need to be supported?;-) As long as the cost of doing so is tiny, I don't have a problem with accomodating older compilers. Regards, Dianne. ___

Re: [Mimedefang] Bcc Info

2017-03-09 Thread Dianne Skoll
On Wed, 8 Mar 2017 22:46:24 -0500 "Kevin A. McGrail" wrote: > Would parsing the To and Cc headers and comparing to @Recipients for > what remained tell you what would be a Bcc? Yes, although you'd obviously only be seeing those Bcc: recipients in a domain or domains handled by your server. Reg

  1   2   3   >