Class: Specinfra::Command::Openbsd::Base::MailAlias

Inherits:
Base::MailAlias show all
Defined in:
lib/specinfra/command/openbsd/base/mail_alias.rb

Class Method Summary collapse

Methods inherited from Base::MailAlias

add

Methods inherited from Base

create, escape

Class Method Details

.check_is_aliased_to(recipient, target) ⇒ Object



3
4
5
6
# File 'lib/specinfra/command/openbsd/base/mail_alias.rb', line 3

def check_is_aliased_to(recipient, target)
  target = %Q{([[:space:]]|,)["']?#{escape(target)}["']?(,|$)}
  "egrep ^#{escape(recipient)}:.*#{escape(target)} /etc/mail/aliases"
end