When I started using sendmail to receive mail for my domain the server's FQDN wasn't set up right so it would appear to be localhost when other MTA connected to it.
This seems to work fine. i.e. something like:
My Server: 220 localhost.localdomain ESMTP
Client: EHLO example.com
My Server: 250 localhost.localdomain
I could also send mail fine since I masqueraded as the correct domain. I have never received a spam message at this domain. I believe spammers typically scan the internet looking for replies to port 25 and when they find it connect, take the domain name from either the greeting or the domain name after the 250 response and then try random usernames at that domain.
Since they only get localhost as the domain name they can't try this and so only genuine people who know the domain name (having got the mail server address from the mx records in the DNS for the domain) can send mail to the domain. (My reverse DNS does not match my domain so they can't get the domain from this either). Unfortunately I have now set up the server with a proper FQDN which is now being shown.
Now it goes something like this:
My server: 220 (My reverse DNS which is not my domain name)
(I set this using confSMTP_LOGIN_MSG,'(My reverse DNS) Sendmail; $b')
C: EHLO example.com
My Server: 250 (My FQDN) oh no:(
How do I change the bit after 250 to be something else other than my FQDN without getting rid of the FQDN on the server?
Also are there any bad consequences to this apart from breaking the relevant RFC?