最後更新: 2022-07-22
Settings
Postfix
main.cf
# Handle Postfix-style extensions. recipient_delimiter = + # Handle both Postfix and qmail extensions (Postfix 2.11 and later). recipient_delimiter = +-
postconf recipient_delimiter # Default: empty
Amavisd
@addr_extension_spam_maps = ('spam'); $sa_tag2_level_deflt = 6.7 ; # score above which spam extension is added $sa_kill_level_deflt = 15; # block higher score entirely $final_spam_destiny=D_DISCARD; # junk all above kill level $replace_existing_extension = 1; # true: replace extension; false: append extension
Tells Amavisd-new to rewrite the recipient address of spam messages
from [email protected] to user+spam@domain
Other map
# This extension may be used by the final local delivery agent (LDA) to place such mail into different subfolders
# @addr_extension_virus_maps = ('virus'); # defaults to empty # @addr_extension_spam_maps = ('spam'); # defaults to empty # @addr_extension_banned_maps = ('banned'); # defaults to empty # @addr_extension_bad_header_maps = ('badh'); # defaults to empty # LDAs usually default to stripping away address extension if no special # handling is specified or if a named subfolder or alias does not exist, # so adding address extensions normally does no harm. @addr_extension_spam_maps = ( { '.sub1.example.com' => 'spam', # an entire subdomain '[email protected]' => 'spam', # a particular user '[email protected]' => 'malware', # another user wants a different ext. '.' => '' } # all the rest do not receive an extension );