Hi there, I have a few questions about sender_bcc_maps.

Until recently I have been using these to archive sent mail with a hash table
like this:
us...@mydomain.com      user1_s...@mydomain.com
and some procmail rules took messages sent to user1_s...@mydomain.com and piped
it through gzip into a monthly archive file.  That all works fine.

Recently my needs have become a little more complicated, and I think need
something more like a pcre table instead, just for these new rules.

I want to bcc arch...@mydomain.com all outgoing messages, as messages to this
address will be filing mails in specific project folders.  But to prevent
loops, don't want to copy mails from arch...@mydomain.com, as well as some
other users I'd like to exclude from this.  My attempt at handling this is this
pcre table:

if !/arch...@mydomain.com/
/.*@mydomain.com/       arch...@mydomain.com                                 
endif

/us...@mydomain.com/    user1_s...@mydomain.com
/us...@mydomain.com/    user2_s...@mydomain.com
/us...@mydomain.com/    user3_s...@mydomain.com
and so on.

Some questions about the above.

1.  Could you please confirm that the pattern between the slashes is just the
sender's address that we're trying to match?  At first I tried doing a full
header match like /^From:.*@mydomain.com/ but it didn't seem to be working
correctly.  Not sure if that was my pattern or because it was looking for a
sender with From etc in the address.

2.  Can you recommend a better or more elegant solution to the second part of
the table with the /us...@mydomain.com/ etc?  I tried using something like
this:

/(user1)@mydomain.com/  \1_s...@mydomain.com

but it occurred to me that the variable \1 to the right is probably not
recognised outside the actual pattern within the //.  Correct?

3.  Do you think I'm on the right track?  Mostly in terms of using pcre for the
table.  Wasn't sure whether this or regex would be better?

4.  Any other suggestions/advice?

-- 
Troy Piggins

Reply via email to