From: "Nigel Allen "prosmart remove>" on
Hi

A client of ours has a requirement for some "auto-archiving" of all
outgoing emails.

We have set up a new extension to Thunderbird that adds a new header to
every outgoing email (think "Customer Number"). Whenever a user presses
"Send" they have to enter a code or number that identifies where the
email is going (No we can't use the recipient's domain - it's not that
simple :(

We want to read the header and CC one of a number of mail accounts,
either the customer's archive or the users personal archive or some
other one - probably by comparing the header values with a text table.

Can I do this directly with sendmail or with procmail?

Any other suggestions (short of taxidermy) gratefully accepted.

Thanks and Regards

Nigel.
From: David F. Skoll on
Nigel Allen wrote:

> A client of ours has a requirement for some "auto-archiving" of all
> outgoing emails.

MIMEDefang can do what you want (http://www.mimedefang.org)

Regards,

David.
From: Grant Taylor on
On 6/30/2008 8:15 PM, Nigel Allen <"prosmart<remove>"@ wrote:
> A client of ours has a requirement for some "auto-archiving" of all
> outgoing emails.

*chuckle*

> We have set up a new extension to Thunderbird that adds a new header to
> every outgoing email (think "Customer Number"). Whenever a user presses
> "Send" they have to enter a code or number that identifies where the
> email is going (No we can't use the recipient's domain - it's not that
> simple :(

Is that extension by chance available for others to use or is it in
house? Just curious and asking.

> We want to read the header and CC one of a number of mail accounts,
> either the customer's archive or the users personal archive or some
> other one - probably by comparing the header values with a text table.

Ok...

> Can I do this directly with sendmail or with procmail?

Well, you can't (easily) do this with Procmail. Procmail is a Local
Delivery Agent (a.k.a. LDA) that receives email from a Mail Transport
Agent (a.k.a. MTA) i.e. Sendmail. There is no (easy) way to use an LDA
in the SMTP delivery process between servers.

Like David Skoll suggested, I'd look at using a milter, probably
MIMEDefang, to conditionally alter the envelope recipients based on the
sender and / or recipient of the message(s) to be archived.

> Any other suggestions (short of taxidermy) gratefully accepted.

For the cases where you may want to send to multiple different archives
(company and personal) I'd suggest that you not add multiple envelope
recipients to the original message. Rather I would add the email
address of a mailing list as an additional recipient. Then use the
mailing list to manage who gets a copy of the message to archive.

Also, I would not directly add the archive email address as a recipient
to the original message's envelope. I'd suggest that you have an
additional account on the system that will blindly accept messages in
and then send them as RFC 822 attachments to the archive address. This
way, if for some reason the archive email address is not able to accept
the message the original envelope sender will not see a bounce. The
bounce would be sent back to the address used to send when the original
message was turned in to an RFC 822 attachment.

> Thanks and Regards

*nod*



Grant. . . .