On 7/12/2021 11:05 AM, Dan Morton wrote:
I am moving my phpBB website from a shared server to a VPS. phpBB sends notifications to users that originate from d...@mydomain.net, my email account; and that account can be one of those user recipients. This is currently functioning on my shared server, and I am attempting to set it up on my VPS. I have installed postfix for this purpose, but I am a postfix Newbie. I will add that the MX records for d...@mydomain.net point to Google Workspace mail servers, where my email is managed. I did some testing from the command line using postfix sendmail, and got the results further below. I will also add that because my login is "mylogin", I had to employ address rewriting as described here to map the FROM "mylogin" to "dan": https://serverfault.com/questions/147921/forcing-the-from-address-when-postf ix-relays-over-smtp
Forcing all senders to be "dan@mydomain" seems like the wrong solution, but I guess that's ok if it works for you and no one else uses the server. Sometimes when you hold a hammer everything looks like a nail.
And here is the first failure from the mail log when I send from d...@mydomain.net to d...@mydomain.net: Jul 11 13:08:12 myvps postfix/local[300309]: D89F760060:to=< d...@mydomain.net>, relay=local, delay=0.03,delays=0.01/0.01/0/0.01, dsn=5.1.1, status=bounced (unknown user: "dan")
relay=local means postfix thinks this is a local domain, probably because it's listed in mydestination.
User dan does not exist locally, so postfix tries to generate a bounce to the sender dan@, which still doesn't exist. This isn't a loop.
So where should dan@mydomain be delivered? If local, you need to create a user. If it's supposed to go to gmail, either remove mydomain from main.cf:mydestination, or add a transport_maps entry as a hint.
-- Noel Jones