[exim] Re: failure to transfer data from subprocess

Top Pagina
Delete this message
Reply to this message
Auteur: Robert Nicholson
Datum:  
Aan: Evgeniy Berdnikov via Exim-users
CC: Evgeniy Berdnikov
Onderwerp: [exim] Re: failure to transfer data from subprocess
So the following .forward works

# Exim filter

if error_message then finish endif

logfile $home/filter.log 0600

logwrite "$tod_full GOT $header_received: $header_date: message from $header_from: to $header_to: about $header_subject:"

#pipe "nice -10 $home/perlscripts/filter.pl -runsa"
#pipe "/usr/bin/nice -10 $home/perlscripts/filter.pl"
pipe "$home/perlscripts/filter.sh"

finish

———

This is the one that breaks still.

# Exim filter

if error_message then finish endif

logfile $home/filter.log 0600

logwrite "$tod_full GOT $header_received: $header_date: message from $header_from: to $header_to: about $header_subject:"

if $header_from: matches Viagra or 
$header_subject: contains "Men's Health" or 
$header_subject: matches VIAGRA or
$header_subject: matches "PenisSize" or
$header_subject: matches "Vicodin" or
$header_subject: matches "CIALIS"  or
$header_subject: matches "USA Loan" or
$header_subject: matches "Magic Jack" or
$header_from: matches "[Mm]agic\s*[Jj]ack" or
$header_subject: matches "Pre-approved Offer" or
$header_subject: matches "CRITICAL: There has been a change to your" or
$header_subject: matches "Rep1icaCartier watches" or
$header_subject: matches "Adobe Creative Suite 3 Design Premium"
then
    logwrite "Spam $header_from: $header_subject:"
    seen finish
endif

if foranyaddress $header_to: ( $thisaddress does not match ^robert\@elastica.com\$ ) 
  and foranyaddress $header_from: ( $thisaddress does not match ^robert\@elastica.com|robert\@audrey.local\$ ) 
  and ${domain:$header_to:} matches ^elastica.com\$
then
   logwrite "junk header_from $header_from: header_to $header_to:"
   seen finish
endif

if foranyaddress $header_to:,$header_cc: ( $thisaddress matches ^robert\@elastica.com\$ )
  and foranyaddress $header_from: ( $thisaddress does not match ^rss\@elastica.com\$ )
  and
  ( 
$rheader_subject: does not match \N[^\x00-\x7f]{5,}\N and
$rheader_from: does not match "\\s*=\\?(ks_c_5601-|big5|euc-|shift[-_]jis|(iso.\{0,4\}639-)|hkscs|sil|koi[78]|iscii|guobiao|gb2312|gb18030|(iso.\{0,4\}2022)|(iso.\{0,4\}8859-[57])|(windows-1251)|(windows-1255)|(windows-1256))" and
$rheader_content-type: does not match "\\s*=\\?(ks_c_5601-|big5|euc-|shift[-_]jis|(iso.\{0,4\}639-)|hkscs|sil|koi[78]|iscii|guobiao|gb2312|gb18030|(iso.\{0,4\}2022)|(iso.\{0,4\}8859-[57])|(windows-1251)|(windows-1255)|(windows-1256))" and 
$rheader_subject: does not match "\\s*=\\?(ks_c_5601-|big5|euc-|shift[-_]jis|(iso.\{0,4\}639-)|hkscs|sil|koi[78]|iscii|guobiao|gb2312|gb18030|(iso.\{0,4\}2022)|(iso.\{0,4\}8859-[57])|(windows-1251)|(windows-1255)|(windows-1256))" and
$message_body: does not match ".*charset=3D(ks_c_5601-|big5|euc-|shift[-_]jis|(iso.\{0,4\}639-)|hkscs|sil|koi[78]|iscii|guobiao|gb2312|gb18030|(iso.\{0,4\}202)|(iso.\{0,4\}8859-[57])|(windows-1251)|(windows-1255)|(windows-1256))"
  )
  then
#   logwrite "saving backup header_from $header_from: header_to $header_to:"
   save $home/Maildir/.INBOX.intray.backup/
endif

#pipe "nice -10 $home/perlscripts/filter.pl -runsa"
#pipe "/usr/bin/nice -10 $home/perlscripts/filter.pl"
pipe "$home/perlscripts/filter.sh"

finish


> On Jun 2, 2023, at 1:57 PM, Evgeniy Berdnikov via Exim-users <exim-users@???> wrote:
>
> On Fri, Jun 02, 2023 at 09:56:16AM -0500, Robert Nicholson via Exim-users wrote:
>> Having done this and looking at all the timestamps that appear in
>> the trace log relative to the exim mainlog I think I can safely
>> conclude that these emails never make their way to my filter. since
>> none of the timestamps are lining up for the offending emails when
>> they are processed.
>
> Interesting. As far as I understand, you save a copy of each e-mail
> before pipe... Is this situation reproducible with this copy?
> Would this copy be lost if sent to destination address?
> --
> Eugene Berdnikov
>
> --
> ## subscription configuration (requires account):
> ## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
> ## unsubscribe (doesn't require an account):
> ## exim-users-unsubscribe@???
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/



--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-users-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/