FastHandle is fast operation tools for infrastructure configurations and tests.
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
middleware:postfix:index.html [2017/12/17 23:48] kurihara |
middleware:postfix:index.html [2019/02/11 00:46] (current) kurihara |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| [[: | [[: | ||
| - | ====== Postfix ====== | + | ====== Postfix |
| + | |||
| + | $FHHOME/ | ||
| - | \\ | ||
| {{INLINETOC}} | {{INLINETOC}} | ||
| \\ | \\ | ||
| - | ===== Operation ===== | + | ===== Postfix |
| <sxh bash toolbar: | <sxh bash toolbar: | ||
| - | $ echo a |fab -l |grep postfix. | + | $ fab -l |grep postfix |
| - | + | ||
| - | $ echo xx.xx.xx.xx | fab pro postfix.yum_install | + | |
| - | $ echo xx.xx.xx.xx | fab stg postfix. | + | |
| </ | </ | ||
| + | <sxh bash toolbar: | ||
| + | $ fab -H auht.pro | ||
| + | </ | ||
| \\ | \\ | ||
| - | ===== postfix.py | + | ==== Fabric |
| + | <sxh bash toolbar: | ||
| + | $ H=test-server-1, | ||
| + | $ fab -H $H -- "ps aux |grep postfix" | ||
| + | |||
| + | $ fab -H $H -- sudo systemctl status postfix | ||
| + | $ fab -H $H -- sudo systemctl restart postfix | ||
| + | |||
| + | $ fab -H $H -- postconf | ||
| + | $ fab -H $H -- postconf -n # Display only parameters different from default | ||
| + | $ fab -H $H -- postconf -d # list default configuraiton | ||
| + | |||
| + | |||
| + | $ fab -H $H -- "ls / | ||
| + | $ fab -H $H -- " | ||
| + | $ fab -H $H -- " | ||
| + | $ fab -H $H -- postcat -q QUEUE_ID | ||
| + | </ | ||
| \\ | \\ | ||
| - | ===== Configuration | + | ===== postfix.py |
| - | | + | $FHHOME/ |
| + | <sxh bash toolbar: | ||
| + | import sys | ||
| + | from fabric.api import * | ||
| + | from fabric.contrib import files | ||
| + | |||
| + | # | ||
| + | # Installing Postfix | ||
| + | # | ||
| + | # postfix.install_yum | ||
| + | @task | ||
| + | def install_yum(): | ||
| + | sudo(" | ||
| + | |||
| + | # | ||
| + | # Queue | ||
| + | # | ||
| + | # postfix.check_queue_num | ||
| + | @task | ||
| + | def postfix.check_queue_num(): | ||
| + | """ | ||
| + | # | ||
| + | sudo(" | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | \\ | ||
| + | ===== Postfix Configuration Examples===== | ||
| + | *[[middleware: | ||
| + | |||
| + | *[[middleware: | ||
| + | *[[middleware: | ||
| + | |||
| + | |||
| + | \\ | ||
| \\ | \\ | ||
| + | <WRAP box 90%> | ||
| + | <catlist ..: -noAddPageButton -smallHead -sortAscending> | ||
| + | </ | ||
| \\ | \\ | ||
| [[: | [[: | ||
My Sites
SNS
Copyright (c) 2025 FastHandle - IT Operations Examples All Rights Reserved.