On Sunday, 27 July 2008 17:29:41 +0200, mouss wrote: Hi mouss.
>> 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 ... > ? It's a good possibility about which I had not thought. Thanks for this tip. >> 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"). Mmmm... and, in case of using this table, how it would be the writing in the inverse sense considering that of a side we are using generic domains directions? > 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 Great! It works! But in the Postfix logs I don't see that sender is rewritten; the outgoing mail has the user in the local domain. But even so the relay server take it like a valid user. How it makes the rewriting? Thanks for your reply. Regards, Daniel -- Daniel Bareiro - GNU/Linux registered user #188.598 Proudly running Debian GNU/Linux with uptime: 18:21:36 up 1 day, 19:37, 13 users, load average: 0.05, 0.03, 0.00
signature.asc
Description: Digital signature