Re: [Mimedefang] Test
Almost not. // Hans > On 19.11.2020, at 00:27, Dianne Skoll via MIMEDefang > wrote: > > Is this list still alive? > > Regards, > > Dianne. > ___ > 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 ___ 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] local rule with wildcard checking subject
Dear All, Many thanks to all of you for support. It's working now. Obviously I made a mistake in my previous settings. I was looking for a single character wildcard and a dot "." is doing the job well. Have a nice day // Hans -Original Message- From: MIMEDefang On Behalf Of Bill Cole Sent: Tuesday, October 16, 2018 11:36 PM To: mimedefang@lists.roaringpenguin.com Subject: Re: [Mimedefang] local rule with wildcard checking subject On 16 Oct 2018, at 4:21, MAYER Hans wrote: > Dear All, > > I am using mimedefang version 2.79 in combination with SpamAssassin. > I have several rules defined in /etc/mail/sa-mimedefang.cf which all > works fine. > Now I tried to define a rule testing a subject with a wildcard. > But all my tests failed. Is there a way to define a wildcard checking > the subject line ? > I also had an issue to escape the '#' character. Any idea how to do ? > > Any help is welcome. This is really better suited to the SpamAssassin Users List (see https://wiki.apache.org/spamassassin/MailingLists) but it seems simple enough that I expect Dianne won't mind an answer here... The file /etc/mail/sa-mimedefang.cf is a SpamAssassin config file, so all its directives are SA directives and all rules are SA rules. As such, they use Perl regular expressions (a.k.a. "regex") for pattern matching. If you are unfamiliar with regular expressions, 'man 7 regex' on Linux or 'man 7 re_format' on MacOS or any of the *BSDs will give you the standard for regex and 'man perlre' for the Perl variations. To illustrate an answer to your wildcard question, here's the definition of a rule named "SCC_STOCK_ROCK" that I once found useful: describe SCC_STOCK_ROCKSkater dood wording for stock tips headerSCC_STOCK_ROCKSubject =~ /St0ck .* R0ck/ score SCC_STOCK_ROCK2.0 Technically the 'describe' and 'score' lines are optional, with the default score of a rule being 1.0. The 'header' line is the meat. There are 3 parts after the rule name: 1. "Subject" is the name of the header to be matched. 2. "=~" is the Perl regular expression match operator. 3. "/St0ck .* R0ck/" is a regular expression delimited by '/'. The '.*' in that regex means any character (.) repeated any number of times (*) and because the regex. is not "anchored" at either end there's an implied '.*' before and after it, so the whole regex would match any of these: Subject: H0t St0ck that's sure to R0ck!!! Subject: St0ck will R0ck Subject: St0ck R0ck!!! Note the 2 spaces in the last one... It would NOT match: Subject: St0ck R0ck Subject: St0cks that R0ck The '#' character is a Perl metacharacter (marking the start of a comment) so it needs to be escaped with a preceding backslash (\) as does any other Perl metacharacter (notably % and @) and any character that can have special meaning in regex syntax: ./(){}[]&^$?+*\| ___ 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 ___ 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] local rule with wildcard checking subject
Dear All, I am using mimedefang version 2.79 in combination with SpamAssassin. I have several rules defined in /etc/mail/sa-mimedefang.cf which all works fine. Now I tried to define a rule testing a subject with a wildcard. But all my tests failed. Is there a way to define a wildcard checking the subject line ? I also had an issue to escape the '#' character. Any idea how to do ? Any help is welcome. Kind regards Hans ___ 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] bad_exts in zip files
Dear All, Mimedefang version: 2.79 In file "mimedefang-filter" there are several extensions listed in $bad_exts They are all caught if such a file is sent as attachment and moved to a quarantine directory. There is also the feature "Archive::Zip" If such a file with a bad extension is inside a zip-archive most of them are removed but some of them not. Any idea why this could happen ? Is this a well-known bug of my version and should I upgrade ? Kind regards Hans ___ 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] filter for header line
Dear All, Many thanks for the replies to all of you. Now I have something to try. > ... Are you not using SpamAssassin? Yes, I am doing. But how can I generate in action in MD for example "action_discard()" ? Kind regards Hans -Original Message- From: David Both [mailto:db...@both.org] Sent: Tuesday, September 5, 2017 2:12 PM To: mimedefang@lists.roaringpenguin.com; Benoit Panizzon ; MAYER Hans Subject: Re: [Mimedefang] filter for header line I am curious. Why not just add a rule to /etc/mail/spamassassin/local.cf to match the desired header. Are you not using SpamAssassin? On 09/05/2017 07:38 AM, Benoit Panizzon wrote: > Dear Hans > >> I am looking for a possibility to filter for an existing header line. >> I found a lot of examples where $Subject, $Sender and others can be >> used. But I need the possibility to find a certain header line, for >> example X-Someinfo: Can someone point me to some examples. >> I was searching at Google but obviously with the wrong keywords. > I fear you have to do this the hard way by reading the HEADERS file > from the spool directory: > > in filter_end, because this is the place where you get the content... > > if (open(HDRCHECK, "<./HEADERS")) { > while() { > if ($_ =~ /^X-Someinfo:[\t ]+(.*?)/ { > $SomeinfoValue = $1; > } > } > } > > -Benoît Panizzon- -- * David P. Both, RHCE Millennium Technology Consulting LLC Raleigh, NC, USA 919-389-8678 db...@millennium-technology.com www.millennium-technology.com www.Linux-Databook.info - Home of the DataBook for Linux DataBook is a Registered Trademark of David Both * ___ 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] FW: filter for header line
Dear All, Many thanks for the replies to all of you. Now I have something to try. > ... Are you not using SpamAssassin? Yes, I am doing. But how can I generate an action in MD for example "action_discard()" ? Kind regards Hans -Original Message- From: David Both [mailto:db...@both.org] Sent: Tuesday, September 5, 2017 2:12 PM To: mimedefang@lists.roaringpenguin.com; Benoit Panizzon ; MAYER Hans Subject: Re: [Mimedefang] filter for header line I am curious. Why not just add a rule to /etc/mail/spamassassin/local.cf to match the desired header. Are you not using SpamAssassin? On 09/05/2017 07:38 AM, Benoit Panizzon wrote: > Dear Hans > >> I am looking for a possibility to filter for an existing header line. >> I found a lot of examples where $Subject, $Sender and others can be >> used. But I need the possibility to find a certain header line, for >> example X-Someinfo: Can someone point me to some examples. >> I was searching at Google but obviously with the wrong keywords. > I fear you have to do this the hard way by reading the HEADERS file > from the spool directory: > > in filter_end, because this is the place where you get the content... > > if (open(HDRCHECK, "<./HEADERS")) { > while() { > if ($_ =~ /^X-Someinfo:[\t ]+(.*?)/ { > $SomeinfoValue = $1; > } > } > } > > -Benoît Panizzon- -- * David P. Both, RHCE Millennium Technology Consulting LLC Raleigh, NC, USA 919-389-8678 db...@millennium-technology.com www.millennium-technology.com www.Linux-Databook.info - Home of the DataBook for Linux DataBook is a Registered Trademark of David Both * ___ 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] filter for header line
Dear mailing list members, I am looking for a possibility to filter for an existing header line. I found a lot of examples where $Subject, $Sender and others can be used. But I need the possibility to find a certain header line, for example X-Someinfo: Can someone point me to some examples. I was searching at Google but obviously with the wrong keywords. Kind regards Hans -- ___ 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