If you reject a message in helo, sender or recipient restrictions, the
specific restriction is shown in the reject message as shown below:
554 5.7.1 <helo.domain.local>: Helo command rejected: Rejected
554 5.7.1 <sender@domain.local>: Sender address rejected: Rejected
554 5.7.1 <recipient@domain.local>: Recipient address rejected: Rejected
Is it possible to suppress this, so the error message will only contain
my defined error code and message?
This could look like:
554 5.7.1 : Rejected
This way the sender will not be able to verify why specifically the
message was rejected. In a special case, I don't want to reveal this
information.
Output of "postconf -n" for your reference
--
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd
$daemon_directory/$process_name $process_id & sleep 5
html_directory = no
inet_interfaces = 10.1.1.20, localhost
inet_protocols = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_helo_restrictions = permit_mynetworks, check_helo_access
hash:/etc/postfix/access_helo_test.hash
smtpd_recipient_restrictions = permit_mynetworks, check_recipient_access
hash:/etc/postfix/access_recipient_test.hash, reject
smtpd_relay_restrictions =
smtpd_sender_restrictions = permit_mynetworks, check_sender_access
hash:/etc/postfix/access_sender_test.hash
unknown_local_recipient_reject_code = 550
--cut--
Best regards
Henrik Larsson