On 2015-08-14 12:13, DTNX Postmaster wrote:
On 14 Aug 2015, at 11:22, Coert <lgro...@vlymskerp.net> wrote:

Hello all,

I have a setup with about 10 FreeBSD and Linux VMs. (all running postfix)

One of the VMs is the primary mail host.
All the other VMs I configured to use the primary as relayhost
And I aliased root in /etc/aliases on all VMs to an address on the primary.

So far all the mail routing is working correctly, except that the from
addresses are: r...@fully.qualified.name.of.vm
So any bounces or replies from the primary mail server cannot be
delivered, because the VMs dont accept mail from 'outside'.

Can I change the from address on each VM to something like:
rootVMname@myworking.domain? so that the domain name stays the same?
If so, where do I change this?

Or should I create a domain on the primary mail server for each VMs
fully.qualified.name.of.vm and alias those to the same address they
currently send to?

What we do for this is the following, set in 'main.cf';

smtp_generic_maps = static:account+hostn...@example.com

This maps all local addresses to a single account on the relay host;
'account' is the actual mailbox, 'hostname' the hostname of the VM that
sends the message, and 'example.com' a local domain on the destination
server.

You only need one account this way, while still able to sort messages
based on the VM they originate from, and all bounces, replies etc. will
be sent to 'account', on the destination server, instead of returning
to a box that does not accept SMTP connections.

Works very well for 'null clients'; SMTP clients that only ever send
mail, have no local mailboxes, and so on.

Mvg,
Joni
Thanks Joni!

This solved my problem.

Kind regards, Coert

Reply via email to