Score:0

why am I getting postfix loops back to myself error, BUT, only after I point the subdomain to the server?

cm flag

so I have set up a new web server that is hosted in the cloud. The server is ubuntu, I am currently transferring 1 site (with 2 subdomains) to this new server. I transferred 1 site so far, lets say example.com, to the new server. Since the registrar is still pointing to my home server I have redirected all A records and NS records to my new server. And everything worked, I got the hosting working, database is working properly, postfix is working properly etc. I am able to send emails etc. The other two sites, lets say store.example.com and forum.example.com are still hosted on the old server... for context the only one that receives email in this situation is [email protected] the subdomains do not receive emails currently. And [email protected] is hosted on an external server. this is the only site that has external email hosting. so I set up postfix using a mysql database, there is a mail user for the database, if I add a domain to the database the server knows it needs to accept mail for this domain. example.com, and store.example.com send contact form submissions automatically to [email protected]. Again, the main site that is currently hosted on the new server this works fine, postfix knows it does not need to hand this email off to dovecot, and it sends the email to the server specified in the MX record for example.com and kev gets his email. Great! I was ready to move onto the store, for context the store, hosted on my home server using plesk (moving away from plesk as they corrupted 6 months of data after my credit card expired so I am not going to be using them any longer) now the store.example.com has an MX record though it does not receive mail currently, which points to mail.store.example.com which has an A record for mail.store.example.com pointing to the IP address of the server. Now that all the context is filled out now we are arriving at my issue.

edit with more details:

I did the same thing last night as I did with example.com I pointed the store.example.com's A records and NS Records to the new servers IP address. The store propagated on the web within about a minute, the db is working fine, I go to test the contact form for this subdomain (the contact form automatically sends the email to [email protected]) and it fails saying that status=bounced [email protected] loops back to myself. I thought that's weird... so I go and test the contact form on example.com, then it says the same thing! even though its originating from the site that was working just yesterday. So I go searching, and searching. Some forums said it was your MX record pointing to the main domain, which it is not. it is pointing to mail.store.example.com and the main MX record is pointing to titan email servers. Not that, some people said check if you have masquerade_names in the postfix/main.cf file, I do not, there is no masquerade_names in that file. I have looked at the spf record for the subdomain and it has the A records listed as allowed senders... Ok so it is none of that, now I found some people were saying that it needs to be listed under virtual_alias_domains, there is nothing in that element. and the

virtual_alias_maps=proxy:mysql:/etc/postfix/mysql_virtual_forwardings.cf, mysql:/etc/postfix/mysql_virtual_email2email.cf

but i don't think that really matters as we aren't receiving the email locally. Now where do I need to look... and why when I point the subdomain to the new server does it break both the main domain, and the subdomain. So for now I stopped pointing the subdomain to the new server. after I stopped pointing, the main domain on the new server is able to send emails again, and the old server hosting the subdomain has no issues sending emails either. if someone can tell me where their next step would be to look that would be great.

oh additional note in the main.cf on the new server

mydestination = $myhostname, localhost.$mydomain, localhost

edit 2: I was following a udemy course that has a text file on how to setup postfix and dovecot... just don't think I am allowed to share it here as I am not the creator.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.