Fix bodycheck and headercheck tests for rhel10
This commit is contained in:
parent
abf8d5889b
commit
7172aeddc1
4 changed files with 22 additions and 21 deletions
|
|
@ -9,11 +9,11 @@ recommend:
|
|||
- postfix
|
||||
- nc
|
||||
- rsyslog
|
||||
- postfix-lmdb
|
||||
duration: 20m
|
||||
enabled: true
|
||||
tag:
|
||||
- Tier1
|
||||
- postfix::junk::bodycheck
|
||||
tier: '1'
|
||||
adjust:
|
||||
- enabled: false
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ PACKAGE="postfix"
|
|||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "pushd $TmpDir"
|
||||
|
||||
|
|
@ -44,7 +45,7 @@ rlJournalStart
|
|||
|
||||
rlServiceStop "postfix"
|
||||
rlFileBackup "/etc/postfix/main.cf"
|
||||
rlFileBackup "/etc/postfix/vmailbox"
|
||||
rlFileBackup --missing-ok "/etc/postfix/vmailbox"
|
||||
rlFileBackup "/etc/postfix/virtual"
|
||||
rlFileBackup "/var/log/maillog"
|
||||
rlPhaseEnd
|
||||
|
|
@ -59,8 +60,8 @@ rlJournalStart
|
|||
cat << "EOF" > "/etc/postfix/main.cf"
|
||||
myhostname = randomstuff.at
|
||||
|
||||
alias_maps = hash:/etc/aliases
|
||||
alias_database = hash:/etc/aliases
|
||||
alias_maps = lmdb:/etc/aliases
|
||||
alias_database = lmdb:/etc/aliases
|
||||
|
||||
myorigin = /etc/mailname
|
||||
mydestination = localhost.randomstuff.at, localhost
|
||||
|
|
@ -75,11 +76,11 @@ smtpd_relay_restrictions = reject_unauth_destination
|
|||
|
||||
virtual_mailbox_domains = example.com
|
||||
virtual_mailbox_base = /var/mail/vhosts
|
||||
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
|
||||
virtual_mailbox_maps = lmdb:/etc/postfix/vmailbox
|
||||
virtual_minimum_uid = 100
|
||||
virtual_uid_maps = static:5000
|
||||
virtual_gid_maps = static:5000
|
||||
virtual_alias_maps = hash:/etc/postfix/virtual
|
||||
virtual_alias_maps = lmdb:/etc/postfix/virtual
|
||||
|
||||
body_checks = regexp:/etc/postfix/body_checks
|
||||
EOF
|
||||
|
|
@ -97,8 +98,8 @@ EOF
|
|||
/Aliens/ REJECT
|
||||
EOF
|
||||
|
||||
rlRun "postmap /etc/postfix/virtual"
|
||||
rlRun "postmap /etc/postfix/vmailbox"
|
||||
rlRun "postmap lmdb:/etc/postfix/virtual"
|
||||
rlRun "postmap lmdb:/etc/postfix/vmailbox"
|
||||
|
||||
rlServiceStart "postfix"
|
||||
rlPhaseEnd
|
||||
|
|
@ -109,7 +110,7 @@ EHLO aliens.outerworld
|
|||
MAIL FROM: friendly@alien.xt
|
||||
RCPT TO: info@example.com
|
||||
DATA
|
||||
Hello we are friendly Aliens and we are comming in peace!
|
||||
Hello we are friendly Aliens and we are coming in peace!
|
||||
.
|
||||
EOF
|
||||
|
||||
|
|
@ -125,8 +126,8 @@ EOF
|
|||
|
||||
rlServiceStop "postfix"
|
||||
|
||||
rlRun "rm -rf /etc/postfix/vmailbox.db"
|
||||
rlRun "rm -rf /etc/postfix/virtual.db"
|
||||
rlRun "rm -rf /etc/postfix/vmailbox.lmdb"
|
||||
rlRun "rm -rf /etc/postfix/virtual.lmdb"
|
||||
rlRun "rm -rf /etc/postfix/body_checks"
|
||||
|
||||
rlFileRestore
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@ recommend:
|
|||
- postfix
|
||||
- nc
|
||||
- rsyslog
|
||||
- postfix-lmdb
|
||||
duration: 20m
|
||||
enabled: true
|
||||
tag:
|
||||
- Tier1
|
||||
- postfix::junk::headercheck
|
||||
tier: '1'
|
||||
adjust:
|
||||
- enabled: false
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ rlJournalStart
|
|||
|
||||
rlServiceStop "postfix"
|
||||
rlFileBackup "/etc/postfix/main.cf"
|
||||
rlFileBackup "/etc/postfix/vmailbox"
|
||||
rlFileBackup --mising-ok "/etc/postfix/vmailbox"
|
||||
rlFileBackup "/etc/postfix/virtual"
|
||||
rlFileBackup "/var/log/maillog"
|
||||
rlPhaseEnd
|
||||
|
|
@ -59,8 +59,8 @@ rlJournalStart
|
|||
cat << "EOF" > "/etc/postfix/main.cf"
|
||||
myhostname = randomstuff.at
|
||||
|
||||
alias_maps = hash:/etc/aliases
|
||||
alias_database = hash:/etc/aliases
|
||||
alias_maps = lmdb:/etc/aliases
|
||||
alias_database = lmdb:/etc/aliases
|
||||
|
||||
myorigin = /etc/mailname
|
||||
mydestination = localhost.randomstuff.at, localhost
|
||||
|
|
@ -75,11 +75,11 @@ smtpd_relay_restrictions = reject_unauth_destination
|
|||
|
||||
virtual_mailbox_domains = example.com
|
||||
virtual_mailbox_base = /var/mail/vhosts
|
||||
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
|
||||
virtual_mailbox_maps = lmdb:/etc/postfix/vmailbox
|
||||
virtual_minimum_uid = 100
|
||||
virtual_uid_maps = static:5000
|
||||
virtual_gid_maps = static:5000
|
||||
virtual_alias_maps = hash:/etc/postfix/virtual
|
||||
virtual_alias_maps = lmdb:/etc/postfix/virtual
|
||||
|
||||
header_checks = regexp:/etc/postfix/header_checks
|
||||
EOF
|
||||
|
|
@ -97,8 +97,8 @@ EOF
|
|||
/^From.*alien\.xt/ REJECT Sorry, no aliens welcome!
|
||||
EOF
|
||||
|
||||
rlRun "postmap /etc/postfix/virtual"
|
||||
rlRun "postmap /etc/postfix/vmailbox"
|
||||
rlRun "postmap lmdb:/etc/postfix/virtual"
|
||||
rlRun "postmap lmdb:/etc/postfix/vmailbox"
|
||||
|
||||
rlServiceStart "postfix"
|
||||
rlPhaseEnd
|
||||
|
|
@ -125,8 +125,8 @@ EOF
|
|||
rlRun "rm -rf /var/mail/vhosts"
|
||||
|
||||
rlServiceStop "postfix"
|
||||
rlRun "rm -rf /etc/postfix/vmailbox.db"
|
||||
rlRun "rm -rf /etc/postfix/virtual.db"
|
||||
rlRun "rm -rf /etc/postfix/vmailbox.lmdb"
|
||||
rlRun "rm -rf /etc/postfix/virtual.lmdb"
|
||||
rlRun "rm -rf /etc/postfix/header_checks"
|
||||
|
||||
rlFileRestore
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue