Sendmail from another IP

I have MIAB set up and functioning properly in Google Cloud. I have an upstream SMTP set up and I can properly send/receive emails to/from my domain.

However, I would like to be able to send automated emails from my house/LAN TO my domain, but the emails are getting flagged as SPAM. Is there a way to add my Home IP to postfix/MIAB to allow this?

This is probably because your house IP looks like a residential IP, which it IS. The problem with using a residential IP is that it looks like spam. Just use an IP address from a server room, like Google Cloud man. There is likely no reason to send from your house’s IP address. If you really need to involve your home in sending mail, SSH tunnel (or other proxy) your traffic so that it exits from a business IP address.

If you really want to do this (which I don’t recommend), what you want is to add your home IP address as a relay (I believe that is what it is called). Not really sure how you’d want to set it up, do you want to send mail from your house to the server, from the server to the outside world? Do you want to directly from your house to the outside world?

So if you want to send email through your server from your house, you want a relay (I believe). To add your home IP address as a relay, on your server edit this file: /etc/postfix/main.cf and play with the relay variables to add an IP address. I suggest Googling the Postfix manual to be sure about what you’re doing.

If you want to send mail directly from your home, add your home IP address to the MX record for the domain. If you go with Namecheap, I would suggest contacting support to be sure of details.

1 Like

Have the emails sent via SMTP to your MiaB and authenticate as a user on your box.

No no! The MX record is where email is received. It has nothing to do with where mail is sent from. It may be possible to modify the spf record for the domain though which may alleviate the problem, or may not. The spf record would need to be modified to recognize mail being sent from the home IP.

Yeah, don’t worry, I didn’t do that. Thanks though.

I ended up solving this by setting up dynamic dns for my house so there is “some” essence of a domain with which to send from. Then I added an email address tied to THAT domain as an alias in MIAB. It’s all working now.

Thanks for the feedback though!

Just use your mail server as a relay. Send mail from your house through you server man, easiest and best way (in my opinion).

1 Like

I believe he meant SPF record.

No, I meant MX record, but it seems like I have said that out of ignorance. I didn’t know mail was that insecure. I thought before Yahoo came out with SPF/DKIM (I didn’t a wee bit of research), MX/A/AAAA records did the trick. Reverse DNS is just barely any sort of confirmation of authenticity, because anyone can easily spoof reverse DNS lookups.

Anyway, to clear up confusion for this poor guy, you should definitely consider using your server as a relay for your home. If you really want to send from your home, @useruseruser, you need to setup SPF/DKIM records for sending to look legitimate.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.