Mandi,
denis
> i want to rewrite the sender of an email when the recipient
> is a particular address that aren't one of my virtual users...
> what can i do to do this?
Postfix does not support such conditional rewriting, and implementing
this would require multiple Postfix instances. What problem are you
trying to solve?
--
Magnus Bäck
mag...@dsek.lth.se
> Postfix does not support such conditional rewriting, and implementing
> this would require multiple Postfix instances. What problem are you
> trying to solve?
i can send an email to: $my_mobile_number@$my_mobile_operator
which its content is sent to my mobile telephone trough an SMS.
but my mobile operator accept mail coming only from
my email address. and so i've to rewrite the sender that can be root,
or any other user, to my email address and then send the email to that
address....
--
denis
--
Mandi,
denis
Deliver messages to a custom script that submits a new message with
the correct sender (and any other modifications that might be needed).
A local alias would probably be the easiest way to implement this:
denismobile: |/path/to/script
If you want to keep the recipient address at
$my_mobile_number@$my_mobile_operator, you can use a virtual alias
to rewrite that recipient address to the local alias:
$my_mobile_number@$my_mobile_operator denismobile@localhost
There is a lesson here: Always give the full picture by explaining
what problem you want solved rather than requesting help with a narrow
problem that might not make sense.
--
Magnus Bäck
mag...@dsek.lth.se
> There is a lesson here: Always give the full picture by explaining
> what problem you want solved rather than requesting help with a narrow
> problem that might not make sense.
thanks for the solutions and thanks for this phrases!!!
you're right!
another question: can you indicate me a script that
can i modify for that purpose, without that i wirte a new one?
thank you
ps: it's possible to concatenate instructions in a canonical (in this way):
denismobile: |/myscript | $my_mobile_number@_operator
or my script have to send itself new mail?
thanks again and sorry for my poor english
> On Friday 19 August 2005 12:17, Magnus Bäck wrote:
>
> > There is a lesson here: Always give the full picture by explaining
> > what problem you want solved rather than requesting help with a
> > narrow problem that might not make sense.
>
> thanks for the solutions and thanks for this phrases!!!
> you're right!
> another question: can you indicate me a script that
> can i modify for that purpose, without that i wirte a new one?
> thank you
If you only need to change the envelope sender, you can just pipe the
message to sendmail(1) and specify a new envelope sender. You don't
even need a separate script for this:
denismobile: "|/usr/sbin/sendmail -f what...@example.com 12345@operator"
(Obviously replace the sendmail(1) with your actual path.)
> ps: it's possible to concatenate instructions in a canonical (in this way):
> denismobile: |/myscript | $my_mobile_number@_operator
> or my script have to send itself new mail?
You need to submit a new message.
--
Magnus Bäck
mag...@dsek.lth.se
1) Configure a transport map entry for the recipient domain
that gives the mail to a non-standard instance of the
Postfix SMTP client.
2) Use the generic_maps feature of Postfix 2.2 or later to
replace your sender by another one.
/etc/postfix/main.cf:
transport_maps=hash:/etc/postfix/transport
/etc/postfix/transport:
example.com mysmtp:
/etc/postfix/master.cf:
mysmtp unix - - n - - smtp
-o smtp_generic_maps=hash:/etc/postfix/generic
/etc/postfix/generic:
m...@mydomain.com h...@example.com
http://www.postfix.org/transport.5.html
http://www.postfix.org/master.5.html
http://www.postfix.org/generic.5.html
http://www.postfix.org/ADDRESS_REWRITING_README.html
Wietse