Sha256: db2ebb280791ec84409147efbe14a7eb9eba2aea5a819e238b69f075dd8a998d

Contents?: true

Size: 388 Bytes

Versions: 125

Compression:

Stored size: 388 Bytes

Contents

class Specinfra::Command::Base::MailAlias < Specinfra::Command::Base
  class << self
    def check_is_aliased_to(mail_alias, recipient)
      recipient = "[[:space:]]([\"']?)#{recipient}\\1"
      "getent aliases #{escape(mail_alias)} | egrep -- #{escape(recipient)}$"
    end

    def add(mail_alias, recipient)
      "echo #{mail_alias}: #{recipient} >> /etc/aliases"
    end
  end
end

Version data entries

125 entries across 125 versions & 2 rubygems

Version Path
specinfra-cisco-2.41.0 lib/specinfra/command/base/mail_alias.rb
specinfra-2.43.11 lib/specinfra/command/base/mail_alias.rb
specinfra-cisco-2.40.2 lib/specinfra/command/base/mail_alias.rb
specinfra-2.43.10 lib/specinfra/command/base/mail_alias.rb
specinfra-2.43.9 lib/specinfra/command/base/mail_alias.rb
specinfra-2.43.8 lib/specinfra/command/base/mail_alias.rb
specinfra-2.43.7 lib/specinfra/command/base/mail_alias.rb
specinfra-2.43.6 lib/specinfra/command/base/mail_alias.rb
specinfra-2.43.5 lib/specinfra/command/base/mail_alias.rb
specinfra-2.43.4 lib/specinfra/command/base/mail_alias.rb
specinfra-2.43.3 lib/specinfra/command/base/mail_alias.rb
specinfra-2.43.2 lib/specinfra/command/base/mail_alias.rb
specinfra-2.43.1 lib/specinfra/command/base/mail_alias.rb
specinfra-2.43.0 lib/specinfra/command/base/mail_alias.rb
specinfra-2.42.2 lib/specinfra/command/base/mail_alias.rb
specinfra-2.42.1 lib/specinfra/command/base/mail_alias.rb
specinfra-2.42.0 lib/specinfra/command/base/mail_alias.rb
specinfra-2.41.1 lib/specinfra/command/base/mail_alias.rb
specinfra-2.41.0 lib/specinfra/command/base/mail_alias.rb
specinfra-2.40.2 lib/specinfra/command/base/mail_alias.rb