Skip to content

INC1329087 - respect params for sendmail.mc.erb

The variables inside sendmail.mc.erb were being loaded from local scope only and not from the scope where they were set in particular.

Thise uses to the scope.lookupvar method to be consistent with the other files.

The result of this patch is the following diff to sendmail.mc

This does result in mail being sent from mail.cern.ch rather than the cannonical name.

--- /etc/mail/sendmail.mc	2019-07-05 12:51:30.380771835 +0200
+++ /etc/mail/sendmail.mc.new	2019-07-05 12:50:43.343748449 +0200
@@ -23,7 +23,7 @@
 dnl # Uncomment and edit the following line if your outgoing mail needs to
 dnl # be sent out through an external mail server:
 dnl #
-dnl define(`SMART_HOST', `smtp.your.provider')dnl
+define(`SMART_HOST', `cern.ch')dnl
 dnl #
 define(`confDEF_USER_ID', ``8:12'')dnl
 dnl define(`confAUTO_REBUILD')dnl
@@ -113,7 +113,7 @@
 dnl # 127.0.0.1 and not on any other network devices. Remove the loopback
 dnl # address restriction to accept email from the internet or intranet.
 dnl #
-DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
+DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
 dnl #
 dnl # The following causes sendmail to additionally listen to port 587 for
 dnl # mail from MUAs that authenticate. Roaming users who can't reach their
@@ -157,11 +157,11 @@
 dnl # The following example makes mail from this host and any additional
 dnl # specified domains appear to be sent from mydomain.com
 dnl #
-dnl MASQUERADE_AS(`mydomain.com')dnl
+MASQUERADE_AS(`mail.cern.ch')dnl
 dnl #
 dnl # masquerade not just the headers, but the envelope as well
 dnl #
-dnl FEATURE(masquerade_envelope)dnl
+FEATURE(masquerade_envelope)dnl
 dnl #
 dnl # masquerade not just @mydomainalias.com, but @*.mydomainalias.com as well
 dnl #
@@ -174,3 +174,6 @@
 MAILER(smtp)dnl
 MAILER(procmail)dnl
 dnl MAILER(cyrusv2)dnl
+define(`LOCAL_RELAY',`mail.cern.ch')dnl
+LOCAL_USER_FILE(`/etc/mail/local-users')dnl
+define(`confFORWARD_PATH',`$z/public/.forward.$w:$z/public/.forward:$z/.forward.$w:$z/.forward')dnl

Merge request reports