Marc SCHAEFER wrote:
Hi,
I would like to configure a bizarre setup like this:
if the mail is sent as usual, do not use a smart-host, just
deliver (that is easy and works)
if the recipient domain ends in ".through-smart-host", it should
deliver via a SMTP relay (smart-host). Of course, just before
delivering, it should remove the ".through-smart-host" suffix.
it is indeed bizarre.
An alternative is to change the sender instead. this way you can use
sender dependent relay hosts.
Something like this could be interesting:
s/^(.+)\.through-smart-host$/$1/ smtp:[smart-host]
However I didn't figure out how to implement this using pcre_table(1).
two tasks, two actions: use transport_maps to force the route to the
smart host, and use smtp_generic_maps to do the rewrite.
If all fails, I could create a new UNIX mailer in master.cf and route
through it, and make it deliver the mail (e.g. through a nullmailer
or something) after changing the destination with a Perl script,
but that would be complicated, slow and clumsy.
Does anyone have any suggestion ? (basically, what I want is the
obsolete mixed UUCP/domain routing, such as [EMAIL PROTECTED],
but that doesn't usually work anymore nowadays)
it doesn't work "in the internet", but npthing prevents you from using
it locally. some people use [EMAIL PROTECTED]@domain2 notation.
Thank you.
PS: another idea could be to have a specific header or subject to do the
routing.