View Single Post
Old 3rd October 2010, 23:06
3rods 3rods is offline
HowtoForge Supporter
Join Date: Jun 2010
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default How can I send Spam to Spam folder?

I'm running the Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 10.04) as a mail server and I'd like to have a way to send spam emails to INBOX.Spam for virtual users.

All of my config files are unchanged from the example, except I have not installed squirrelmail. I've done some research in the areas of Amavis and maildrop; however, I'm at a loss as to how to tie everything together.

I've added the following to /etc/amavis/conf.d/50-user, but I'm not sure where to go from here.

$addr_extension_spam   = 'spam';
$recipient_delimiter = '+';
$final_spam_destiny       = D_PASS;  # (defaults to D_REJECT) D_DISCARD
Since this configuration uses virtual users defined in MySQL, it's confusing me - at what point do I need to redirect spam?

If someone could give me a overview of what I need to do, I can look at the man pages and google the rest. I'm just not sure what the implementation needs to be.

Here is a postconf -n:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
content_filter = amavis:[]:10024
html_directory = /usr/share/doc/postfix/html
inet_interfaces = all
mailbox_size_limit = 0
message_size_limit = 20480000
mydestination = mail.[DOMAIN].com, localhost, localhost.localdomain
myhostname = mail.[DOMAIN].com
mynetworks =
myorigin = /etc/mailname
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
readme_directory = /usr/share/doc/postfix
receive_override_options = no_address_mappings
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/protected_destinations, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_restriction_classes = insiders_only
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
transport_maps = proxy:mysql:/etc/postfix/
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/, mysql:/etc/postfix/
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/
virtual_mailbox_maps = proxy:mysql:/etc/postfix/
virtual_uid_maps = static:5000
Reply With Quote
Sponsored Links