[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

pricmail recipe to detect fetchmailed addrs?



(fetchmailed? i decree it to be a verb today.)

i've got some old addresses
	will@pinncomp.net
	trillich@speedex.net
	trillich@usa.net
and i use fetchmail to yank email from those into my active
	will@serensoft.com
account.

i'd like to phase out the older accounts...

what kind of procmail recipe do i need to figure out
the actual destination address of an email, so i can
gently inform senders that i've got a new address?

this doesn't quite get it--


:0 hc
* ^TO_.*@\/(pinncomp|speedex)
{
	OLD=$MATCH

	# track who got reminded
	:0 hwc:old_addrs.lock
	| egrep '^Date:|^From:' >> to_$OLD

	# remind about new address
	:0 c
	* ! ^X-Loop: will@serensoft.com
	* ^TO_ \/[a-zA-Z0-9]+@(pinncomp|speedex)
	| (formail -r -I"Precedence: junk" -A"X-Loop: will@serensoft.com" ; \
		echo "You sent email to an old email address '$MATCH';" ; \
		echo "It's been forwarded to the new address 'will@serensoft.com'." ; \
		echo "Please use 'will@serensoft.com' in the future. Thanks." ) | $SENDMAIL -t
}

one isp adds a X-RCPT-TO header, but the other doesn't...

suggestions solicited.



Reply to: