Hi,
I'm using pattern matching to identify mail I receive from mailing lists and
auto-file into IMAP folders named after the list name, e.g. courier-maildrop.
I was just matching the list name, but I've run into a case where I'm subscribed
to two lists with the same name but at different domains. So, I'm going to start
naming the storing the whole list address inc. domain name, e.g.
cour...@lists.sourceforge.net.
As "." is the IMAP folder separator I need to escape the "." in the domain part
of the list address before using it as the folder name.
I have tried the following in my mailfilter file:
LIST_FOLDER_NAME=`${ECHO} ${MATCH2}${MATCH3}|${SED} 's/\./\\\./g'`
${MATCH2} is the listname and ${MATCH3} is the domain name prefixed by "@".
I've tried this at the command prompt and it works fine, e.g.:
# echo x.y.z | sed 's/\./\\\./g'
x\.y\.z
However, when executed under maildrop the slashes either do not make it into the
variable or are stripped when I write it to the log file - I'm not sure which.
For example, I get this in my logs:
Matched mailing list squid-users
All Matches:List-Post: <mailto:|squid-users|@squid-cache.org
LIST_FOLDER_NAME squi...@squid-cache.org
This should read
LIST_FOLDER_NAME squid-users@squid-cache\.org
Am I running into a maildrop feature? Any ideas how to fix this?
R.