Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(postfix): add support for ubuntu #225

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 19 additions & 11 deletions cookbooks/fb_postfix/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

default['fb_postfix'] = {
'enable' => true,
'mask_service' => false,
'aliases' => {},
'access' => {},
'canonical' => {},
'etrn_access' => {
'127.0.0.1' => 'OK',
main_cf = value_for_platform_family(
'debian' => {
'compatibility_level' => '3.6',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I right in thinking we would need most of the default config as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to send mail using the default postfix settings just fine!

},
'local_access' => {},
'localdomains' => [],
'main.cf' => {
'default' => {
'daemon_directory' => '/usr/libexec/postfix',
'queue_directory' => '/var/spool/postfix',
'mail_owner' => 'postfix',
Expand Down Expand Up @@ -107,6 +100,21 @@
# Postfix will interpret this to be hostname
'smtp_helo_name' => '$myhostname',
},
)

default['fb_postfix'] = {
'enable' => true,
'mask_service' => false,
'aliases' => {},
'access' => {},
'canonical' => {},
'etrn_access' => {
'127.0.0.1' => 'OK',
},
'local_access' => {},
'localdomains' => [],
# will be a symlink to the right arch dir
'main.cf' => main_cf,
# master.cf as per http://www.postfix.org/master.5.html
# In master.cf, unique by service:type and not just service.
'master.cf' => {
Expand Down
2 changes: 2 additions & 0 deletions cookbooks/fb_postfix/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
description 'Installs/Configures postfix'
source_url 'https://github.com/facebook/chef-cookbooks/'
supports 'centos'
supports 'debian'
supports 'oracle'
supports 'redhat'
supports 'ubuntu'
version '0.0.1'