I am trying to blacklist some email addresses but I simply can't get postfix access to work.
Can some point out what I might have don't incorrectly?
smtpd_recipient_restrictions = check_sender_access hash:/etc/postfix/check_senders
to the main.cf file in /etc/postfix/
Created /etc/postfix/check_senders I added my address to the file to check that it's functioning This file contains
Created postfix lookup tables with
Reload and restart postfix
#>postfix reload #>postfix restart
To test this I created very basic php mail script called test.php
<?php $to = 'firstname.lastname@example.org'; $subject = 'Test postfix access'; $headers = "From: My Name <" . strip_tags('email@example.com') . ">\r\n"; $headers .= "Reply-To: ". strip_tags($to) . "\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; if (mail($to, $subject, 'Test is a test message from the server', $headers)) echo "Sent\n\r";
Ran the file with
I still receive the email sent by the php script ..... Any ideas?