FreeBSD – Configure sendmail masquerading

Notes on masquerading your domain name , I needed that since one SMS gateway will not accept my nagios@server.domain.com emails , this setting allowed nagios to send the email as nagios@domain.com

 

  • tar zcf etc_mail_backup.tgz /etc/mail !!!
  • cd /etc/mail
  • sudo make cf
  • sudo vi hostname.mc
  • add:MASQUERADE_AS(domain.com)dnl
    FEATURE(masquerade_envelope)dnl
    FEATURE(masquerade_entire_domain)dnl
    MASQUERADE_DOMAIN(domain.com)dnl
  • make sure this is added BEFORE any “mailer” definitions
  • sudo make
  • sudo make installf
  • sudo make restart

worked on FreeBSD 6.2

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>