Documentation about the ncm-sendmail component

Ncm-sendmail-1.6 component

2 Functions:

1)The first check if the service is running,

2) The second function restarts the service.

(Both can be implemented with the notify/require parameters in puppet manifests)

Declaring the parameters (e.g my $cfgfilecf='/etc/mail/';)

Configure state:

|-- manifests
| |-- config.pp
| |-- init.pp
| |-- install.pp
| |-- local-users.pp
| |-- newaliases.pp
| |-- params.pp
| `-- service.pp
`-- templates
|-- local-users.erb



$sendmailmc_file = '/etc/mail/'
$sendmailcf_file = '/etc/mail/'
$file_group = 'root'

  • Modifying the sendmail configuration file
  1. masquerade_enable = true -->(put-line) MASQUERADE_AS(`<%= @user_domain %>')
  2. masquerade_enable = true -->(put-line) FEATURE(masquerade_envelope)dnl

  3. accept_external_mail = true -->(put-line) DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl

  4. local_relay_enable = true -->(put-line) define(`LOCAL_RELAY',`<%= @user_domain %>')dnl ,LOCAL_USER_FILE(`<%= @local_users_file %>')dnl
  5. afs_forward_support = true -->(put-line) define(`confFORWARD_PATH',`$z/public/.forward.$w:$z/public/.forward:$z/.forward.$w:$z/.forward')dnl
Install the packages: 'sendmail', 'sendmail-cf', 'm4'

Configure the module ( the manifest is ready e.g: Generate sendmail configuration file)


  • Trying to guess all the non-afs users in the machine(default = root)
  • try to open the /etc/login.defs if failed hardcode the min/max local uid between 500 - 60000 ( <- this needs to be reviewed , Jarek)
  • Puppet approach of newaliases(does the same thing with sendmail component but better) if /etc/aliases.db is more recent, 0 if /etc/aliases is more recent 1 or aliases.db is absent and then it runs the newaliases command
Things to be done

  • How hiera plays with masterless approach
  • how i can extract the landb lib in order to have the landb_owner(s)

Unconfigure State

Just put the default values..


$lcm --configure sendmail

[INFO] masquerade as host:
[INFO] masquerading header and envelope
[INFO] unqualified users relayed via
[INFO] will guess the list of local users for unqualified relay
[INFO] exception list for unqualified relay in /etc/mail/local-users: local-user,root
[INFO] using smarthost:
[INFO] sendmail listening options not configured
[INFO] looking for .forward in: $z/public/.forward.$w:$z/public/.forward:$z/.forward.$w:$z/.forward
[INFO] converted sendmail config /etc/mail/ -> /etc/mail/
[INFO] service sendmail is running
[INFO] service sendmail has been restarted
[OK] Sendmail configured

$lcm --unconfigure sendmail

updated /etc/mail/
updated /etc/mail/
updated /etc/mail/
updated /etc/mail/
updated /etc/mail/
updated /etc/mail/
[INFO] converted sendmail config /etc/mail/ -> /etc/mail/
[INFO] service sendmail is running
[INFO] service sendmail has been restarted
[OK] Sendmail unconfigured
[INFO] configure on component sendmail executed, 0 errors, 0 warnings

Edit | Attach | Watch | Print version | History: r27 < r26 < r25 < r24 < r23 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r27 - 2015-11-06 - JaroslawPolok
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback