[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Postfix rewriting



I have the following working mail setup:

 1. Local postfix deferring all SMTP mail which uses localhost:2300 as a
    relay.  (DN local.net)
 2. A remote postfix that is able to send emails.  (DN remote.net)
 3. A local cronjob that first sets up an SSH forwarding from
    localhost:2300 to remote:25 and calls "sendmail -q" to push push the
    locally queued email.

Now for the actual question.  My local user is called 'foo' my remote
user is called 'bar'.  I use the local /etc/mailname to rewrite outgoing
addresses to foo@remote.net, without it I am not able to relay through
the remote server.  However, since the user 'foo' doesn't exist on the
remote system the logs will report that an unknown user sent emails.
How can I fix that locally?

I tried using "smtp_generic_maps" to rewrite foo@remote.net to
bar@remote.net, but didn't get it to do what I wanted.  (With it in
place 'mailq' still reports foo@remote.net as the sender.)

/M

-- 
Magnus Therning                             (OpenPGP: 0xAB4DFBA4)
magnus@therning.org             Jabber: magnus.therning@gmail.com
http://therning.org/magnus

Software is not manufactured, it is something you write and publish.
Keep Europe free from software patents, we do not want censorship
by patent law on written works.

"The main reception foyer was almost empty but Ford nevertheless
weaved his way through it."

-- Ford making his way out of Milliways whilst under the influence of
   enough alchol to make a rhino sing.

Attachment: pgpPhlittPLT8.pgp
Description: PGP signature


Reply to: