From 4c605efe63f4a34215c4bf41b46a09f087f5ce96 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Sun, 29 May 2022 19:46:05 +0200 Subject: [PATCH] host1:~lace/src/PerlMail/ update. --- Makefile.PL | 4 +- PerlMail/Config.pm | 1039 ++++++++++++++++++++++++++++++++++++--------- PerlMail/Contacts.pm | 4 +- PerlMail/Contacts/9000.pm | 4 +- PerlMail/Contacts/9210.pm | 4 +- PerlMail/Lib.pm | 4 +- README | 2 +- contacts-n9k2mutt | 4 +- perlmail-accept | 25 +- perlmail-sendmail | 4 +- perlmail-submit | 4 +- 11 files changed, 874 insertions(+), 224 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 38005a8..b636c45 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,6 +1,6 @@ #! /usr/bin/perl # -# $Id$ +# $Id: Makefile.PL,v 1.9 2005/02/20 09:35:14 short Exp $ # Copyright (C) 2002-2003 Jan Kratochvil # # This program is free software; you can redistribute it and/or modify @@ -19,7 +19,7 @@ use vars qw($VERSION); -$VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; +$VERSION=do { my @r=(q$Revision: 1.9 $=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; use strict; use warnings; diff --git a/PerlMail/Config.pm b/PerlMail/Config.pm index fa33e3d..38a9d4f 100644 --- a/PerlMail/Config.pm +++ b/PerlMail/Config.pm @@ -1,6 +1,6 @@ #! /usr/bin/perl # -# $Id$ +# $Id: Config.pm,v 1.9.2.27 2010/07/16 07:17:42 lace Exp $ # Copyright (C) 2002-2003 Jan Kratochvil # # This program is free software; you can redistribute it and/or modify @@ -20,7 +20,7 @@ package PerlMail::Config; use vars qw($VERSION); -$VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; +$VERSION=do { my @r=(q$Revision: 1.9.2.27 $=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; use strict; use warnings; @@ -29,10 +29,10 @@ use vars qw(@ISA @EXPORT); @ISA=qw(Exporter); @EXPORT=qw( $HOME - $Mail @ValidUsers $IdleMax $MaxBodySMS @SMSwebRcpt $SMSwebRcpt_username + $Mail $Mail2 @ValidUsers $IdleMax $MaxBodySMS @SMSwebRcpt $SMSwebRcpt_username $Lock_pathname $PeerAddr $Socket_timeout $DB_table $DBI_database $DBI_user $DBI_pwd $clamscan_waitpid_timeout - $sendmail_orig @addr_addon @h_rcpt @h_from + $sendmail_orig @addr_addon &FromAddress @h_rcpt @h_from %audit_profile @sms_squeezes @alternates_host @dnsbl_whitelist $Audit $is_pgp $opt_F $procmailFROM_MAILER $store_ignore $store_ignorenewmail @@ -40,12 +40,13 @@ use vars qw(@ISA @EXPORT); ); require Mail::Alias; +require MIME::Words; use Carp qw(confess cluck); BEGIN { - for (qw(headerhas store headeris did dnsbl store_muttrc_alternates Received_for parts_linear mime_type - body_first body_simple is_multipart mimehead mimebody spamassassin clamscan header_remap lmtp_deliver)) { + for (qw(headerhas writeto store headeris did dnsbl store_muttrc_alternates Received_for parts_linear mime_type + body_first body_simple is_multipart mimehead mimebody spamassassin clamscan header_remap)) { eval 'sub '.$_.' { return ::'.$_.'(@_); }'; } } @@ -54,15 +55,16 @@ BEGIN { # perlmail-accept & perlmail-sendmail # Various configuration files location is derived from it: -our $HOME="/home/jkratoch"; +our $HOME="/home/lace"; # perlmail-accept # Mail folder: our $Mail="$HOME/Mail"; +our $Mail2="/home/lacemail/Mail"; # Users respected for the 'idle' state (see $IdleMax): -our @ValidUsers=qw(root lace short kratochvil _local jkratoch); +our @ValidUsers=qw(root lace short kratochvil _local); # Maximum number of local console idle seconds while still considered as 'active user': our $IdleMax=10; # Maxium number of bytes to pass to Lingua::EN::Squeeze (performance optimization): @@ -71,17 +73,6 @@ our $MaxBodySMS=0x1000; our @SMSwebRcpt=qw(420 602 431329); # Some WWW::SMS modules require username: our $SMSwebRcpt_username="lace2"; -our $lmtp_admin="cyrus"; -our $lmtp_pwd; -#{ -# local *F; -# open F,"$HOME/priv/lmtp.${lmtp_admin}.pwd" or die; -# $lmtp_pwd=; -# chomp $lmtp_pwd; -# close F or die; -# } -our $lmtp_user_from="lace"; -our $lmtp_user_to="lacemail"; our $clamscan_waitpid_timeout=3; @@ -104,6 +95,47 @@ our $DBI_user="short"; our $DBI_pwd=$HOME."/priv/mysql.".$DBI_user.".pwd"; +# perlmail-sendmail + +# Lists where address is generated: +my @lists=qw( + tacplus-l@disaster.com + gsm@sh.cvut.cz + n9k@pandora.cz + dev9k@pandora.cz + gsm@pandora.cz + ros-general@reactos.com + ros-kernel@reactos.com + ros-dev@reactos.com + ros-cvs@reactos.com + 4cinfo@atrey.karlin.mff.cuni.cz + libtool@gnu.org + libtool-patches@gnu.org + wine-license@winehq.org + gtk-devel-list@gnome.org + gnome-vfs-list@gnome.org + captive-announce-list@jankratochvil.net + captive-list@jankratochvil.net + captive-devel-list@jankratochvil.net + linux-ntfs-announce@lists.sourceforge.net + linux-ntfs-dev@lists.sourceforge.net + orbit-list@gnome.org + devel@kannel.org + automake@gnu.org + autoconf@gnu.org + autoconf-patches@gnu.org + wget-patches@sunsite.dk + wget@sunsite.dk + wineconf@winehq.org + prague-pm@pm.org + dev@httpd.apache.org + asterisk-perl@lists.gnuinter.net + isdn4linux@listserv.isdn4linux.de + libc-alpha@sources.redhat.com + squid-dev@squid-cache.org + ); + #4c-list@vellum.cz + # Pathname of the original sendmail(8) binary: our $sendmail_orig=(-x ($_="/usr/sbin/sendmail-orig") ? $_ : "/usr/sbin/sendmail"); # List of addresses to locally Bcc all mails to: @@ -113,7 +145,44 @@ our @addr_addon=(Mail::Alias->new("/etc/aliases")->exists("sentout") ? ("sentout our $opt_F; # imported our $is_pgp; # imported +my %lists=map(($_=>1),@lists); # Generate new From address for the target $rcpt of type Mail::Address. +# $iserror is true for "MAIL FROM" RFC821 address, false for "From:" RFC822 address. +# Returns: Mail::Address instance. +sub FromAddress +{ +my($rcpt,$iserror)=@_; + + my $phrase=(defined $opt_F ? $opt_F : "Jan Kratochvil"); + { + last if !$is_pgp; + last if $iserror; + local *F; + local $_; + my $filename="$HOME/.gnupg/options"; + open F,$filename or do { warn "Open \"$filename\": $!"; last; }; + local $/="\n"; + my @keys=map((/^\s*default-key\s+(\S+)\s*$/),); + @keys==1 or do { warn "Found ".scalar(@keys)." 'default-key's in your \"$filename\", ignoring"; last; }; + close F or warn "Close \"$filename\": $!"; + my $default_key=$keys[0]; + $default_key=~/^[[:xdigit:]]{8}$/ or do { warn "Invalid 'default-key', ignoring: $default_key"; last; }; + return Mail::Address->new( + $phrase, + 'pgp-'.uc($default_key).'@jankratochvil.net', + ); + } + return Mail::Address->new($phrase,'lace@jankratochvil.net') if !$lists{$rcpt->address()}; + return Mail::Address->new( + $phrase, + 'rcpt' + .'-' + .(defined($rcpt->user()) ? $rcpt->user() : "NOUSER") + .".AT." + .(defined($rcpt->host()) ? $rcpt->host() : "LOCAL") + .'@jankratochvil.net', + ); +} # RedHat sendmail-8.9.3-20/src/conf.c/HdrInfo[]/\Q/* destination fields */\E # FIXME: Recognize "Resent-$_" headers for -t but when we are in 'resent' mode? @@ -179,9 +248,26 @@ our @dnsbl_whitelist=( "212.80.76.29", # prace.seznam.cz: 212.80.76.42.seznam.cz.free.blackholes.five-ten-sg.com "193.252.22.30", # smtp1.wanadoo.fr: 30.22.252.193.blackholes.five-ten-sg.com "213.151.87.16", # posta.dobnet.cz: 16.87.151.213.relays.ordb.org - "70.71.0.212", # Red Hat ); +#sub dolist +#{ +# my($list)=@_; +# +# my $mailed=0; +# for my $alias ("",qw(admin bounces confirm join leave owner request subscribe unsubscribe)) { +# my $head=$list.($alias?"-$alias":""); +# my $mail=$head.'@jankratochvil.net'; +# if (headerhas("To",$mail)||headerhas("Cc",$mail)) { +# writeto "|sudo -u mailman /usr/lib/mailman/mail/mailman ".($alias||"post")." $list"; +# #writeto "|/usr/local/bin/mailmanlace ".($alias||"post")." $list"; +# ###writeto "|/usr/sbin/sendmail $head".'@localhost.localdomain'; +# $mailed++; +# } +# } +# return $mailed; +#} + our $Audit; # imported our $procmailFROM_MAILER; # imported our $store_ignorenewmail; # imported @@ -200,9 +286,194 @@ sub audit || headerhas "From",'' ); + return if did sub { store "=spy","log" if headeris "From",''; }; + + return if did sub { store "=hotelgatespam","log" if headeris("To",''); }; + + # whitelist + my $whitelist; + $whitelist||=headeris("From",''); + $whitelist||=headeris("From",''); + $whitelist||=headeris("From",''); + $whitelist||=headeris("From",''); + $whitelist||=headeris("From",''); + $whitelist||=headeris("From",''); + $whitelist||=headeris("From",''); + $whitelist||=headeris("From",''); + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("From",qr/@(?:)equabank\.cz$/); + $whitelist||=headeris("From",''); + $whitelist||=headeris("From",''); + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); + $whitelist||=headeris("Return-Path",''); + $whitelist||=headeris("Return-Path",''); + $whitelist||=headeris("Return-Path",''); + $whitelist||=headeris("Return-Path",''); + $whitelist||=headeris("Return-Path",''); + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",'<3-e@3-e.cz>'); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML =goparking.cz + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",'<@bluenile.co.uk>'); # HTML - just to be sure + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",'<@members.ebay.co.uk>'); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",'') # HTML + &&headeris("To",''); + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",''); # HTML booking.com + $whitelist||=headeris("Return-Path",'<@prikryvky.cz>'); # HTML + $whitelist||=headeris("Return-Path",'<@members.ebay.com.hk>'); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",'<@hypotecnibanka.cz>'); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("From",'<@tesla.com>'); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # sometimes HTML + $whitelist||=headeris("Return-Path",''); # HTML, from indiegogo + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",'<@bounce.emails.tesla.com>'); # HTML + $whitelist||=headeris("Return-Path",'<@uptimerobot.com>'); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",'<@studentagency.cz>'); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",'<@transferwise.com>'); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",'<@domain.com>'); # HTML; seen only + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",'<@google.com>'); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # unaware why + $whitelist||=headeris("From",'<@toptal.com>'); # unaware why + $whitelist||=headeris("Return-Path",'<@sendgrid.net>'); # unaware why, From: @toptal.com + $whitelist||=headeris("Return-Path",'<@ikea.com>'); # unaware why + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",'<@linaro.org>'); # safety + $whitelist||=headeris("From",'<@embecosm.com>'); # safety + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("From",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + $whitelist||=headeris("Return-Path",''); # HTML + # spam honeypots return if did sub { local $_; + return if $whitelist; # Do not local $store_file as it is our-imported $store_profile="silent"; store "=spam" if grep /^\Qshort\@k332.feld.cvut.cz\E/i,Received_for(); @@ -210,6 +481,7 @@ sub audit store "=spam" if headeris "From",''; store "=spam" if headeris "From",''; store "=spam" if headeris "From",''; + store "=spam" if headeris "From",''; store "=spam" if headeris "From",''; store "=spam" if headeris "From",''; store "=spam" if headeris "From",''; @@ -218,6 +490,337 @@ sub audit store "=spam" if headeris "From",''; store "=spam" if headeris "From",''; store "=spam" if headeris "From",''; + store "=spam" if $Audit->subject() eq "Virus intercepted" + && body_simple()=~/^A message sent from\s.*\sto\s.*\scontained .* and has not been delivered[.]$/; + store "=spam" if headeris "From",''; + store "=spam" if headeris "From",''; + store "=spam" if headeris "From",''; + store "=spam" if headeris "To" ,''; + store "=spam" if headeris "From",''; + store "=spam" if headeris "From",''; + store "=spam" if headeris "To" ,''; + store "=spam" if headeris "Return-Path",''; + store "=spam" if headeris "Return-Path",''; + store "=spam" if headeris("From",'') + && headeris("Return-Path",''); + store "=spam" if headeris "From",''; + store "=spam" if headeris "From",''; + store "=spam" if headeris "From",''; + store "=spam" if headeris "Return-Path",''; + store "=spam" if headeris "From",''; + store "=spam" if headeris "From",qr/@(?:)zvraceny\.cz/; + store "=spam" if headeris("To" ,'<4c-admin@jankratochvil.net>') + && body_simple()=~/workeuropenet\.com/; + store "=spam" if headeris("From",'') + && (body_simple()=~/\bgamma-burst\.com\b/ || body_simple()=~/\bopenwebtech\.ru\b/); + store "=spam" if headeris "Return-Path",''; # From: mkubinova@mmreality.cz + store "=spam" if headeris "Return-Path",''; + store "=spam" if headeris "Return-Path",''; + store "=spam" if headeris "Return-Path",''; + store "=spam" if headeris "From",''; + store "=spam" if headeris "From",''; + store "=spam" if headeris "From",''; + store "=spam" if headeris "From",qr/@(?:)badoo\.com/; + store "=spam" if headeris "Return-Path",''; + store "=spam" if headeris "Return-Path",''; + store "=spam" if headeris "Return-Path",''; + store "=spam" if headeris "Return-Path",qr/postmaster\.twitter\.com/; + store "=spam" if headeris "Return-Path",''; + store "=spam" if headeris "Return-Path",''; + store "=spam" if headeris "To",''; + store "=spam" if headeris "To",''; + store "=spam" if headeris "To",''; + store "=spam" if headeris "To",''; + store "=spam" if headeris "From",''; + store "=spam" if headeris "Return-Path",''; + store "=spam" if headeris "Subject",qr/Are you a go getter[?]$/; + store "=spam" if headeris "Subject",qr/Daily Stocks Tips$/; + store "=spam" if headeris "Subject",qr/If you get in now you could triple fast$/; + store "=spam" if headeris "From",''; + store "=spam" if headeris "From",''; + store "=spam" if headeris "Return-Path",''; # From: info@levneelektro.cz + store "=spam" if headeris "X-Mailer",'WhatCounts'; + store "=spam" if headeris("Subject",qr/New report this evening!$/) + &&headeris("From",qr/YahooFinance Canada/); + store "=spam" if headeris "Return-Path",''; + store "=spam" if headeris "Subject",qr/\bIt is time to buy COLV$/; + store "=spam" if headeris("Subject",qr/Shipping Information - Your Order #\d{3}-\d{4}$/) + && body_simple()=~/\QYour order will be shipped shortly, we apologize for the troubles. Please, review the invoice in the attached file.\E/; + store "=spam" if headeris("Subject",qr/Unpaid Invoice #\d{6}$/) + && body_simple()=~/\QPlease make sure you send payment for your parcel to avoid any inconvenience. Open the attached file to review the confirmation listing.\E/; + store "=spam" if headeris("Subject",qr/Compensation - Reference Number #\d{6}$/) + && body_simple()=~/\QThe mistake made will be compensated promptly, please do not worry.\E/; + store "=spam" if headeris("Subject",qr/FW: Refund RF-\d{6}$/) + && body_simple()=~/\QThe refund will go to your bank account. It may take a few moments for this transaction to appear in your account.\E/; + store "=spam" if headeris("Subject",qr/FW: Payment #\d{6}$/) + && body_simple()=~/\QPlease find attached an invoice that is now due for payment.\E/; + store "=spam" if headeris("Subject",qr/FW: Confirmation #\d{6}$/) + && body_simple()=~/\QPlease see attached the confirmation of transaction conducted from your account.\E/; + store "=spam" if headeris("Subject",qr/FW: Order Status #\d{6}$/) + && body_simple()=~/\QWe would like to thank you for your recent order.\E/; + store "=spam" if headeris("Subject",qr/FW: Statement S?#\d{6}$/) + && body_simple()=~/\QCan you please sign and return.\E/; + store "=spam" if headeris("Subject",qr/FW: Payment Details - \Q[\E\d{6}\Q]\E$/) + && body_simple()=~/\QFull details are attached to this email.\E/; + store "=spam" if headeris("Subject",qr/FW: Payment Receipt$/) + && body_simple()=~/\QThank you for your payment. It is important that you print this receipt and record the receipt number as proof of your payment.\E/; + store "=spam" if headeris("Subject",qr/FW: Overdue Incoices$/) + && body_simple()=~/\QPlease find attached copy updated statement as your account has 3 overdue incoices.\E/; + store "=spam" if headeris("Subject",qr/Bill N-[\dA-F]{6}$/) + && body_simple()=~/\QIn order to avoid fine you have to pay in 48 hours.\E/; + store "=spam" if headeris("Subject",qr/recent bill$/) + && body_simple()=~/\QPlease see attached file regarding clients recent bill. Should you need further assistances lease feel free to email me.\E/; + store "=spam" if headeris("Subject",qr/Additional Information Needed #\d{6}$/) + && body_simple()=~/\QWe kindly ask you to provide us additional information regarding your case.Please find the form attached down below.\E/; + store "=spam" if headeris("Subject",qr/\bEmailing: /) + && body_simple()=~/\QYour message is ready to be sent with the following file or link attachments:\E/; + store "=spam" if headeris("Subject",qr/\bDocuments$/) + && body_simple()=~/\QWe obtained such documents from your bank, please view the attached documents.\E/; + store "=spam" if MIME::Words::decode_mimewords($Audit->subject())=~/\bYour Latest Documents from Angel Springs Ltd \[[0-9A-F]{8}\]$/ + && body_simple()=~/\QYour new documents are now attached to your email. You don't have to follow a link now to get to your documents.\E/; + store "=spam" if headeris("Subject",qr/\bRe:$/) + && body_simple()=~/\QPlease find the document file attached to this mail. The attached filecontains transfers and invoices history of your bank account.\E/; + store "=spamre" if headeris("Subject",qr/^\Q[SPAM] Re:\E$/); + store "=spam" if headeris("Subject",qr/\bCorresponding Invoice$/) + && body_simple()=~/\QThank you for your email regarding your order of 21 June, and sorry for the delay in replying. I am\E/; + store "=spam" if headeris("Subject",qr/\bPayment$/) + && body_simple()=~/\QOur records show that we have not yet received payment for the previous order\E/; + store "=spam" if headeris("Subject",qr/\bFinal version of the report$/) + && body_simple()=~/\Qasked me to send you the attached Word document, which contains the final version of the report.\E/; + store "=spam" if headeris("Subject",qr/\bUpdated document$/) + && body_simple()=~/\QThe reference you requested is attached.\E/; + store "=spam" if headeris("Subject",qr/\bRequested document$/) + && body_simple()=~/\QThe document you requested is attached.\E/; + store "=spam" if headeris("Subject",qr/\bUpdated$/) + && body_simple()=~/\QAttached please find the documents you requested.\E/; + store "=spam" if headeris("Subject",qr/\breport$/) + && body_simple()=~/\QI've attached the report you asked me to send.\E/; + store "=spam" if headeris("Subject",qr/\bnew invoice$/) + && body_simple()=~/\QI am sending you the invoice you requested.\E/; + store "=spam" if headeris("Subject",qr/\bDocuments copies$/) + && body_simple()=~/\QI am sending copies of the documents as attachments.\E/; + store "=spam" if headeris("Subject",qr/\bFw:\s*$/) + && body_simple()=~/\QHere's that excel file (latest invoices) that you wanted.\E/; + store "=spam" if headeris("Subject",qr/\bProfile$/) + && body_simple()=~/\QPlease find attached the profile of Mr.\E.*\Q for a suitable role in your Organisation\E/; + store "=spam" if headeris("Subject",qr/\b(?:Scan|Attahed|Letter)$/) + && body_simple()=~/\QPlease find the reference letter I attached.\E/; + store "=spam" if headeris("Subject",qr/\b(?:Scan|Attahed|Letter)$/) + && body_simple()=~/\QPlease find attached the reference letter.\E/; + store "=spam" if headeris("Subject",qr/\b(?:Scan|Attahed|Letter)$/) + && body_simple()=~/\QThe reference letter you requested is attached.\E/; + store "=spam" if headeris("Subject",qr/\bbank account report$/) + && body_simple()=~/\QThank you very much for responding my email in a very short time. Attached is\E/; + store "=spam" if headeris("Subject",qr/\bcompany database$/) + && body_simple()=~/\QI am deeply gratified that you reacted to my email promptly.\E/; + store "=spam" if headeris("Subject",qr/\bBusiness Analysis$/) + && body_simple()=~/\QI attached the detailed business analysis (updated}\E/; + store "=spam" if headeris("Subject",qr/\bfixed invoice$/) + && body_simple()=~/\QI am very sorry for the wrong data file you received from me yesterday.\E/; + store "=spam" if headeris("Subject",qr/\bFinancial statement$/) + && body_simple()=~/\QPardon me for the delay in responding to your last email.\E/; + store "=spam" if headeris("Subject",qr/\bsales report$/) + && body_simple()=~/\QI am truly sorry that I was not available at the time you called me yesterday.\E/; + store "=spam" if headeris("Subject",qr/\blist of activities$/) + && body_simple()=~/\QAttached is the list of activities to help you arrange for the coming presentation. Please read it carefully and write to me if you have any concern.\E/; + store "=spam" if headeris("Subject",qr/\bBusiness card$/) + && body_simple()=~/\QI have attached the new business card design.\E/; + store "=spam" if headeris("Subject",qr/\bplease sign$/) + && body_simple()=~/\QPlease sign the receipt attached for the arrival of new office facilities.\E/; + store "=spam" if headeris("Subject",qr/\bBudget Reports$/) + && body_simple()=~/\QI attached the annual budget reports that you asked me to send to you.\E/; + store "=spam" if headeris("Subject",qr/\bDocuments Requested$/) + && body_simple()=~/\QPlease find attached documents as requested.\E/; + store "=spam" if headeris("Subject",qr/\bNew Doc \d+-\d+$/) + && body_simple()=~/\QScanned by CamScanner\E/; + store "=spam" if headeris("Subject",qr/\bOrder Confirmation-[-\d]+$/) + && body_simple()=~/\QThis communication and any files transmitted with it contain information which is confidential and which may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s), please note that any disclosure, copying, printing or use whatsoever of this communication or the information contained in it is strictly prohibited. If you have received this communication in error, please notify us by e-mail or by telephone as above and then delete the e-mail together with any copies of it.\E/; + store "=spam" if headeris("Subject",qr/\bContract$/) + && body_simple()=~/\QPlease sign the attached contract with our technical service company for\E/; + store "=spam" if headeris("Subject",qr/\boffice equipment$/) + && body_simple()=~/\QPlease sign the attached purchase of the office equipment. We will send you back the receipt afterward.\E/; + store "=spam" if headeris("Subject",qr/\bCommission$/) + && body_simple()=~/\QHere is the excel file of the commission you earned last month. Please analyze\E/; + store "=spam" if headeris("Subject",qr/\bmortgage documents$/) + && body_simple()=~/\Q, I am attaching the mortgage documents relating to your department.\E/; + store "=spam" if headeris("Subject",qr/\bTransaction details$/) + && body_simple()=~/\Q, The transaction you requested was not able to proceed. Please see the attachment to recheck the account number.\E/; + store "=spam" if headeris("Subject",qr/\bpaycheck$/) + && body_simple()=~/\Q, as you requested, attached is the paycheck for your next month\E/; + store "=spam" if headeris("Subject",qr/\bbank transactions$/) + && body_simple()=~/\QAttached is the bank transactions made from the company during last month.\E/; + store "=spam" if headeris("Subject",qr/\bflight tickets$/) + && body_simple()=~/\QI am sending you the flight tickets for your business conference abroad next month.\E/; + store "=spam" if headeris("Subject",qr/\bShipping information$/) + && body_simple()=~/\QOur shipping service is sending the order form due to the request from your company.\E/; + store "=spam" if headeris("Subject",qr/\bCredit card receipt$/) + && body_simple()=~/\QWe are sending you the credit card receipt from yesterday. Please match the card number and amount.\E/; + store "=spam" if headeris("Subject",qr/\bAugust invoice$/) + && body_simple()=~/\Qasked me to send you invoice for August. Please look over the attachment and make a payment ASAP.\E/; + store "=spam" if headeris("Subject",qr/\bSuspected Purchases$/) + && body_simple()=~/\QPlease take a look at the attached account balance to see the purchase history.\E/; + store "=spam" if headeris("Subject",qr/\bAgreement form$/) + && body_simple()=~/\Qassigned you to make the payment agreement for the new coming employees.\E/; + store "=spam" if headeris("Subject",qr/\bInvoice #[0-9a-f]{5}-2016$/) + && body_simple()=~/\Qwe have attached the debt payment invoice. Please view the due amount.\E/; + store "=spam" if headeris("Subject",qr/\bOrder Confirmation \d+$/) + && body_simple()=~/\QThis message is intended only for the individual or entity to which it is\E/; + store "=spam" if headeris("Subject",qr/\bBudget report$/) + && body_simple()=~/\QI have partially finished the last month's budget report you asked me to do. Please add miscellaneous expenses in the budget.\E/; + store "=spam" if headeris("Subject",qr/\bConfirmation letter$/) + && body_simple()=~/\QThe bank has sent loan confirmation letter. Please review the amount of funds.\E/; + store "=spam" if headeris("Subject",qr/\bTax invoice$/) + && body_simple()=~/\QAttached is the tax invoice of your company. Please do the payment in an urgent manner.\E/; + store "=spam" if headeris("Subject",qr/\bEquipment receipts$/) + && body_simple()=~/\QHere is the photocopying equipment receipts purchased last week.\E/; + store "=spam" if headeris("Subject",qr/\bAccount report$/) + && body_simple()=~/\Qwe have detected the cash over and short in your account.\E/; + store "=spam" if headeris("Subject",qr/\bDelivery Confirmation: \d+$/) + && body_simple()=~/\QPlease contact us if there are any questions or further assistance we can provide\E/; + store "=spam" if headeris("Subject",qr/\bRenewed License$/) + && body_simple()=~/\QPlease see the attached license and send it to the head office.\E/; + store "=spam" if headeris("Subject",qr/\bfinancial report$/) + && body_simple()=~/\QHere are some accounting data I have collected. Please merge it into your report.\E/; + store "=spam" if headeris("Subject",qr/\bBooking confirmation$/) + && body_simple()=~/\QSee the attachment to confirm the booking.\E/; + store "=spam" if headeris("Subject",qr/\brequest$/) + && body_simple()=~/\QLet me know whether it is the correct invoice number you needed or not.\E/; + store "=spam" if headeris("Subject",qr/\bOut of stock$/) + && body_simple()=~/\QPlease take a look and let us know if you would like to substitute with any of them.\E/; + store "=spam" if headeris("Subject",qr/\bPackage$/) + && body_simple()=~/\QDear customer, we have sent your package today. Please have a look at the receipt attached.\E/; + store "=spam" if headeris("Subject",qr/\bPayment approved$/) + && body_simple()=~/\QYour payment has been approved. Your account will be debited within two days.\E/; + store "=spam" if headeris("Subject",qr/\bDelivery #D-\d{7}$/) + && body_simple()=~/\QAll the details are in the attachment. Delivery will arrive at 15:00 coming Monday.\E/; + store "=spam" if headeris("Subject",qr/\bTransactions details$/) + && body_simple()=~/\QAs you requested, attached is the scan of all the transactions your account made in September 2016.\E/; + store "=spam" if headeris("Subject",qr/\bUpdated invoice #\d{7}$/) + && body_simple()=~/\QOur sincere apology for the incorrect invoice we sent to you yesterday.\E/; + store "=spam" if headeris("Subject",qr/\bPayment$/) + && body_simple()=~/\QYou are receiving this email because the company has assigned you as part of the approval team.\E/; + store "=spam" if headeris("Subject",qr/\bPayment$/) + && body_simple()=~/\QPlease read through the attachment and return us the scan of the signed contract.\E/; + store "=spam" if headeris("Subject",qr/\bTemporarily blocked$/) + && body_simple()=~/\Qthis is to inform you that your Debit Card is temporarily blocked as there were unknown transactions made today.\E/; + store "=spam" if headeris("Subject",qr/\bParcel details$/) + && body_simple()=~/\QAttached is the shipment label. Please print it out to take the parcel from our office.\E/; + store "=spam" if headeris("Subject",qr/\bReceipt \d+-\d+$/) + && body_simple()=~/^\s*$/s; + store "=spam" if headeris("Subject",qr/\bplease sign$/) + && body_simple()=~/\QI have made the paperwork you asked me to prepare two days ago.\E/; + store "=spam" if headeris("Subject",qr/\Q[Scan]\E 2016-\d{4} \d{2}:\d{2}:\d{2}$/) + && body_simple()=~/\QSent with Genius Scan for iOS.\E/; + store "=spam" if headeris("Subject",qr/\bInvoice-\d+-\d+-\d+-[0-9A-F]+$/) + && body_simple()=~/\QShould you have any Invoice related queries please do not hesitate to contact either your designated Credit Controller or the Main Credit\E/; + store "=spam" if headeris("Subject",qr/\bTravel Itinerary$/) + && body_simple()=~/\QThank you for flying with us! We attached the Travel Itinerary for Your booking number\E/; + store "=spam" if headeris("Subject",qr/\bCancellation request$/) + && body_simple()=~/\Q, you need to fill out the cancellation form attached in this email.\E/; + store "=spam" if headeris("Subject",qr/\bYour Order$/) + && body_simple()=~/\QKindly keep the slip in case you would like to return or state your product's warranty.\E/; + store "=spam" if headeris("Subject",qr/\bwrong paychecks$/) + && body_simple()=~/\QThey send us the wrong paychecks. Attached is your paycheck arrived to my email by mistake.\E/; + store "=spam" if headeris("Subject",qr/\bComplaint letter$/) + && body_simple()=~/\QClient sent a complaint letter regarding the data file you provided.\E/; + store "=spam" if headeris("Subject",qr/\bBill overdue$/) + && body_simple()=~/\QThis is fromthe Telephone Company to remind you that your bill is overdue.\E/; + store "=spam" if headeris("Subject",qr/\bPayment history$/) + && body_simple()=~/\QThe payment history for the firstweek of October 2016 is attached as you requested.\E/; + store "=spam" if headeris("Subject",qr/\bWrong tracking number$/) + && body_simple()=~/\QIt looks like the deliverycompany gave us the wrong tracking number.\E/; + store "=spam" if headeris("Subject",qr/\bTransactions$/) + && body_simple()=~/\Qcalled me yesterday updating about the transactions on company's account from last month.\E/; + store "=spam" if headeris("Subject",qr/\bBill$/) + && body_simple()=~/\QTo continue using our maintenance service, please pay for last month's fee by 4th of November.\E/; + store "=spam" if headeris("Subject",qr/\bPlease verify$/) + && body_simple()=~/\Qas you requested, I have proofread the technical document you sent.\E/; + store "=spam" if headeris("Subject",qr/\bHealth Insurance$/) + && body_simple()=~/\Qthis is from the insurance company concerning with your health insurance.\E/; + store "=spam" if headeris("Subject",qr/\bOrder$/) + && body_simple()=~/\QThe item you've ordered is on delay due to the unknown problem regarding your bank account you paid from.\E/; + store "=spam" if headeris("Subject",qr/\bVirtual card$/) + && body_simple()=~/\QDear Client! A virtual card you have ordered is now ready but not active.\E/; + store "=spam" if headeris("Subject",qr{\bInvoice for \d+ \d+/\d+/\d{4}$}) + && body_simple()=~/\QThis email confirms that your goods have been dispatched. Please find attached your Invoice in PDF format.\E/; + store "=spam" if headeris("Subject",qr{\bPlease Pay Attention$}) + && body_simple()=~/\Qwe have received your payment but the amount was not full.\E/; + store "=spam" if headeris("Subject",qr{\bAttention Required$}) + && body_simple()=~/\QFines may apply from the third party. We are sending you the details in the attachment.\E/; + store "=spam" if headeris("Subject",qr{\bIt Is Important$}) + && body_simple()=~/\QSending you the report of the problem - please open the attachment and check the data.\E/; + store "=spam" if headeris("Subject",qr{\bNew voice mail message from \d+ on }) + && body_simple()=~/\QYou might want to check it when you get a chance.Thanks!\E/; + store "=spam" if headeris("Subject",qr{\bUrgent Alert$}) + && body_simple()=~/\QAll the details are in the attachment. Please open it when possible.\E/; + store "=spam" if headeris("Subject",qr{\bFor Your Consideration$}) + && body_simple()=~/\QAll details are in the attachment. Please check it out to see whether we are right.\E/; + store "=spam" if headeris("Subject",qr{\bFile COPY.29112016.944358.XLS Sent 29/11/2016$}) + && body_simple()=~/\Qcan you please pass this invoice for payment thank you\E/; + store "=spam" if headeris("Subject",qr{\bUrgent$}) + && body_simple()=~/\Qour accountant informed me that in the bill you processed, the invalid account number had been specified.\E/; + store "=spam" if headeris("Subject",qr{\bPlease Consider This$}) + && body_simple()=~/\QPlease confirm the amount and let us know if you have any questions.\E/; + store "=spam" if headeris("Subject",qr{\b\QThis stock is about to receive a buy out at 10 times its current market price...\E$}) + && body_simple()=~/\QIt's been a long time since I sent you my special newsletter containing a hot stock tip.\E/; + store "=spam" if headeris("Subject",qr{\b\QYou can make 10x on your money by next week if you buy this stock now.\E$}) + && body_simple()=~/\QDo you remember the last time I sent you a tip about a company worth buying in the market?\E/; + store "=spam" if headeris("Subject",qr{\b\QHere is your chance to buy shares that will go up 10x by next week.\E$}) + && body_simple()=~/\QAs you obviously know, I have been quiet these last couple of months because I really have not had a stock worth recommending for\E/; + store "=spam" if headeris("Subject",qr{\b\QThis public company is being bought out. Read now to profit from it.\E$}) + && body_simple()=~/\QIt has been a very long time since I emailed you about a rare investment opportunity.\E/; + store "=spam" if headeris("Subject",qr{\b\QRead Now: Why this company\E.*\Qs shares are guaranteed to soar next week.\E$}) + && body_simple()=~/\QWe haven't communicated in a while and you might be wondering why I'm emailing you now out of the blue but it's because I have something\E/; + store "=spam" if headeris("Subject",qr{\b\QI've got strong reasons to believe that this stock is about to soar.\E$}) + && body_simple()=~/\QWe've been out of touch for a while. I've been very busy looking for the next big stock that has the potential to explode and it took me\E/; + store "=spam" if headeris("Subject",qr{\b\QAllow me to share something profitable with you today.\E$}) + && body_simple()=~/\QIf you're wondering why I'm emailing you now, out of the blue, after months of radio silence let me tell you that I have a good reason\E/; + store "=spam" if headeris("Subject",qr{\b\QBy tomorrow evening this stock will be twenty times higher\E$}) + && body_simple()=~/\QI outlined very specifically a game plan for you to make more than 20 times on your principle within the next 48 hours.\E/; + store "=spam" if headeris("Subject",qr{\b\QThis company's being acquired tomorrow\E$}) + && body_simple()=~/\QThe cat might be out of the bag now but there is still a massive opportunity to benefit.\E/; + store "=spam" if headeris("Subject",qr{\b\QYour chance to make an amazing move is quickly slipping away\E$}) + && body_simple()=~/\QThere is reason for excitement. A good friend of mine who works at a high place which I will not name told me about a crazy\E/; + store "=spam" if headeris("Subject",qr{\b\QThis is your opportunity to get a 20 bagger in the market very fast\E$}) + && body_simple()=~/\QOne of my closest buddies, who happens to be a banker, let me in on a little tip earlier on.\E/; + store "=spam" if headeris("Subject",qr{\b\QHere's a life changing tip that will guide you through trump's America\E$}) + && body_simple()=~/\QGiven the current political climate, there are very few certain things in this world.\E/; + store "=spam" if headeris("Subject",qr{\b\QHere's why this company's shares are about to go up tenfold next week.\E$}) + && body_simple()=~/\QYes, it's been some time since I reached out to you with something good but trust me? the wait will have been worth it.\E/; + store "=spam" if headeris("Subject",qr{\b\QLet me tell you why this stock will go up 10x by next week.\E$}) + && body_simple()=~/\QHaven't heard from me in a while right? That's because I'm not one to waste your time.\E/; + store "=spam" if headeris("Subject",qr{\b\QYou can make more than ten times your principle with just this 1 stock\E$}) + && body_simple()=~/\QIt's been at least a few monthssince the last time I had the chance to share something amazing withyou\E/; + store "=spam" if headeris("Subject",qr{\b\QThis biotech stock is guaranteed to jump 10x next week\E$}) + && body_simple()=~/\QThis is going to sound crazy, but you remember last year when I told you tobuy the mobile apps company before Sony\E/; + store "=spam" if headeris("Subject",qr{\b\QIn less than 5 days this company could yield you a ten bagger\E$}) + && body_simple()=~/\QI've beeninvolved in the markets for a few decades now and I'll be the first totell you that things have never been as uncertain\E/; + store "=spam" if headeris("Subject",qr{\b\QCan you really make ten fold on your principal in just a few days?\E$}) + && body_simple()=~/\QWith today's political climate, it is becoming increasing difficult tofind winning stocks.\E/; + store "=spam" if headeris("Subject",qr{\b\QNot sure where to invest? Here's a sure bet.\E$}) + && body_simple()=~/\QOur country is going through astrange era. Recent political changes have oddly affected the marketsand pretty much most stocks\E/; + store "=spam" if headeris("Subject",qr{\b\QThis company just found a huge cure and no one knows about it yet!\E$}) + && body_simple()=~/\QDid you ever read an articleonline, or in a magazine praising some so called guru for making a fewhundred grand out of just a few\E/; + store "=spam" if headeris("Subject",qr{\b\QHere's an idea that could make you a small fortune...\E$}) + && body_simple()=~/\QI'm not one to just goaround and tell my friends random things\E/; + store "=spam" if headeris("Subject",qr{\b\QLet me share with you something that could make you big bucks\E$}) + && body_simple()=~/\QI have been around theblock. I'm a veteran in this market. I was making my subscribersprofits through both Bush, Obama and now Trump.\E/; + store "=spam" if headeris("Subject",qr{\bCopy of Invoice \d+$}) + && body_simple()=~/\QIf you have any further questions regarding your invoice, please call Customer Service.\E/; + store "=spam" if headeris("Subject",qr{\bHello$}) + && body_simple()=~/\QI see you frequently visit this site, so I wanted to talk to you today but you had already left the chat.\E/; + store "=spam" if headeris("Subject",qr{\bHi$}) + && body_simple()=~/\QAre you often visit this site if not, we can talk in other social networks.\E/; + store "=spam" if headeris("Subject",qr{\bI guarantee that this company will quadruple before Friday. Check it out$}) + && body_simple()=~/\QEven non traditional places to stash some savings like bitcoin are out of control at an all time high.\E/; + store "=spam" if headeris("Subject",qr{\bThis stock is gonna go up 4 fold before the end of the week.$}) + && body_simple()=~/\QOne of my best friends who happens to be employed at the largest firm in new york told me that I should really consider buying a specific\E/; + store "=spam" if headeris("Subject",qr{\bHow are you[?]$}) + && body_simple()=~/\QDo you visit this site oftentimes? I was hoping to talk to you in chat once but you left all of a sudden. Could you write me your address\E/; + + # Whitelist - HTML. + return if headeris("From",''); + return if headeris("Return-Path",''); for my $header (qw(To Cc)) { store "=spam" if headerhas $header,''; store "=spam" if headerhas $header,''; @@ -227,27 +830,60 @@ sub audit { # weak detection: files with text/html w/o text/plain are usually a spam my @types_linear=map({ mime_type($_); } parts_linear()); - store "=spamhtml" if grep({ $_ eq "text/html"; } @types_linear) && !grep({ $_ eq "text/plain"; } @types_linear); + store "=spam" if grep({ $_ eq "text/html"; } @types_linear) && !grep({ $_ eq "text/plain"; } @types_linear); } -### store "=spambig5" if ($_=mimehead(body_first())->mime_attr("Content-Type.charset")) && /^big5/i; + store "=spam" if ($_=mimehead(body_first())->mime_attr("Content-Type.charset")) && /^big5/i; }; $store_profile=undef(); - my $nonrh; - for ($Audit->get("Received")) { - $nonrh=1 if /\sby\s+mx\d+\Q.redhat.com\E\s/s; - } - $nonrh=1 if !headeris("From",qr/[@]redhat.com/i); + my %mailman=( + ''=>"=caperr", + ''=>"=caperr", + ''=>"=caperr", + '<4c-admin@>'=>"=4cerr", + ); + return if did sub { + if (!did sub { + while ((my($mailaddr,$folder)=each(%mailman))) { + (my $maillistaddr=$mailaddr)=~s/-admin/-list$&/; + store $folder,"log" if (headeris("From",'')&&headeris("To",$mailaddr)) + || headeris("From",$maillistaddr) + || headeris("To",$maillistaddr) + || headeris("From",$mailaddr); + } + }) { + store "=cap","bell" if headeris "List-Id" ,''; + store "=capd","bell" if headeris "List-Id" ,''; + store "=capann","bell" if headeris "List-Id" ,''; + store "=4c","bell" if headeris "List-Id" ,'<4c-list.vellum.cz>'; + } + }; + +# { +# my $mailed=0; +# if ($Audit->header()!~/for <(?:4c|vmezihori1XXX)-(?:admin|owner|bounces)@/) { +# for my $list qw(vmezihori1) { +# $mailed+=dolist $list; +# } +# } +# # return if $mailed; +# } + + # fast spam detection + return if did sub { + $store_profile="log"; + store "=spammms2" if headeris "To",'<@mms2.cz>'; + }; # spam detection return if did sub { - # Internal RH mails are never spam. - return if !$nonrh; # It is too expensive to scan the huge =caperr announcements by spamassassin(1). - return if headeris("From",qr/^captive-[a-z]*@/); + return if $whitelist; +### return if headeris("From",qr/^captive-[a-z]*@/); + return if headeris("From",''); # Do not local $store_file as it is our-imported $store_profile="log"; local $_; -### store "=spam".";virus=$_" if $_=clamscan(); + store "=spamclam".";virus=$_" if $_=clamscan(); store "=spam".";spamassassin".($_ eq 1 ? "" : "=$_") if $_=spamassassin(); # Down? ### store "=spam".";$_" if $_=dnsbl '.relays.ordb.org.' ,1; # all hosts @@ -255,8 +891,8 @@ if (0) { store "=spam".";$_" if $_=dnsbl '.blackholes.mail-abuse.org.' ,1; # all hosts # we don't check all hosts as they can be "dialup" category, FIXME: check for it # store "=spam".";$_" if $_=dnsbl '.blackholes.five-ten-sg.com.',0; # just first - # I don't send viruses but viruses propagate mails of mine } + # I don't send viruses but viruses propagate mails of mine store "=spam".";ravmd" if headeris "X-Mailer",'ravmd/8.3.2'; store "=spam".';short@ucw.cz+MAILER' if $isFROM_MAILER && headeris("To",''); if (!is_multipart()) { @@ -294,20 +930,50 @@ if (0) { # special delivery store "=err","bell" and return if headerhas \&Received_for,''; - store "=host1","bell" and return if headerhas \&Received_for,qr/\Qjan.kratochvil+\E\S*\Q.at.host1.dyn.jankratochvil.net\E@/; - -# if (headeris "X-Calendar-Attachment",qr/./) { -# store "=zimbra","btw"; -# my $headless=$::Message; -# $headless=~s{^From .*?\n}{} or cluck "No From header for Zimbra"; -# local *CHILD; -# if (!$::Dry) { -# open CHILD,q{|sendmail jkratoch@calendar.corp.redhat.com} -# or cluck "Cannot forward to Zimbra"; -# print CHILD $headless or cluck; -# close CHILD or cluck; -# } -# } + + # ppl-wished foreign remapping, Reply-To is left untouched! + # FIXME: modifications are now being dropped by &write_message! + header_remap("From",{ + 'kerere@post.cz' =>'kamzik@k332.feld.cvut.cz', + 'profes@mbox.vol.cz' =>'kratochvilova@egp.cz', + 'jkrouzek@mbox.vol.cz' =>'krouzek@mbox.fsv.cuni.cz', + 'jakub.gorner@lidovky.cz' =>'tonda@disnet.cz', + 'jan.kolar@videoprogress.cz' =>'jenda.kolar@volny.cz', + 'daniel.rulicek@cponline.cz' =>'daniel.rulicek@cpress.cz', + 'pavel@suse.cz' =>'pavel@ucw.cz', + }); + + # My obsolete e-mail addresses + store_muttrc_alternates "=redirect-","btw"; + + # nasty public lists with $store_ignore + { + # Do not local $store_file as it is our-imported + $store_profile="log"; + local $store_ignore; + $store_ignore="smsmail" if 1==$Audit->body() && length(join "",$Audit->body())<180; # SMS mail + $store_ignore="sms OS" if $Audit->subject()=~/^Email pro: /; # "^Email pro: gsm@sh\.cvut\.cz$"; + $store_ignore="list-moron" if grep { headeris "From",$_; } qw( + + + + + <@mujoskar.cz> + + + + + + ); + + store "=gsm" if headeris "X-BeenThere",''; + store "=gsmpand" if headeris "List-Post",''; + store "=9kc","log" if headeris "List-Post",''; + store "=9kcd","log" if headeris "List-Post",''; + } + $store_profile=undef(); + + return if headeris "From" ,''; # lists store "=mozillabug","log" if headeris "From" ,''; @@ -315,7 +981,9 @@ if (0) { store "=9kd","log" if headeris "Sender" ,''; store "=spong","log" if headeris "List-Id" ,''; store "=gtkd","silent" if headeris "List-Id" ,''; + store "=gtkappd","silent" if headeris "List-Id" ,''; store "=gnomevfs","log" if headeris "List-Id" ,''; + store "=mffstatnice","bell" if headeris "List-Post",''; store "=hw","log" if headeris "List-Post",''; store "=gnokii","log" if headeris "List-Id" ,''; store "=winelic","silent" if headeris "List-Id" ,''; @@ -338,13 +1006,27 @@ if (0) { store "=kernelann","silent" if headeris "X-Mailing-List",''; store "=sparse","silent" if headeris "X-Mailing-List",''; store "=smp","silent" if headeris "X-Mailing-List",''; + store "=surprise","sms" if headeris "List-Post",''; + store "=surprisesuse","sms" if headeris "Sender" ,''; store "=tacacs","silent" if headeris "Sender" ,''; store "=tacacs","silent" if headeris "Sender" ,''; store "=tacacs","silent" if headeris "List-Id" ,''; store "=pm","log" if headeris "List-Id" ,''; store "=radary","log" if headeris "Reply-To" ,''; store "=dnet","log" if headeris "Sender" ,'<@lists.distributed.net>'; + store "=linux-input","log" if headeris "List-Post",''; + store "=strom","bell" if headeris "List-Post",''; store "=netinfo","log" if headeris "Sender" ,''; + store "=saintmj","log" if headeris "From" ,''; + store "=saintmj","log" if headeris "From" ,''; + store "=saintmj","log" if headeris "From" ,''; + store "=saintjk","log" if headeris "From" ,''; + store "=saintjk","log" if (headeris("From" ,'') + || headeris("From" ,'') + || headeris("From" ,'')) + && headeris("To" ,''); + store "=4cerr","bell" if headeris "From" ,''; + store "=4c","sms" if headeris "List-Post",'<4cinfo@atrey.karlin.mff.cuni.cz>'; store "=slashdot","bell" if headeris "From" ,''; store "=freshmeat","bell" if headeris "From" ,''; store "=sourceforge","bell" if headeris "From" ,''; @@ -369,33 +1051,33 @@ if (0) { store "=asterisk-perl","log" if headeris "List-Post",''; store "=i4l","silent" if headeris "List-Id" ,''; store "=glibc","silent" if headeris "List-Post",''; - store "=fedann","bell" if headeris("List-Id" ,'') - || headeris("List-Id" ,''); + store "=fedann","bell" if headeris "List-Id" ,''; store "=fedpkg","bell" if headeris "List-Id" ,''; - store "=federrata","log" if headeris "Return-Path",''; - store "=fedtools","log" if headeris "List-Id" ,''; - store "=freleng","log" if headeris "List-Id" ,''; - if (headeris("List-Id" ,'') - || headeris("List-Id" ,'')) { - store "=fedd","log"; - store "=feddgdb","log" if body_simple()=~/\bgdb\b/i; - store "=feddlibunwind","log" if body_simple()=~/libunwind/i; - } + store "=fedtools","log" if headeris "List-Id" ,''; + store "=fedd","log" if headeris "List-Id" ,''; store "=bashbug","log" if headeris "List-Id" ,''; store "=zaurus","silent" if headeris "List-Id" ,''; store "=zaurusann","log" if headeris "List-Id" ,''; store "=zaurusd","silent" if headeris "List-Id" ,''; store "=zaurussoft","silent" if headeris "List-Id" ,''; store "=iptperl","silent" if headeris "List-Id" ,''; + # own webs + store "=energie","bell" if headeris "From" ,qr/^EnergieWeb/; + store "=ats","log" if headeris("From" ,'') + || (headeris("From",'') && headerhas("To",'')); + store "=atscasablanca","log" if headeris "From" ,''; store "=www-sms","log" if headeris "List-Id" ,''; store "=httpdd","log" if headeris "list-post",''; + store "=mms2log","log" if headeris "Return-Path",''; + store "=hotelgatelog","log" if headeris("Return-Path",'') + # `SMART error' should not be matched. + && headeris("Subject" ,qr/^(?:Cron|Anacron|LogWatch) /); store "=imja","log" if headeris "List-Id" ,''; store "=wince","log" if headeris "List-Post",''; store "=mysqlperl","log" if headeris "List-Id" ,''; store "=whiteann","log" if headeris "List-Id" ,''; store "=white","log" if headeris "List-Id" ,''; store "=centos","log" if headeris "List-Id" ,''; - store "=centann","log" if headeris "List-Id" ,''; store "=modperldoc","log" if headeris "List-Id" ,''; store "=qemud","log" if headeris "List-Id" ,''; store "=diamond","log" if headeris "X-Replicator-Inst",'"www.diamondcard.us"'; @@ -404,158 +1086,119 @@ if (0) { store "=nagios","log" if headeris "List-Id" ,''; store "=grub","log" if headeris "List-Id" ,''; store "=gdb","log" if headeris "Mailing-List",'contact gdb-help@sourceware.org; run by ezmlm'; - store "=gdbia64","log" if headeris("Mailing-List",'contact gdb-help@sourceware.org; run by ezmlm') - && body_simple()=~/\b(?:ia64|itanium)\b/i; store "=gdbpr","log" if headeris "Mailing-List",'contact gdb-prs-help@sourceware.org; run by ezmlm'; - store "=gdbpria64","log" if headeris("Mailing-List",'contact gdb-prs-help@sourceware.org; run by ezmlm') - && body_simple()=~/\b(?:ia64|itanium)\b/i; store "=gdbpat","log" if headeris "Mailing-List",'contact gdb-patches-help@sourceware.org; run by ezmlm'; - store "=gdbpatia64","log" if headeris("Mailing-List",'contact gdb-patches-help@sourceware.org; run by ezmlm') - && body_simple()=~/\b(?:ia64|itanium)\b/i; store "=gdbann","log" if headeris "Mailing-List",'contact gdb-announce-help@sourceware.org; run by ezmlm'; - store "=gdbcvs","log" if headeris "Mailing-List",'contact gdb-cvs-help@sourceware.org; run by ezmlm'; - store "=gdbcvsall","log" if headeris "Mailing-List",'contact src-cvs-help@sourceware.org; run by ezmlm'; store "=binutils","log" if headeris "Mailing-List",'contact binutils-help@sourceware.org; run by ezmlm'; store "=binutilsbug","log" if headeris "List-Id" ,''; - store "=buggnome","log" if headeris "From" ,''; - store "=bugdesktop","log" if headeris "From" ,''; - - # Red Hat - store "=wslog","log" if headeris("From" ,'') - && headeris("Return-Path",''); - store "=rhos","log" if headeris "List-Id" ,''; - store "=rhosd","log" if headeris "List-Id" ,''; - store "=rhmemo","silent" if headeris "List-Id" ,''; - store "=rhann","log" if headeris "List-Id" ,''; - store "=rheng","log" if headeris "List-Id" ,''; - store "=rheurope","log" if headeris("List-Id" ,'') - && headeris("X-loop" ,''); - store "=rhbrno","log" if headeris("List-Id" ,'') - &&!headeris("X-loop" ,''); - store "=rhbrnomemo","log" if headeris "List-Id" ,''; - store "=rhbrnopto","log" if headeris "List-Id" ,''; - store "=rhbase","log" if headeris "List-Id" ,''; - if (!did sub { - store "=rhrhel","log" if headeris "X-BeenThere",''; - store "=rhrhel","log" if headeris "X-BeenThere",''; - store "=rheng","log" if headeris "X-BeenThere",''; - }) { - store "=rhtoolsteam","log" if headeris "List-Id" ,''; - } - store "=rhtools","log" if headeris "List-Id" ,''; - store "=rhosteam","log" if headeris "List-Id" ,''; - store "=rhbug","log" if headeris "X-BeenThere",''; - store "=rhgdb","log" if headeris "List-Id" ,''; - store "=rhit","log" if headeris "Return-Path",''; - store "=rhcommit","log" if headeris("List-Id" ,'') - || headeris("X-CVS-Server",''); - store "=rhcommitgdb","log" if headeris "X-CVS-Directory",qr{^rpms/gdb(?:/.*)?$}; - store "=rhcommitgcc","log" if headeris "X-CVS-Directory",qr{^rpms/gcc(?:/.*)?$}; - store "=rhcommitlibunwind","log" if headeris "X-CVS-Directory",qr{^rpms/libunwind(?:/.*)?$}; - store "=rhcommitstrace","log" if headeris "X-CVS-Directory",qr{^rpms/strace(?:/.*)?$}; - store "=rhcommitbinutils","log" if headeris "X-CVS-Directory",qr{^rpms/binutils(?:/.*)?$}; - store "=rhcommitinsight","log" if headeris "X-CVS-Directory",qr{^rpms/insight(?:/.*)?$}; - store "=rhcommitptrace","log" if headeris "X-CVS-Directory",qr{^tests/kernel/syscalls/ptrace(?:/.*)? }; - store "=rhcommitgdbtest","log" if headeris "X-CVS-Directory",qr{^tests/gdb/gdb-any(?:/.*)? }; - store "=rhbrnowiki","log" if headeris("Return-Path",'') - && headeris("From" ,'') - && headeris("To" ,'') - # `\Q=?' causes: Can't modify constant item in concatenation (.) or string - && headeris("Subject" ,qr{^(?:\Q[Red Hat Czech] \E(?:Trivial )?Update of |=\Q?utf-8?q?=5BRed_Hat_Czech=5D_\E(?:Trivial_)?Update_of_)}); - store "=rhts","log" if headeris "List-Id" ,''; - store "=rhts","log" if headeris("List-Id" ,'') - || headeris("List-Id" ,''); - store "=rhwiki","log" if headeris "Return-Path",''; - store "=rhinet","log" if headeris "List-id" ,''; - if (headeris "Return-Path",'') { - if (body_simple()=~/(?:jkratoch|jan.kratochvil)[@]\Qredhat.com\E/s) { - store "=rhtsme","log"; - } - else { - store "=rhtsbogus","log"; - } - } - store "=rherrata","log" if $Audit->get("X-Erratatool-Component") - || (headeris("Return-Path",'') - && headeris("Subject",qr{^Changed Errata Request })); - if (headeris "Subject" ,qr{^\Q[rpmdiff] INSPECTION: Erratum \E\d{4}:\d{4} .*\btest results\b}) { - store "=rherrata","log"; - # `[rpmdiff] INSPECTION:' came from `root@rpmdiff3.test.redhat.com'. - } elsif ((headeris("To",'') || !$Audit->get("To") || $Audit->get("To") eq "undisclosed-recipients:;") - && headeris("Return-Path",qr{^\Qroot@\E.*[.](?:(?:lab|rhts|eng).(?:bos|boston)|z900|test|englab.brq|nay)\Q.redhat.com\E$})) { - store "=rhtsme","log"; - } - store "=rhtsme" if headeris "Subject" ,qr{^\Q[Beaker Job Completion] \E}; - store "=buggcc","log" if headeris("Return-Path",'') - || headeris("Return-Path",''); - store "=frysk","log" if headeris "Mailing-List",'contact frysk-help@sourceware.org; run by ezmlm'; - store "=fryskcvs","log" if headeris "List-Id" ,''; - store "=bugsrc","log" if headeris "Return-Path",''; - store "=rhwc","log" if headeris "Subject" ,'Cron $HOME/redhat/bin/rhwc'; - store "=dwarf","log" if headeris "List-Id" ,''; - store "=dwarf","log" if headeris "List-Id" ,''; - store "=libunwind","log" if headeris "List-Id" ,''; - store "=libunwindd","log" if headeris "List-Id" ,''; - store "=rhsip","log" if headeris "List-Id" ,''; - store "=fedaccount","log" if headeris("Return-Path",'') - && headeris("To", '') - && headeris("From", '') - && headeris("Subject" ,'You need to create a bugzilla account for jkratoch@redhat.com'); - store "=straced","log" if headeris "List-Id" ,''; - if (headeris "Return-Path",'') { - if ($Audit->subject()=~/^\d+ builds? marked for deletion$/) { - store "=fkojidel","log"; - } else { - store "=fkoji","log"; - } - } - if (headeris "Return-Path",'') { - if ($Audit->subject()=~/^\d+ builds? marked for deletion$/) { - store "=rhbrewdel","log"; - } else { - store "=rhbrew","log"; - } - } - store "=utrace","log" if headeris "List-Id" ,''; - store "=eud","log" if headeris "List-Id" ,''; - store "=eud","log" if headeris "List-Id" ,''; + store "=4c","bell" if headeris "List-Id" ,'<4c.jankratochvil.net>'; + store "=bezlucky","bell" if headeris "List-Id" ,''; store "=dup","log" if headeris "List-Id" ,''; store "=dupbug","log" if headeris "List-Id" ,''; - store "=rheclipse","log" if headeris "List-Id" ,''; - store "=rhtech","log" if headeris "List-Id" ,''; - store "=rhgdb","log" if headeris "List-Id" ,''; - store "=rhperf","log" if headeris "List-Id" ,''; - store "=rhdebug","log" if headeris "List-Id" ,''; - store "=rhsip","log" if headeris "List-Id" ,''; - store "=fupdate","log" if headeris "Return-Path",''; - store "=rhmedia","log" if headerhas "List-Id",''; - store "=fia64","log" if headeris "List-Id" ,''; - store "=archer","log" if headeris "List-Id" ,''; - store "=archergit","log" if headeris "List-Post" ,''; - store "=flive","log" if headeris("List-Id" ,'') - || headeris("List-Id" ,''); - store "=fspin","log" if headeris "List-Id" ,''; - store "=rhstatus","log" if headeris "List-Id" ,''; - store "=rhstatusteam","log" if headeris "List-Id" ,''; - store "=fcrash","log" if headeris "List-Id" ,''; - store "=gabi","log" if headeris "List-Id" ,''; - store "=fupload","log" if headeris("X-Fedora-Upload",qr//) - && headeris("Subject" ,qr/^File\s\S+\suploaded\sto\slookaside\scache\sby\s/); - store "=rhpkg","log" if headeris "Return-Path",''; - store "=gdbmail","log" if headeris "From" ,qr{^\Qdiffgdbdaymail by Jan Kratochvil \E$}; - store "=vpx","log" if headeris("List-Id" ,'') - || headeris("List-Id" ,''); - - - if (($isFROM_MAILER && !did) || !did) { -# lmtp_deliver $lmtp_admin,$lmtp_pwd,$lmtp_user_from,$lmtp_user_to; + store "=eclipsetrader","log" if headeris "List-Id" ,''; + store "=eclipsetraderd","log" if headeris "List-Id" ,''; + store "=sue","log" if headeris "Subject" ,'Cron $HOME/secure/sue'; + store "=linkedin","log" if headeris("From" ,'') + || headeris("From" ,''); + store "=jap","log" if headeris("From" ,'') + && headeris("To" ,''); + store "=csa","log" if headeris "From" ,''; + store "=be2","log" if headeris("From" ,'') + || headeris("From" ,''); + + # Petr Koutecky does not mark his Stuff + store "=koutecky","log" if headeris "Return-Path",''; + store "=koutecky","log" if headeris "Return-Path",''; + store "=koutecky","log" if headeris "Return-Path",''; + store "=koutecky","log" if headeris "Return-Path",''; + + store "=host0log","log" if headeris("From" ,'') + && headeris("Return-Path",''); + store "=host1log","log" if headeris("From" ,'') + && headeris("Return-Path",''); + store "=jklabs","bell" if headerhas "Received" ,qr/\b\Qjan+lace.at.gw.priv.jklabs.cz\E@\Qjankratochvil.net\E\b/i; + store "=financnik","log" if headeris("Return-Path",'') + && headeris("From" ,'') + ## headeris("Subject" ,qr/^Mini-magaz.*n serveru /); # It is B-MIME-encoded + && body_simple()=~/\bMini-magaz.*n serveru Finan.*k[.]cz /; + store "=financnik","log" if headeris("Return-Path",'') + && headeris("From" ,''); + store "=vps","bell" if headeris "From" ,'<@vps.jankratochvil.net>'; + store "=vps2","bell" if headeris "From" ,'<@vps2.jankratochvil.net>'; + store "=ib","bell" if headeris("Return-Path",'') + && headeris("Subject" ,qr/^Interactive Brokers (?:Activity Statement (?:Notification )?|Daily Trade Report )for \d+$/); + store "=ib","bell" if (headeris("Return-Path",'') + ||headeris("Return-Path",'')) + &&(headeris("Subject" ,'Message Notification') + ||headeris("Subject" ,'IB FYI: Earnings Notification') + ||headeris("Subject" ,'IB FYI: Important information about Market Orders') + ||headeris("Subject" ,qr/^Interactive Brokers Webinars in /) + ||headeris("Subject" ,'IB FYI: Trades subject to US dividend tax withholding') + ||headeris("Subject" ,'IBKR FYI: Trades subject to US dividend tax withholding')); + store "=odorik","log" if headeris "Return-Path",''; + store "=zoohit","log" if headeris("From" ,'') + ||headeris("From" ,''); + store "=stockdaily","log" if headeris "From" ,''; + store "=stockdaily","log" if headeris "From" ,''; + store "=stockdaily","log" if headeris "From" ,''; + store "=stockdaily","log" if headeris "Return-Path",''; + store "=stockdaily","log" if headeris "From" ,''; + store "=stockdaily","log" if headeris "From" ,''; + store "=aostrading","log" if headeris "From" ,''; + store "=shserver","log" if headeris "Return-Path",''; + store "=rhbuildbot","log" if headeris("Return-Path",'') + &&headeris("From" ,'') + &&headeris("Subject" ,'buildbot failure in LLVM on lldb-x86_64-fedora-28-cmake'); + store "=penzion","log" if headeris "X-Original-To",'<@penzionspicak.cz>'; + store "=penzionbookingspam","log" if headeris "From" ,''; + store "=penzion","log" if headeris("Subject" ,qr/Guest.House/) # qr/^Špičák Guest House - Performance on Google for / + &&headeris("From" ,''); + store "=greatergoodspam","log" if headeris "Return-Path",''; + store "=padi","log" if headeris "From" ,'<@mail.padidiver.com>'; + store "=spamindiegogo","log" if headeris "From" ,''; + store "=cd","log" if headeris "Return-Path",''; + store "=uptime","log" if headeris "Return-Path",''; + store "=globus","log" if headeris "From" ,''; + store "=spamgrab","log" if headeris "From" ,''; + store "=spamtoptal","log" if headeris "From" ,''; + store "=pi","log" if headeris "Return-Path",'<@piwifi18.jankratochvil.net>'; + store "=wedoslogin","log" if headeris("Return-Path",'') + &&headeris("Subject" ,'=?UTF-8?B?V0VET1MgSW50ZXJuZXQgLSBwxZlpaGzDocWhZW7DrSBrIMO6xI10dQ==?='); # WEDOS Internet - přihlášení k účtu + store "=ostc","log" if headeris "Return-Path",''; + store "=apmail","log" if headeris("Return-Path",'') + &&headeris("To" ,'') + &&headeris("Subject" ,'Cron $HOME/bin/apmail'); + store "=spammobilede","log" if headeris("Return-Path",'') + &&headeris("Subject" ,qr/^\Q=?utf-8?B?8J+PhiBBdXNnZXfDpGhsdGUgVG9wLUZhaHJ6ZXVnZSBkZXIgVw==?=\E\s*\Q=?utf-8?B?b2NoZQ==?=\E$/); # 🏆 Ausgewählte Top-Fahrzeuge der Woche + if (headeris("To" ,'') + && headeris("Return-Path",'')) { + if (body_simple()=~/^SIP request received from .* for 2143$/o) { + store "=callme","log"; + } else { + store "=call","log"; } + } + store "=odorik","log" if headeris "Return-Path",''; + +# { +# my $mailed=0; +# if ($Audit->header()!~/for <(?:4c|vmezihori1)-(?:admin|owner|bounces)@/) { +# for my $list qw(mailman 4c) { +# $mailed+=dolist $list; +# } +# } +# # return if $mailed; +# } -# store "=errm","bell" if $isFROM_MAILER && !did(); + store "=errm","bell" if $isFROM_MAILER && !did() + # qr/daemon@/ makes $isFROM_MAILER positive. + && !headeris("From",'') + && !headeris("Resent-From",''); if (!did) { store "==","sms"; - spamassassin "sa-learn --ham"; +# FIXME: What to do with it? +### spamassassin "sa-learn --ham"; } } diff --git a/PerlMail/Contacts.pm b/PerlMail/Contacts.pm index 0767261..b604f62 100644 --- a/PerlMail/Contacts.pm +++ b/PerlMail/Contacts.pm @@ -1,6 +1,6 @@ #! /usr/bin/perl # -# $Id$ +# $Id: Contacts.pm,v 1.6 2004/12/17 21:14:39 short Exp $ # Copyright (C) 2002-2004 Jan Kratochvil # # This program is free software; you can redistribute it and/or modify @@ -20,7 +20,7 @@ package PerlMail::Contacts; use vars qw($VERSION); -$VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; +$VERSION=do { my @r=(q$Revision: 1.6 $=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; use strict; use warnings; diff --git a/PerlMail/Contacts/9000.pm b/PerlMail/Contacts/9000.pm index ebc7195..92045d6 100644 --- a/PerlMail/Contacts/9000.pm +++ b/PerlMail/Contacts/9000.pm @@ -1,6 +1,6 @@ #! /usr/bin/perl # -# $Id$ +# $Id: 9000.pm,v 1.1 2004/12/17 21:14:39 short Exp $ # Copyright (C) 2002-2004 Jan Kratochvil # # This program is free software; you can redistribute it and/or modify @@ -20,7 +20,7 @@ package PerlMail::Contacts::9000; use vars qw($VERSION); -$VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; +$VERSION=do { my @r=(q$Revision: 1.1 $=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; use strict; use warnings; use vars qw(@ISA); diff --git a/PerlMail/Contacts/9210.pm b/PerlMail/Contacts/9210.pm index 9d7a880..9be8d9d 100644 --- a/PerlMail/Contacts/9210.pm +++ b/PerlMail/Contacts/9210.pm @@ -1,6 +1,6 @@ #! /usr/bin/perl # -# $Id$ +# $Id: 9210.pm,v 1.4 2004/12/19 11:47:47 short Exp $ # Copyright (C) 2002-2004 Jan Kratochvil # # This program is free software; you can redistribute it and/or modify @@ -50,7 +50,7 @@ my($self)=@_; package PerlMail::Contacts::9210; use vars qw($VERSION); -$VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; +$VERSION=do { my @r=(q$Revision: 1.4 $=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; use strict; use warnings; use vars qw(@ISA); diff --git a/PerlMail/Lib.pm b/PerlMail/Lib.pm index 344d989..2aebf4a 100644 --- a/PerlMail/Lib.pm +++ b/PerlMail/Lib.pm @@ -1,6 +1,6 @@ #! /usr/bin/perl # -# $Id$ +# $Id: Lib.pm,v 1.3 2010/07/16 06:27:11 lace Exp $ # Copyright (C) 2002-2003 Jan Kratochvil # # This program is free software; you can redistribute it and/or modify @@ -20,7 +20,7 @@ package PerlMail::Lib; use vars qw($VERSION); -$VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; +$VERSION=do { my @r=(q$Revision: 1.3 $=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; use strict; use warnings; diff --git a/README b/README index ddc1115..e4c82f1 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -$Id$ +$Id: README,v 1.6 2005/02/20 10:59:20 short Exp $ Installation diff --git a/contacts-n9k2mutt b/contacts-n9k2mutt index 6136f45..03aa44d 100755 --- a/contacts-n9k2mutt +++ b/contacts-n9k2mutt @@ -1,6 +1,6 @@ #! /usr/bin/perl # -# $Id$ +# $Id: contacts-n9k2mutt,v 1.13 2004/12/30 10:10:29 short Exp $ # Copyright (C) 2002-2003 Jan Kratochvil # # This program is free software; you can redistribute it and/or modify @@ -22,7 +22,7 @@ use vars qw($VERSION); -$VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; +$VERSION=do { my @r=(q$Revision: 1.13 $=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; use strict; use warnings; diff --git a/perlmail-accept b/perlmail-accept index e704077..4feb8ec 100755 --- a/perlmail-accept +++ b/perlmail-accept @@ -1,6 +1,6 @@ #! /usr/bin/perl # -# $Id$ +# $Id: perlmail-accept,v 1.40 2010/07/16 07:19:36 lace Exp $ # Copyright (C) 2002-2003 Jan Kratochvil # # This program is free software; you can redistribute it and/or modify @@ -19,7 +19,7 @@ use vars qw($VERSION); -$VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; +$VERSION=do { my @r=(q$Revision: 1.40 $=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; use strict; use warnings; @@ -48,9 +48,7 @@ BEGIN { use lib $ENV{"PERLMAIL_BASEDIR"} || File::Basename::dirname($0); # FIXME: - use lib $ENV{"HOME"}."/lib64/perl5"; - use lib $ENV{"HOME"}."/lib/perl5"; - use lib $ENV{"HOME"}."/share/perl5"; +# use lib split /:/,$ENV{"PERL5LIB"}; use PerlMail::Config; use PerlMail::Lib; @@ -436,11 +434,17 @@ my($folder,$profile,%args)=@_; ) if $do{"syslog"} || $Dry; $folder=~s/;.*$//s; - $folder="$Mail/".$' if $folder=~/^=/; push @AuditStored,$folder if $do{"did"}; return if $store_ignore || $Dry; $DoBell++ if $do{"bell"}; - write_message($folder) or die; + my $folder1="$Mail/".$' if $folder=~/^=/; + write_message($folder1) or die $folder1; + if ($Mail2) { + my $folder2="$Mail2/".$' if $folder=~/^=/; + my $old=umask 0117; + write_message($folder2) or die $folder2; + umask $old; + } smssend_tryall $store_ignorenewmail,$do{"sms"},%args if $do{"sms"}; } @@ -702,9 +706,12 @@ my($re,$justone,$header,$maybeaddress)=@_; if (ref $header) { $header=join(",",&$header()); } - else { + elsif ($justone) { $header=$Audit->get($header); } + else { + $header=join(",",$Audit->get($header)); + } return 0 if !$header; return $header=~/$maybeaddress/i if "Regexp" eq ref $maybeaddress; return $header=~/$re/i if !defined(my $want=($maybeaddress=~/^\<(.*)\>$/)[0]); @@ -716,7 +723,7 @@ my($re,$justone,$header,$maybeaddress)=@_; { $_->address()=~/$'/i; } elsif ($want=~/\@$/) { $_->user() =~/^(?:\Qmailto:\E)?\Q$`\E/i; } - elsif ($want=~/^\@/) + elsif ($want=~/^\@/&&defined $') { $_->host() =~/^\Q$'\E/i; } else { $_->address()=~/^(?:\Qmailto:\E)?\Q$want\E/i; } diff --git a/perlmail-sendmail b/perlmail-sendmail index 2177e2c..3854ae1 100755 --- a/perlmail-sendmail +++ b/perlmail-sendmail @@ -1,6 +1,6 @@ #! /usr/bin/perl # -# $Id$ +# $Id: perlmail-sendmail,v 1.18 2003/10/19 06:24:05 short Exp $ # Copyright (C) 2002-2003 Jan Kratochvil # # This program is free software; you can redistribute it and/or modify @@ -19,7 +19,7 @@ use vars qw($VERSION); -$VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; +$VERSION=do { my @r=(q$Revision: 1.18 $=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; use strict; use warnings; diff --git a/perlmail-submit b/perlmail-submit index 69c14f9..812e2e5 100755 --- a/perlmail-submit +++ b/perlmail-submit @@ -1,6 +1,6 @@ #! /usr/bin/perl # -# $Id$ +# $Id: perlmail-submit,v 1.15 2005/12/10 09:45:35 short Exp $ # Copyright (C) 2002-2003 Jan Kratochvil # # This program is free software; you can redistribute it and/or modify @@ -19,7 +19,7 @@ use vars qw($VERSION); -$VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; +$VERSION=do { my @r=(q$Revision: 1.15 $=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; }; use strict; use warnings; -- 1.8.3.1