# http://www.berklix.com/~jhs/dots/.procmailrc_errors
# ~jhs/.procmailrc_errors included by ~jhs/.procmailrc

SPAM_NO_USER=spam/no_user/.
	# Not SPAM_NO_USER=$SPAM_NULL_NO_RCVSTORE
	# Dont discard, as though almost all is spammer masquerader
	# bastards bouncing, if friends change addresses this will
	# come here too, so I need to add code to discard spammers.
	# Also dead list addresses get reported here by postoffice@land

# Unfortunately I cant add a pre qualifying phrase of eg
	# * ^To:postmaster@((webmail|land|slim|js)\.|)(berklix|bsdpie|geoffharries|surfacevision|the-phoney-photon)\.(com|de|eu|net|org|uk)
	# * ^To:postmaster@[[:alpha:]]+\.?((webmail|land|slim|js)\.|)(berklix|bsdpie|geoffharries|surfacevision|the-phoney-photon)\.(com|de|eu|net|org|uk)
	# $SPAM_NULL_NO_RCVSTORE
# As that wouldnt also dump bounce masquerade spam back to jhs@ & mk@ etc
# However just single phrases is scarey, it will catch occasional
# real mail. So dont $SPAM_NULL_NO_RCVSTORE it, just file it by category,
# & quickly glance at senders before mousing list to delete.

:0 Bw
* : host not found
| $RCVSTORE +error/no_host

:0 Bw
* reason: 554 Quota violation for
| $RCVSTORE +error/quota

:0 Bw
* ^\<\<\< 550 Recipient Rejected: Excessive resource consumption
#	brackets.c	>>>
| $RCVSTORE +error/quota

:0 Bw
* This account is over quota\.
| $RCVSTORE +error/quota

:0 Bw
* delivered because they are not accepting mail with attachments or embedded
| $RCVSTORE +error/attachments

:0 Bw
* Filter 0 has been configured to reject mail
| $RCVSTORE +error/filter

:0 Bw
* MX list for (berklix|bsdpie|geoffharries|surfacevision|the-phoney-photon)\.(com|de|eu|net|org|uk) points back to
| $RCVSTORE +error/mx

:0 Bw
* 554 5\.3\.5 Local configuration error
| $RCVSTORE +error/local_config

:0 Hw
* ^Subject:\.Returned mail: User unknown
	{
	:0 Hw
	* ^From: postoffice@((webmail|land|slim|js)\.|)(berklix|bsdpie|geoffharries|surfacevision|the-phoney-photon)\.(com|de|eu|net|org|uk)
	| $RCVSTORE +error/no_user
	:0 Bw
	* http://
	* !http://((www|webmail)\.|)(berklix|bsdpie|geoffharries|surfacevision|the-phoney-photon)\.(com|de|eu|net|org|uk)
	# This http also caught a bounced dead address return from
	# an announcement of a bar we were going to.
	# Hence I added a rule before.
	$SPAM_NO_USER
	:0 w
	| $RCVSTORE +error/unknown
	}

:0 Hw
# Subject: Warning: could not send message for past 4 hours
* ^Subject: Warning: could not send message for
| $RCVSTORE +error/warning

	# cant be used as matches ((webmail|land|slim|js)\.|)(berklix|bsdpie|geoffharries|surfacevision|the-phoney-photon)\.(com|de|eu|net|org|uk) status mail:
	# (Deferred: Connection refused by mx1.	)
	# :0 Bw
	# * Deferred: Connection refused by
	# | $RCVSTORE +error/refused

:0 Bw
* Sorry, this server is configured to refuse this sort of mail
| $RCVSTORE +error/refused

:0 Hw
* ^Subject:\.Returned mail: warning: cannot send message for
| $RCVSTORE +error/returned

:0 Hw
* ^From:\.MAILER-DAEMON
| $RCVSTORE +error/mailer

:0 Hw
* ^Subject:.*Returned mail: No recipient addresses found in header
| $RCVSTORE +error/no_recipient

:0 Hw
* ^Subject:.*ping-dummy
| $RCVSTORE +error/ping

:0 Hw
* ^From:.*Mail Delivery Subsystem \<MAILER-DAEMON@
#	brackets.c	>
	# The local gate claims to be @berklix.co
	{
	:0 Bw
	* The following addresses had permanent fatal errors
		{
		:0 Bw
		* ^Content-Type: text/html
		$SWITCH_NULL_NO_RCVSTORE

		:0 Bw
		* ^Content-Type: application/octet-stream
		$SWITCH_NULL_NO_RCVSTORE

		:0 Bw
		* http://
		* !http://((www|webmail)\.|)(berklix|bsdpie|geoffharries|surfacevision|the-phoney-photon)\.(com|de|eu|net|org|uk)
		$SWITCH_NULL_NO_RCVSTORE

		:0 Bw
		* ^Return-Path: <freebsd-[a-z]+bounces-[0-9]+-jhs-list=berklix.org@FreeBSD.org>
		| $RCVSTORE +error/bounce/freebsd
		}
	:0 Bw
	* ^[a-z]+\.\.\. Deferred: Connection refused by \[127\.0\.0\.1\]
	* Reporting\-MTA: dns; [a-z]+\.js.berklix.net
	# sendmail off on local internal host, maybe during reconfig
	| $RCVSTORE +error/bounce/local
	:0 Bw
	* ^ping: sendto: No buffer space available
	# DSL disconnected overnight.
	| $RCVSTORE +error/bounce/off_line

	:0 Bw
	# Catch out of service hostname
	# note I Never quote individual host names to anyone,
	# thus these are all spammer, so discard anyone masquerading as an address that bounces
	* @(bim|bsd|flat|temp|tower)\.(berklix|bsdpie|geoffharries|surfacevision|the-phoney-photon)\.(com|de|eu|net|org|uk)
	* User unknown
	* Operation timed out with .*\.berklix
	| $RCVSTORE +error/bounce/host_retired

	:0 w
	# Let rest fall through.
	| $RCVSTORE +error/bounce/other
	}

:0 Hw
* ^From: freebsd-[a-z]+\+owner@FreeBSD.org
	{
	:0 Bw
	* ^Hi, this is the Mlmmj program managing the <freebsd-[a-z]+@FreeBSD.org>
	* ^mailing list.
	* ^Some messages to you could not be delivered. If you're seeing this
	* ^message it means things are back to normal, and it's merely for your
	* ^information.
	* ^Here is the list of the bounced messages:
	| $RCVSTORE +error/bounce/freebsd
	}

:0 Hw
* ^From: .+\+help@FreeBSD.org
	{
	:0 Bw
	* ^Hi, this is the Mlmmj program managing the <.+@FreeBSD.org> mailing list.
	| $RCVSTORE +error/bounce/mlmmj
	}

:0 Bw
* The last bounce received from you was dated
| $RCVSTORE +error/mailman-bounce
	# What one gets when one has been suspended prior to deletion

:0 Bw
# Captures mis-typed errors sent from Holz to eg impossible@uk28
* Reporting-MTA: dns; ((webmail|land|slim|js)\.|)(berklix|bsdpie|geoffharries|surfacevision|the-phoney-photon)\.(com|de|eu|net|org|uk)
| $RCVSTORE +error/dns

:0 Hw
	* ^From: Cron Daemon \<jhs@berklix.com\>
	* ^Message-Id: \<[0-9]+\..+@(lapr|dell).no.berklix.net\>
	* ^Subject: Cron \<jhs@(lapr|dell)\> /usr/local/bin/fetchmail
	* ^To: jhs@berklix.com
	{
	:0 Bw
	* ^fetchmail: couldn\'t find canonical DNS name of pop\.1and1\.co\.uk \(pop\.1and1\.co\.uk\): Name does not resolve
	# brackets.c matcher: \'t
	* ^fetchmail: Query status=11 \(DNS\)
	# | $RCVSTORE +error/fetchmail
	/dev/null
	}

:0 Bw
# JJLATER likely would FAIL	* ^\<\<\< 550 5\.2\.1 \<[[:print:]]+@[[:print:]]+\.\.\. Mailbox disabled for this recipient
#	brackets.c	>>>>
* ^\<\<\< 550 5\.2\.1 \<[a-z0-9\-]+@[a-z0-9\-]+\.\.\. Mailbox disabled for this recipient
#	brackets.c	>>>>
$SPAM_USER_SUSPENDED

:0 Bw
* ^\<\<\< 554 Recipient Rejected: Not accepting mail for this account : Account Inactive
#	brackets.c	>>>
$SPAM_USER_SUSPENDED

:0 Bw
* ^554 5\.0\.0 Service unavailable
$SPAM_NULL_NO_ACCESS

:0 Bw
* ^\<\<\< 550 5\.7\.1 Access denied
#	brackets.c	>>>
$SPAM_NULL_NO_ACCESS

:0 Bw
# brackets.c: \'
* ^\<\<\< 553 sorry, that domain isn\'t in my list of allowed rcpthosts \(#5\.7\.1\)
#	brackets.c	>>>
	# The # in the line above does not need to be delimited.
$SPAM_NULL_NO_ACCESS

:0 Bw
* ^Unable to Deliver to the following recipient\(s\)\.
* ^User
* does not exist on system
$SPAM_NO_USER

:0 Bw
* ^Sorry, no mailbox here by that name\. \(#5\.1\.1\)
	# The # in the line above does not need to be delimited.
$SPAM_NO_USER

:0 Bw
* ^\<\<\< 550 Invalid recipient: \<
#	brackets.c	>>>>
$SPAM_NO_USER

:0 Bw
* Failed; 5\.1\.1 \(bad destination mailbox address\)
$SPAM_NO_USER

:0 Bw
* ^\<\<\< 554 Sorry, no mailbox here by that name\. e#5\.1\.1
#	brackets.c	>>>
	# The # in the line above does not need to be delimited.
$SPAM_NO_USER

:0 Bw
* ^Sorry, no mailbox here by that name\. vpopmail \(#5\.1\.1\)
	# The # in the line above does not need to be delimited.
$SPAM_NO_USER

:0 Bw
# JJLATER likely would FAIL:	* ^\<\<\< 550 unknown user \<[[:print:]]
#	brackets.c	>>>>
* ^\<\<\< 550 unknown user \<[a-z0-9\-]+
#	brackets.c	>>>>
$SPAM_NO_USER

:0 Bw
* did not reach the following recipient
* Unknown Recipient
* The recipient name is not recognized
$SPAM_NO_USER

:0 Bw
* ^\<\<\< 550 5\.1\.1 unknown or illegal alias:
#	brackets.c	>>>
$SPAM_NO_USER

:0 Bw
* ^\<\<\< 550 Recipient Rejected: This user does not have an account here
#	brackets.c	>>>
$SPAM_NO_USER

:0 Bw
# JJLATER likely would FAIL:	* ^\<\<\< 550 [[:print:]]+@[[:print:]]+ unknown user account
#	brackets.c	>>>
* ^\<\<\< 550 [a-z0-9\-]+@[a-z0-9\-]+ unknown user account
#	brackets.c	>>>
$SPAM_NO_USER

:0 Bw
# JJLATER likely would FAIL * ^\<\<\< 550 \<\[[:print:]]+@[[:print:]]+\>: User unknown
#	brackets.c	>>>
* ^\<\<\< 550 \<[a-z0-9\-]+@[a-z0-9\-]+>: User unknown
#	brackets.c	>>>
	{
	:0 Bw
	* http://
	* !http://((www|webmail)\.|)(berklix|bsdpie|geoffharries|surfacevision|the-phoney-photon)\.(com|de|eu|net|org|uk)
	$SPAM_NO_USER
	:0 w
	| $RCVSTORE +error/unknown
	}

:0 Bw
# JJLATER likely would FAIL:	* ^\<\<\< 550 5\.1\.1 \<[[:print:]]+@[[:print:]]+\>\.\.\. User unknown
#	brackets.c	>>>
* ^\<\<\< 550 5\.1\.1 \<[a-z0-9\-]+@[a-z0-9\-]+>\.\.\. User unknown
#	brackets.c	>>>
	{
	:0 Bw
	* http://
	* !http://((www|webmail)\.|)(berklix|bsdpie|geoffharries|surfacevision|the-phoney-photon)\.(com|de|eu|net|org|uk)
	$SPAM_NO_USER
	:0 w
	| $RCVSTORE +error/unknown
	}

:0 Bw
# JJLATER likel would FAIL:	* ^\<\<\< 550 Invalid recipient \<[[:print:]]+@[[:print:]]+\>
#	brackets.c	>>>
* ^\<\<\< 550 Invalid recipient \<[a-z0-9\-]+@[a-z0-9\-]+\>
#	brackets.c	>>>
$SPAM_NO_USER

:0 Bw
* Status: 5\.1\.1 \(bad destination mailbox address\)
$SPAM_NO_USER

:0 Bw
* ^\<\<\< 550 Requested action not taken: mailbox unavailable
#	brackets.c	>>>
$SPAM_NO_USER

:0 Bw
* ^\<\<\< 503 No valid recipients specified
#	brackets.c	>>>
$SPAM_NO_USER

:0 Bw
# brackets.c: \'
* ^\<\<\< 554 delivery error: dd This user doesn\'t have a [[:alpha:]]+ account
#	brackets.c	>>>
$SPAM_NO_USER

:0 Bw
* is not a valid user
$SPAM_NO_USER

:0 Bw
* is not a valid mailbox
$SPAM_NO_USER

:0 Bw
* The name was not found at the remote site\. Check that
$SPAM_NO_USER

:0 Bw
* 550 MAILBOX NOT FOUND
$SPAM_NO_USER

:0 Bw
* Requested action not taken: mailbox unavailable
$SPAM_NO_USER

:0 Bw
* This account has been disabled
$SPAM_NO_USER

:0 HBw
* lpf_berklix(|_test) Error, unrecognised format
| $RCVSTORE +error/lpf_berklix

:0 H
* ^From: Mail Delivery Subsystem <MAILER-DAEMON>
* ^(To|Cc): <jhs@(lapr|dell).(no|xx).berklix.net>
* ^Subject: Warning: could not send message for past 4 hours
	{
	:0 B
	# * freebsd-ctm-svn-pipe@ctmt... Deferred: Name server: ctmt.(no|xx).berklix.net.: host name lookup failure
	* ctmt.(no|xx).berklix.net.: host name lookup failure
	| $RCVSTORE +error/no_host
	}

:0 H
* ^From: Mailnull <mailnull@berklix.com>
* ^To: freebsd-ctm-.+-notify@berklix.com
	{
	:0 B
	* ^Skipping applying to a tree
	# Skipping applying to a tree as deltas for src-12 need to be able to create symbolic links
	| $RCVSTORE +error/warning
	}

:0 Hw
* ^From: Cron Daemon <jhs@berklix.com>
* ^Message-Id: <[0-9]+..+@(lapr|dell).no.berklix.net>
* ^Subject: Cron <jhs@(lapr|dell)> /usr/local/bin/fetchmail
* ^To: jhs@berklix.com
	{
	:0 Bw
	* ^[0-9]+ message(|s) for jhs@uk28.com at pop.1and1.co.uk \([0-9]+ octets\).
	* ^reading message jhs@uk28.com@pop.1and1.co.uk:[0-9]+ of [0-9]+ \([0-9]+ octets\) flushed
	# | $RCVSTORE +error/fetchmail
	/dev/null
	}
