I'm using Postfix (2.3.3) on CentOS (5.7). Right now, my server seems to be acting like an open relay. If I specify a login, it works fine, both unsecured and with TLS (however TLS nags me about the invalid certificate, but I guess I just have to get a certificate). That's what I want, if a client doesn't support TLS, then fallback to unsecured.
However, it seems that if I don't provide any login, it still sends email.
This is my main.cf configuration file:
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
myhostname = mail.valdron.ca
mydomain = valdron.ca
myorigin = $mydomain
mydestination = $myhostname, $mydomain
unknown_local_recipient_reject_code = 550
mynetworks = 127.0.0.0/8
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.3.3/samples
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
virtual_alias_maps = hash:/etc/postfix/virtual
sender_bcc_maps = hash:/etc/postfix/bcc
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
broken_sasl_auth_clients = yes
smtpd_tls_key_file = /etc/pki/tls/private/mail.valdron.ca.key
smtpd_tls_cert_file = /etc/pki/tls/certs/mail.valdron.ca.cert
smtpd_tls_loglevel = 1
smtpd_tls_session_cache_timeout = 3600s
smtpd_tls_session_cache_database = btree:/var/spool/postfix/smtpd_tls_cache
tls_random_source = dev:/dev/urandom
mailbox_size_limit = 0
notify_classes = bounce, delay, resource
smtpd_recipient_restrictions = reject_unauth_destination permit_sasl_authenticated permit_mynetworks check_relay_domains
smtpd_tls_security_level = may
Also, non-related to the first question, iPhone users get the following error (translated from French): "The recipient was rejected by the server because the relay is not allowed". I don't have an iPhone to test. Is it possible that the ISP blocks port 25 mail servers, as so many ISP do?