Daniel Bareiro wrote:
Hi all!

I am trying to configure my home Postfix so that the outgoing mail to an
external email from a user of my LAN are rewritten to a valid account of
mail, which would be to me especially useful if I would want to send
some type of notification to a external mail by means of a bash script.

why not make the script send the message with
        sendmail -f $sender ...
?

the best way to solve a problem is to not create it in the first place.

I was trying of several ways but until the moment I did not obtain that
it worked to me.
In /etc/postfix/sender_canonical I tried with:

@*.myintra.net  [EMAIL PROTECTED]

Having in /etc/postfix/main.cf:

sender_canonical_maps = regexp:/etc/postfix/sender_canonical

do not use sender_canonical_maps. use canonical_maps instead (rewrite should be "symmetrical").

But in your case, you probably want smtp_generic_maps.


What syntax would have to use?


you need to learn regexp. @* means one or more '@'. and '.' means any character.

to rewrite any [EMAIL PROTECTED] (shell style expression), use
/@.*\.myintra\.net$/            [EMAIL PROTECTED]

you should also read
        http://www.postfix.org/SOHO_README.html


Reply via email to