3 messages in net.sourceforge.lists.courier-users[courier-users] Working around some "...
FromSent OnAttachments
Alessandro VeselySep 17, 2006 5:00 am 
Sam VarshavchikSep 17, 2006 7:03 am 
Alessandro VeselySep 17, 2006 10:36 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[courier-users] Working around some "already have my Delivered-To:" casesActions...
From:Alessandro Vesely (ves@tana.it)
Date:Sep 17, 2006 5:00:06 am
List:net.sourceforge.lists.courier-users

Hi all,

the courierdeliver local module checks if the message already contains a "Delivered-To" header with the same recipient that it is about to deliver to. Is that needed?

That feature requires a wrapper around sendmail for resending messages from command line. I use sed with something like: 1,/^$/{ /^Delivered-To:/d }

Next, I have some users whose exchange server sometimes resends messages to addresses like "mspop3connector.original@address". That's the result of a temporary failure on their windows server, and is caught by a .courier-default script in aliasdir: A dynamic delivery filter (||) outputs the correct recipient stripping off the "mspop3connector." prefix.

However, sometimes that works, sometimes it bounces saying "Mail loop - already have my Delivered-To: header." Why? Because the Delivered-To check is case sensitive and in the filter I am blindly converting the recipient to lowercase. Thus, it is only working if the recipient wasn't lowercase already. In facts, I tested I can get a message with both

Delivered-To: al@tana.it, and Delivered-To: AL@tana.it

Hence, I should be able to allow messages to loop twice by reversing the case of the recipient after stripping the prefix. The check will fire if the exchange server fails twice on the same message, when case reversing will produce the original name.

That looks quite byzantine to me. Any thought?

Other packages (Qmail?) check the Delivered-To headers. What is it needed for? There is already a check that drops messages after a given number of Received headers have been reached. Therefore, it seems that the Delivered-To check could be omitted...