|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
How to relay and rewrite envelope based on header
From: bjoern (bjoern
hoejte.dk)
Date: Mon Feb 02 2004 - 07:14:00 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello.
A little problem i've been wrestling with for some time now.
I have a postfix mail gateway, which needs to deliver mail either through
a relay server, or directly to recipient, based on a header. The header
field being used to determine the relay should be rewritten before being
handed off to the relay.
Setup:
------
mail.domain.dk
Postfix mail gateway used for normal mails.
I have full control over this machine
sweeper.domain.dk
Mail server used for encrypting outgoing mails
I have NO control over this machine
All machines on the internal network uses mail.domain.dk as gateway, which
is excellent as long as we don't need to encrypt the mails. When we need
to encrypt the mails, they should be relayed through the sweeper system.
There are now two (2) scenarios for how a mail should go through the
system when coming from e.g. the machine mach1.intdomain.dk. In the
examples, I have assumed that the user part of the recipient address is
used to indicate the way it should travel.
Example 1: Sending an unencrypted mail
A mail is sent to user
extdomain.dk. This mail is delivered to
mail.domain.dk, which relays it to the reciient.
Example 2: Sending an encrypted mail
A mail is sent to sweep.user
extdomain.dk. This mail is delivered to
mail.domain.dk, who strips the "sweep." part of the username, and then
delivers the mail to sweeper.domain.dk. sweeper.domain.dk encrypts the
mail and sends it to the recipient.
It could be the domain part of the recipient, or the sender address, or
the subject that could be used to indicate if the mail should be relayed
through the sweeper, but common for all is that the sweep indicator needs
to be stripped before being handed to the sweeper.
The question:
-------------
Is it possible to set a relay based on a header field in the mail,
rewriting the field in the process?
By the way - HOW if the answer is in the affirmative?
Phew... I hope it is reasonably clear what I want to do...
Regards
Bjoern Bille Hoejte
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]