All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Need help setting up my mailserver properly - getting marked as spam
Hi all,
My mailserver / DNS records are driving me crazy
I have a mailserver setup like mail.domainA.com and mx2.domainA.com.
All mails that are like [email protected] (TLD same as mailserver) are delivered properly and not marked as spam.
I have set SPF records accordingly and everything is working fine.
Of course I have also set a PTR record for the mailserver itself to mail.domainA.com.
Now I want to host a mailbox for my other domain, let's call it just domainB.com
I have set the MX-records for domainB.com to mail.domainA.com and mx2.domainA.com, just like my working mailbox.
SPF records are also the same as on domainA.com and there should be no problem from my understanding.
However, all mails that are being sent with the address [email protected] are being marked as spam in the recipients mailbox.
Is there something that I am missing, or did I just not understand how mailserver setups are supposed to work?
There is no difference in the DNS configuration except the domain name itself.
But this should not cause any issues, should it?
Comments
Have you set the reserve DNS?
DKIM?
Of the mailserver? Yes, of course.
Mails, coming from [email protected] are delivered properly, so there should not be an issue with the rDNS entry, or?
Ah, and both, domainA.com and domainB.com are actually reachable hosts and resolving properly (including rDNS).
Not set (yet), because I thought the problem must be somewhere else, when the setup is partially working.
SPF Records?
both set to "v=spf1 mx -all"
DKIM/SPF/PTR
Uhm..
Mails, coming from [email protected] are delivered properly, so there should not be an issue with the rDNS entry, or?
Ah, and both, domainA.com and domainB.com are actually reachable hosts and resolving properly (including rDNS).
https://mailcheck.iis.se/
@Shigawire Check your IP is it blacklisted, if not then it must be the recipient's spam filter is set too high.
The recipient server being.... Hotmail? Gmail? An ISP mailserver?
All of this domainA, domainB obfuscation really hinders anyone offering real advice. Just sayin'.
When sending as [email protected], what does the sending mailserver introduce itself as?
Mx.domain1.com or mx.domain2.com?
What is the rDNS set to for the server?
You should check your outgoing SMTP mail address setup. This can help you out:
Changing outgoing SMTP email on Postfix MTA.
Most of the time, email servers rejects emails coming from a VPS, mainly because the sending email address does not validate against authorized mail servers registered on your DNS records. That is, your VPS assign each local users its own name with the added extension corresponding to the hostname of the VPS.
The result on the outgoing email address will be the internal username plus the hostname assigned to the local VPS, which in turn will not correspond to the real domain being used for the mail transfer.
To overcome this problem we need to change the outgoing mail address or masquerade it with the real domain you use as the default outgoing email, hiding instead the original internal email address.
For example:
SMTP User:Adam
Email ID: Adam@domain,com
Server name: server3.vpshosting.com
On this scenario, when Adam sends an email, the outgoing mail id would be [email protected], which is not a real domain.
In most cases internal hosts have no valid Internet domain name, and instead use a name such as localdomain.local. The result will be a rejected email by the recipient’s mail server sending it to the spam folder.
Postfix MTA offers smtp_generic_maps parameter. You can specify lookup tables that replace local mail addresses by valid Internet addresses when mail is being sent by the VPS via SMTP.
Open your main.cf file
vi /etc/postfix/main.cf
Append the following parameter
smtp_generic_maps = hash:/etc/postfix/generic
Save and close the file. Open /etc/postfix/generic file:
vi /etc/postfix/generic
Make sure [email protected] change to [email protected]
[email protected] [email protected]
Save and close the file. Create or update generic postfix table:
postmap /etc/postfix/generic
Restart postfix:
/etc/init.d/postfix restart
This will solve the problem by replacing your internal mail address with the masqueraded one: [email protected]
We've got an RBL check to help you keep an eye on those blacklists
https://nodeping.com/RBL_Check
Could that be a reason? what happens if you added mail.domainB.com and mx2.domainB.com records, and used them for domainB.com?
Thanks for all your replies
IPs are not blacklisted
All of this domainA, domainB obfuscation really hinders anyone offering real advice. Just sayin'.
Any of them. Outlook, Gmail, GMX...
I am sorry about the confusion, but these addresses contain a lot of personal information and the recent bashing against some LET members don't really make me comfortable revealing too much of myself. Not that I would have anything to hide, but.. well.
Mx.domain1.com or mx.domain2.com?
What is the rDNS set to for the server?
mail.domainA.com (what you call domain1), that's what the rDNS is also set to.
@rogriverac:
Thanks for the details The mailserver is working properly, the sending user is correct with [email protected]
https://nodeping.com/RBL_Check
Thanks, I already used the mxtoolbox.com blacklist check, the IP(s) are not blacklisted.
Now THIS is interesting.
This checker displays some warnings:
Could not get A record for MX record mail.domainA.com from name server shades11.rzone.de (85.214.0.241)
Could not get A record for MX record mx2.domainA.com from name server shades11.rzone.de (85.214.0.241)
Could not get A record for MX record mail.domainA.com from name server docks17.rzone.de (81.169.146.27)
Could not get A record for MX record mx2.domainA.com from name server docks17.rzone.de (81.169.146.27)
So, from my understanding the client does a DNS-query for the MX records of domainB.com.
This returns mail.domainA.com and mx2.domainA.com.
And then this client queries the SAME DNS server to get an A record for mail.domainA.com and mx2.domainA.com?
I guess the solution for this would be hosting the DNS records of the two domains on the same server?
When I do a host lookup like
(This is shades11.rzone.de, the DNS server of the second domain), it does not return any records for mail.domainA.com.
Further, looking up the MX records for domainB.com returns "Found host mail.domainA.com (5.45.x.x) in Unknown, priority 10".
Is this "Unknown" an issue?