Recently I set-up a machine in my closet to act as a backup server. One of it’s jobs is to download via pop3 all the email from our Gmail accounts just in case the cloud goes puf :). For this job I used fetchmail to fetch the emails to local users on the machine. All nice and simple … you’d think.
The mail didn’t get delivered because sendmail complained about this error.
Now this is weird – I just want to have the mails delivered locally. Well, since spam is such a big problem sendmail likes to check that the domain from which the message originated is real.
In my case this fails of course since some of the old emails we have in this accounts are from addresses that no longer exists and so sendmail refused to deliver them. So we just have to tell email to accept email coming from nonexistent domains.
Note: that this is not safe or recommended in anyway if the sendmail is running on a live email server. (Why are you running sendmail on live machine anyway?) It’s acceptable in this case since this sendmail will only get messages downloaded by fetchmail from a few google GMail accounts.
So the setting to change in order to allow messages from nonexistent domains is found in
and it’s this one:
and after changing it should read:
After changing it you must run:
cp sendmail-slackware.mc config.mc
m4 /usr/share/sendmail/cf/m4/cf.m4 config.mc > /etc/mail/sendmail.cf
When I did the above again after reinstalling running simply this also worked: