On 2010-12-18 01:06, FlyingGuy wrote:
> Yeah not thinking of trying to remove it. So I figured out, at least I
> think, through yast to tell it the outgoing server and the credentials
> and that seems to be working. Is there a way to tell it that ANY email
> leaving this machine will come from info@domain.com?
Notice that domain.com is a registered domain, you can not use it unless it
is yours >:-)
> When a php script is running e-mail the user says WWW Deamon
> Apache<wwwrun@domain.com or when I am loged in as root, it obvisouly
> comes from root. So is there an OUTGOING alias file or mapping of some
> kind that will work facilitate my goal?
You can replace any address with another, yes.
Have a look in the directory /etc/postfix, you will see several files with
documentation.
canonical
Typically, one would use the canonical(5) table to replace
login names by Firstname.Lastname, or to clean up
addresses produced by legacy mail systems.
generic
The optional generic(5) table specifies an address mapping
that applies when mail is delivered. This is the opposite
of canonical(5) mapping, which applies when mail is
received.
Typically, one would use the generic(5) table on a system
that does not have a valid Internet domain name and that
uses something like localdomain.local instead. The
generic(5) table is then used by the smtp(8) client to
transform local mail addresses into valid Internet mail
addresses when mail has to be sent across the Internet.
See the EXAMPLE section at the end of this document.
So, this would be the one. The examples say:
so you would use:
root info@yourclient.com
More.
sender_canonical
The sender_canonical_maps parameter specifies optional address
mapping lookup tables for envelope and header SENDER addresses.
For example, you want to rewrite the SENDER address user@ugly.domain
to user@pretty.domain, while still being able to send mail to the
See man 5 canonical, /etc/postfix/canonical or
/etc/postfix/sample-canonical.cf for more details
virtual
The optional virtual(5) alias table rewrites recipient
addresses for all local, all virtual, and all remote mail
destinations. This is unlike the aliases(5) table which
is used only for local(8) delivery. Virtual aliasing is
recursive, and is implemented by the Postfix cleanup(8)
daemon before mail is queued.
…
Virtual aliasing is applied only to recipient envelope
addresses, and does not affect message headers. Use
canonical(5) mapping to rewrite header and envelope
addresses in general.
examples:
I use it to redirect my external, real, addresses, to internal login names:
user@yourisp.com user
Then, the little known but very usefull “sender_relayhost”, with entries like:
user@yourisp.com [smtp.yourisp.com]
which combined with some config options, is used to send your email to an
external ISP. You could use this one.
Then, I have a Makefile:
all: access.db relay_ccerts.db sasl_passwd.db transport.db
canonical.db relocated.db sender_canonical.db virtual.db
ehlo_discard_words.db sender_relayhost.db generic.db
transport.db: transport
postmap transport
sender_relayhost.db: sender_relayhost
postmap sender_relayhost
virtual.db: virtual
postmap virtual
… etc
So that after changing any one of the map files, I redo the index with one
“make” command.
–
Cheers / Saludos,
Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)