Sandy Drobic wrote:
david rankin wrote:
List, (Sandy):
I am getting more and more spam sent to root@rankin-bertin.com. How do I stop delivery from the internet to root but still allow delivery to root from localhost or the local lan? Can I add an entry to recipient_check or something similar?
Yes, just put in the check after local mail from your network has already been accepted. This example assumes that you have set rankin-bertin.com as $myorigin (your default domain).
and that the local server and the local clients who should be able to send mails to root ar in $mynetworks or use sasl auth. Sigh, it's a bit late for coherent writings, apparently...
main.cf: smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauch_destination, check_recipient_access hash:/etc/postfix/recipients_internal_only
/etc/postfix/recipients_internal_only: root@rankin-bertin.com REJECT
Don't forget to "postmap /etc/postfix/recipients_internal_only and also issue "reload postfix".
Then check it when you send a mail from the internet. You should get a reject entry in you log like:
Jan 17 00:04:17 katgar postfix/smtpd[15224]: NOQUEUE: reject: RCPT from mail-in0.tiscali.nl[195.241.79.164]: 554 5.7.1
: Recipient address rejected: Access denied; from=<> to= proto=SMTP helo= Sandy
-- List replies only please! Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com