Hello,
I have been trying to find a way to create a Postfix based TMDA relay
as an alternative to the qmail based relay described in FAQ 3.8. I
have a working system, but there are a few glitches that I haven't
quite figured out yet. I am presenting what I have found here so that
some of you Postfix guru's can tell me what I am doing wrong.
The scenario is the same as the one in the FAQ for qmail: mail will
come in from the Internet for users at example.com, the relay will
handle all TMDA confirmations, then upon success forward the mail to
$USER@xxxxxxxxxxxxxxxxxxxx, which is an internal server. In this case
the name of the relay machine is dell.example.com.
First, I created a new system user "tmda" with a home directory of
/var/spool/tmda. I created all the necessary files and directories
in /var/spool/tmda/.tmda/ and created a .tmda/config file with the
following:
import os
LOGFILE_DEBUG = "/var/spool/tmda/.tmda/debug"
DELIVERY = os.environ['EXTENSION'] + "@exchange.example.com"
MAIL_TRANSFER_AGENT = "postfix"
RECIPIENT_DELIMITER = "+"
The /var/spool/tmda/.forward file contains:
"|/usr/local/tmda/bin/tmda-filter"
I configured Postfix to accept mail for the example.com domains.
Next I created a regexp map for the incoming mail in a file named
/etc/postfix/tmda-incoming that contained the following:
/^(.*)@example\.com/ tmda+${1}
This is used to send incoming messages to the tmda user in the same
style that qmail virtual domains use. I then needed to add a mapping
for outgoing mail sent by TMDA, so that users are asked to confirm to
the correct address. This went in /etc/postfix/tmda-outgoing:
/^tmda\+(.*)@dell\.example\.com/ ${1}@example.com
I added these two files to main.cf using:
sender_canonical_maps = regexp:/etc/postfix/tmda-outgoing
recipient_canonical_maps = regexp:/etc/postfix/tmda-incoming
This configuration works in that messages come through, challenges
work correctly, and messages are forwarded on to the final destination.
There are a couple things that I am having trouble figuring out:
1) The To: field in the message sent to the final destination does
not get rewritten correctly. It should be cwright@xxxxxxxxxxx,
but instead it is written as tmda+cwright@xxxxxxxxxxxxxxxxx
2) The confirm_request.txt template is not seeing (and can't) the
rewritten address, so it is still displaying something like
tmda+cwright+confirm+1051311423.3669.c197d7@xxxxxxxxxxxxxxxx,
instead of cwright+confirm+1051311423.3669.c197d7@xxxxxxxxxxxx
Removing the address from the templates would solve the problem,
but it gives users one less method of confirming.
The issue described in #1 is a little more important, and something
that I think would need to be worked out before anyone could use a
system like this, so I would most appreciate any tips for getting that
to work.
Cory
--
Cory Wright
Stand Blue Technology
http://www.standblue.net/
_____________________________________________
tmda-users mailing list (tmda-users@xxxxxxxx)
http://tmda.net/lists/listinfo/tmda-users
|