I'm having an issue with a newly configured mailserver where spam emails that are spoofed to come from the local domain are actually accepted by the mailserver, the mail isnt delivered as is though, the spamassassin tags it as spam and then send an email "Undelivered Mail Returned to Sender" to the spoofed local user.
I know there is a way of fixing this in the configuration but i have no idea where, i'm hoping someone can point me in the right direction.
To be clear, the mailserver is not relaying, this is only a local user issue. I want postfix to reject any emails supposedly from local users that aren't sent internally. It would stop this problem.
Here is an email to show you whats happening. I've changed the domain to example.com.au.
###############################################
###############################################
This is the mail system at host example.com.au.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
[email protected]: host 127.0.0.1[127.0.0.1] said: 554 5.7.0 Reject, id=11887-07 - SPAM (in reply to end of DATA command)
?
Reporting-MTA:dns; example.com.au
X-Postfix-Queue-ID: 661DC5D1DE
X-Postfix-Sender: rfc822; [email protected]
Arrival-Date: Tue, 5 May 2009 06:21:38 +1000 (EST)
Final-Recipient: rfc822;[email protected]
Original-Recipient:rfc822;[email protected]
Action: failed Status: 5.7.0
Remote-MTA: dns; 127.0.0.1
Diagnostic-Code: smtp; 554 5.7.0 Reject, id=11887-07 - SPAM ?
From: Berenice Penez [email protected]
Date: Mon, 4
May 2009 22:21:41 +0200
To: [email protected] Subject: Were it you, on forum?
Reliable quality and no delays with
delivery! Super online store for
disease treating
http://www.xopfekec.cn/
Postfix main.cf (the important parts, not complete)
readme_directory = /usr/share/doc/postfix
mydomain_fallback = localhost
message_size_limit = 0
mailbox_size_limit = 0
myhostname = example.com.au
mailbox_transport = cyrus
mydomain = example.com.au
inet_interfaces = all
enable_server_options = yes
mydestination = $myhostname,localhost.$mydomain,localhost,example.com.au
smtpd_sasl_auth_enable = yes
smtpd_use_pw_server = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination,reject_unknown_recipient_domain,reject_unknown_sender_domain,reject_invalid_hostname
smtpd_pw_server_security_options = plain,login
content_filter = smtp-amavis:[127.0.0.1]:10024
mynetworks = 127.0.0.0/8, 10.0.1.0/24
smtpd_client_restrictions = permit_sasl_authenticated,reject_rbl_client dnsbl.sorbs.net