발신자가 @mydomain인 곳에서 스팸 수신

발신자가 @mydomain인 곳에서 스팸 수신

가능한 중복:
사람들이 내 도메인을 사용하여 스팸을 보내는 것을 어떻게 막을 수 있나요?

나는 Ubuntu + Postfix + Maia Mailguard + Dovecot을 사용하여 메일 서버를 실행하고 있습니다. 최근 사람들이 내 도메인에서 보낸 것처럼 보이는 스팸 이메일을 받기 시작할 때까지 모든 것이 잘 작동했습니다.

예를 들어:

From: [email protected]
To: [email protected]
Subject: Fwd: Re: Scan from a Hewlett-Packard ScanJet 1234

그러나 반환 경로는 다음과 같습니다.

Return-Path: <[email protected]>

(자세한 내용은 아래 메일 서버의 header 및 main.cf를 참조하세요.)

이러한 유형의 이메일을 차단하는 가장 좋은 방법으로 제안할 수 있는 사람이 있습니까? 중요할 수 있는 일부 정보, 일부 사용자는 원격으로 작업하므로 Dovecot을 실행하는 게이트웨이에 연결하여 전 세계 어느 위치에서나 수신(IMAPS)/전송(SMTP)(인증)할 수 있습니다. 이로 인해 스팸 차단이 더 어려워지는지는 잘 모르겠습니다.

스팸 헤더의 예:

Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from mail.example.com (gateway.localhost [10.0.0.1])
    by mail-int (Postfix) with ESMTP id 59CC1211180
    for <[email protected]>; Tue, 01 Aug 2012 12:00:00 +0100 (IST)
Received: from localhost (localhost [127.0.0.1])
    by mail.example.com (Postfix) with ESMTP id 43EE4C0F5
    for <[email protected]>; Tue, 01 Aug 2012 12:00:00 +0100 (IST)
Received: from mail.example.com ([127.0.0.1])
 by localhost (mail.example.com [127.0.0.1]) (amavisd-maia, port 20004)
 with ESMTP id 21183-01-6 for <[email protected]>;
 Tue, 01 Aug 2012 12:00:00 +0100 (IST)
Received: from [xx.xx.xx.xx] (unknown [xx.xx.xx.xx])
    by mail.example.com (Postfix) with ESMTP id 946DBC0EB
    for <[email protected]>; Tue, 01 Aug 2012 12:00:00 +0100 (IST)
Received: from  by mx1.optonline.net; Tue, 01 Aug 2012 12:00:00 +0100
Date: Tue, 01 Aug 2012 12:00:00 +0100
From: <[email protected]>
Reply-To: <[email protected]>
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
To: [email protected]
Subject: Fwd: Re: Scan from a Hewlett-Packard ScanJet 8702
MIME-Version: 1.0
Content-Type: multipart/mixed;
  boundary="----------27AF424950946E7"
X-Virus-Scanned: Maia Mailguard 1.0.2

게이트웨이의 postfix에 대한 main.cf

# See /usr/share/postfix/main.cf.dist for a commented, more complete version

### relayhost = www.example.com

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

### from previous confing file:
soft_bounce = no
queue_directory = /var/spool/postfix
mydomain = example.com
# debug_peer_level = 2

# SPAM Processing
content_filter = amavis:[127.0.0.1]:20004
## content_filter = smtp-amavis:[127.0.0.1]:20004

##queue_minfree = 24000000
notify_classes = 2bounce,resource,software

address_verify_negative_expire_time = 30h
bounce_queue_lifetime = 48h
maximal_queue_lifetime = 50h
delay_warning_time = 20h

### new things:

alias_maps = hash:/etc/aliases
myorigin = $mydomain
myhostname = mail.example.com
mynetworks = 127.0.0.0/8, 10.0.0.0/24, xx.xx.xx.xx
message_size_limit = 20971520
local_transport = error:No local mail delivery
mydestination = 
# mydestination = $myhostname, localhost.$mydomain, mail.$mydomain, local.$mydomain
local_recipient_maps = 
# local_recipient_maps = hash:/etc/postfix/recipients
virtual_maps = hash:/etc/postfix/virtual
virtual_alias_maps = $virtual_maps
relay_recipient_maps = hash:/etc/postfix/relay_recipients
transport_maps = hash:/etc/postfix/transport
relay_domains = hash:/etc/postfix/relay_domains
recipient_delimiter = 

smtpd_helo_required = yes

smtpd_sender_login_maps = pcre:/etc/postfix/senders_map, hash:/etc/postfix/senders_map_other

smtpd_sender_restrictions = permit_mynetworks, check_sender_access hash:/etc/postfix/sender_access, reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauthenticated_se
nder_login_mismatch
## smtpd_recipient_restrictions = check_client_access,  hash:/etc/postfix/relay_clients
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_unauth_pipelining, reject_unknown_recipient_domain, reject_unverifie
d_recipient
smtpd_data_restrictions = reject_unauth_pipelining
### 2012-03-27
# add header for authenticated mail to strip IP
smtpd_sasl_authenticated_header = yes
header_checks = regexp:/etc/postfix/header_checks.regexp
header_checks = pcre:/etc/postfix/header_checks.pcre
body_checks = pcre:/etc/postfix/body_checks
unverified_recipient_reject_code = 550

##smtpd_client_connection_count_limit = 5
#default_process_limit = 4

disable_vrfy_command = yes

##### SASL
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
##smtpd_sasl_local_domain = $mydomain
smtpd_sasl_application_name = smtpd
#broken_sasl_auth_clients = yes

##### TLS parameters
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_security_level = may 
smtpd_tls_security_level = may 
smtpd_tls_auth_only = yes
smtp_tls_note_starttls_offer = yes 
smtpd_tls_loglevel = 1 
smtpd_tls_received_header = yes 
smtpd_tls_session_cache_timeout = 3600s 
tls_random_source = dev:/dev/urandom 
smtpd_tls_cert_file=/etc/ssl/private/mail_example_com.crt
smtpd_tls_key_file=/etc/ssl/private/mail_example_com.key 
smtp_tls_CAfile = /etc/ssl/private/comodo-bundle.crt
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache 
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

****내부 메일 서버의 postfix에 대한 main.cf****

# See /usr/share/postfix/main.cf.dist for a commented, more complete version

myorigin = example.com
#### mydestination = example.com, localhost
### mydestination = 
mynetworks = 127.0.0.0/8, 10.0.0.0/24
myhostname = mail-int
mydomain = example.com

relayhost = 10.0.0.1

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no

## Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
message_size_limit = 20971520
smtpd_helo_required = yes


## TLS parameters
#smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
#smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
#smtpd_use_tls=yes
#smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
#smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
## See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
## information on enabling SSL in the smtp client.

mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

### mailbox_transport = dovecot
virtual_transport = dovecot
virtual_mailbox_base = /home/MAIL
virtual_mailbox_maps = ldap:/etc/postfix/ldap-accounts.cf
virtual_mailbox_domains = example.com
virtual_domain = example.com
virtual_minimum_uid = 30000
virtual_uid_maps = static:500
virtual_gid_maps = static:500
virtual_alias_maps = hash:/etc/postfix/aliases-virtual, ldap:/etc/postfix/ldap-aliases.cf

#allow_mail_to_files = alias
allow_mail_to_commands = alias
#alias_maps = hash:/etc/postfix/aliases
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases

## Dovecot Deliver:
#mailbox_command = /usr/local/libexec/dovecot/deliver
mailbox_command = /usr/lib/dovecot/deliver
dovecot_destination_recipient_limit = 1

답변1

우연히도 우리는 스팸 퇴치에 관한 표준 질문을 작성 중입니다.

스팸 퇴치 - 이메일 관리자, 도메인 소유자 또는 사용자로서 무엇을 할 수 있습니까?

도메인에 SPF 및 DKIM을 설정하면 이것이 식별되는 스팸 유형인 것 같습니다. Amavis의 스팸 방지 스캐너는 SPF를 사용하여 mydomain.com에 메일을 보낼 수 있는 특정 서버만 지정하고 DKIM을 사용하여 보내는 메일에 서명하므로 이러한 메시지를 스팸 메시지로 더 잘 식별할 수 있습니다. 귀하의 도메인.

답변2

나는 우리를 방문하는 것이 좋습니다스팸 퇴치에 관한 표준 스레드스팸 차단 기능을 향상시키는 방법에 대한 더 자세한 아이디어를 원하시면 from수신되는 서버의 위치를 ​​기준으로 주소를 필터링하는 규칙을 제안하거나 도메인에 대한 발신자 정책 프레임워크를 설정하여 유효한 메일 서버 목록을 설정하는 것이 좋습니다. 귀하의 도메인에 대해. 결국, 내부 주소나 게이트웨이에서 오는 것이 아니라면 도메인으로부터 이메일을 받아서는 안 됩니다. 그렇죠? 따라서 도메인에서 오고 외부 메일 서버에서 보낸 경우 더 높은 스팸 값이 할당되거나 거부되어야 합니다.

관련 정보