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:
[email protected]      [email protected]
and some procmail rules took messages sent to [email protected] 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 [email protected] 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 [email protected], as well as some
other users I'd like to exclude from this.  My attempt at handling this is this
pcre table:

if !/[email protected]/
/.*@mydomain.com/       [email protected]                                 
endif

/[email protected]/    [email protected]
/[email protected]/    [email protected]
/[email protected]/    [email protected]
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 /[email protected]/ etc?  I tried using something like
this:

/(user1)@mydomain.com/  \[email protected]

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