I've tried your suggestion.

SERVER1 is still trying to deliver test email locally rather than forward to SERVER2:

<bugzi...@mylandomain.com>: host
    mx0.myLANdomain.com[/var/run/cyrus/socket/lmtp] said: 550-Mailbox
unknown. Either there is no mailbox associated with this 550-name or you do not have authorization to see it. 550 5.1.1 User unknown (in reply to
    RCPT TO command)

Adam


On 28/05/2024 14:28, Wietse Venema via Postfix-users wrote:
Adam Weremczuk via Postfix-users:
Sorry, I'm still struggling to get anywhere with that.

Just to recap what I'm trying to achieve:

SERVER1 is a fully blown Postfix+Cyrus stack operating over the internet
and serving multiple domains.

SERVER2 is a small VM on a local LAN (same LAN as SERVER1) that runs
Bugzilla.

Both SERVERS use the same LAN domain myLANdomain.com.

You can have multiple servers with the same domain name, as long
as on each server also receives mail for its own hostname
(in your case: server1.myLANdomain.com and server2.myLANdomain.com,
respectively).

server1 :

     /etc/postfix/main.cf:
        # Execute "postfix reload" after editing this file
        mydestination = localhost, myLANdomain.com, server1.myLANdomain.com
         virtual_alias_maps = hash:/etc/postfix/virtual

     /etc/postfix/virtual:
        # Execute "postmap hash:/etc/postfix/virtual" after editing
        # this file
        bugzi...@mylandomain.com        bugzi...@server2.mylandomain.com

server2:

     Here is the bugzilla account with ~bugzilla/.forward

     /etc/postfix/main.cf
        # Execute "postfix reload" after editing this file
        mydestination = localhost, myLANdomain.com, server2.myLANdomain.com

I've installed Postfix on SERVER2 and configured it as below:

Sorry, I know only Postfix settings, not thrd-prty control panels.

        Wietse

setting synchronous mail queue updates: false
setting myorigin
setting destinations: server2.myLANdomain.com, server2, localhost
setting relayhost:
setting mynetworks: 127.0.0.0/8 192.168.0.0/24
setting mailbox_size_limit: 0
setting recipient_delimiter: +
setting inet_interfaces: all
setting inet_protocols: ipv4

Now, all I want to achieve is to forward all emails to
bugzi...@mypublicdomain.com to a local user (unique name) bugzilla2
created on SERVER2.

Whatever email is delivered to bugzilla2 on SERVER2 locally should be
fed to the command defined in ~bugzilla2/.forward file

So my first objective, I guess, would be to allow that local user to
receive emails from outside somehow and be treated as local emails.

I feel like I'm missing something fundamental here...

Adam


On 21/05/2024 12:00, Wietse Venema via Postfix-users wrote:
Adam Weremczuk via Postfix-users:
Thank you Victor.

What's the easiest way to change:

bugzilla@mailserver:~$ cat ~/.forward
"|/vol/localhome/bugzilla/site/live/email_in.pl -vvv 2>/tmp/bz_emailin.log"

to something like:

remoteser...@mydomain.com:/vol/localhome/bugzilla/site/live/email_in.pl
-vvv 2>/tmp/bz_emailin.log

There are multiple ways:

1 On the milserver achine:

    In ~bugzilla/.forward
      bugzilla@remoteser...@mydomain.com

    On the remoteserver, the ~bugzilla/.forward file with email_in.pl.

2) On the mailserver achine:

    In /etc/aliases:
        bugzilla: bugzilla@remoteser...@mydomain.com

    run the "newaliases" command after edirting the file.

    On the remoteserver, the ~bugzilla/.forward file with email_in.pl.

        Wietse
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to