-1

I've a full server with mail and web behind a dynamic IP access. This is all configured to update the ip in case it changes and works well with everything except mail. Although I've implemented SPF DKIM and DMARK, since the address are listed in PBL, many servers refuse the connection.

I'm trying to solve this issue setting up a relay machine for my domains in a small VPS with Fixed IP and Reverse DNS to avoid PBL's.

I've found a link from a guy that implemented a similar solution, but he changes the sendmail.cf file, that is not supposed to be touched.

This link: https://www.akadia.com/services/sendmail_relay.html

How can I do this in the sendmail.mc file for compilation with m4?

My idea is to set the mx records pointing to this vps acting as relay, and also configure my postfix mailserver to forward mail to the relay, which I think I've found were to do this in webmin.

Hope someone can shed some light in my head.

Thanks in advance.

Jason Aller
  • 3,541
  • 28
  • 38
  • 38

1 Answers1

2

You can specify default relay for outgoing email in sendmail.mc file using SMART_HOST.

define(`SMART_HOST', `name.of.smart.host')dnl

Useful tip: You may put smart host name in square brackets to avoid lookup for DNS MX records.

define(`SMART_HOST', `[name.of.smart.host]')dnl

WARNING
sendmail uses *.cf files as configuration. *.mc fIle must be "compiled" into *.cf file.

AnFi
  • 10,493
  • 3
  • 23
  • 47
  • Thank you, that worked. Do you know how to pass the remaining parameters? DH DM CM ? DHparagon.arkum.ch # Class M: domains that should be converted to $M CMarkum.com # Who I masquerade as (null for no masquerading) (see also $=M) DMarkum.ch – João Alves Jul 24 '19 at 18:02
  • `DH` is for sending messages for local email domains to another host. `DM` and `CM` are for converting email addresses in extra (local) domains to the main (local) domain. – AnFi Jul 25 '19 at 06:31