We've been testing QMail as a replacement mail hub for our old Sendmail
system, but have come against a few brick walls to do with supporting legacy
mainframe mail systems.
  We need to be able to rewrite the address of a recipient while sending to
another host-name.  Adding DNS MX/CNAME records is no good because since the
SMTP process on the mainframes are so cumbersome, in some critical cases we
have to send through one host to another and allow the Mainframe system to
deliver through its MTA to the other host.  This other host also has a
regular SMTP connection, and it's no good having a dedicated Mainframe for
mail.

  With sendmail, we use a rule like:

        R$*<@$*.mf>$*                  $#tcpld$@<host1>$:$1@$2.mf
        R$*<@$*.mf-alerts>$*           $#tcpld$@<host2>$:$1@$2.mf
        R$*<@$*.mf-alerts2>$*          $#tcpld$@<host3>$:$1@$2.mf

...which sets the specific host, and rewrites the address into one that the
Mainframe can recognise.  I worked out a 'hack' using virtual domains ->
alias files and piping the message to qmail-remote, but then had to write a
script to turn qmail-remote's output into error codes:

        |qmail-remote <host2> "$SENDER" `/usr/local/share/substdom -d -m
"$DEFAULT@$HOST" -f "mf-alerts" -t "mf"` | qmail-remote-exit

(where substdom is a simple address re-writing sed script and
qmail-remote-exit turns qmail-remote's output into error codes)

  I'm sure I'm doing it the hard way, but I'm a bit stumped as to where to
go.

  And does anyone know of any utilities for qmail that can do batched SMTP,
similarly to serialmail, but with the same host-redirection/address
rewriting capabilities as above -- even if as a plug-in?


--
Will Robertson.  Unix SysAdmin.  (mailto:[EMAIL PROTECTED])
Data General (Europe)

        I don't suffer from stress... I'm a carrier

Reply via email to