I know there has to be something very simple that I am missing here, but after reading many Postfix tutorials including the documentation to the best of my abiity, I still can't seem to figure it out. I have installed postfix, saslauthd and mailx on my Ubuntu 6.10 machine.
What I want to be able to do, is two things:
1. Receive email at my local machine from anyone, not just local machine accounts. Currently if I anyone emails me at
ME@MYDOMAIN.com, they get this permanent error:
ME@MYDOMAIN.com
SMTP error from remote mail server after RCPT TO:<ME@MYDOMAIIN.com>:
host mail.MYDOMAIN.com [xxx.xxx.xxx.xxx]: 554 5.7.1 <ME@MYDOMAIN.com>:
Relay access denied
2. Use the SMTP server remotely, not just from the local machine or local subnet. Currently if I use my mail client to compose a letter and try to send it using the servers SMTP server, I get this error:
The message could not be sent because connecting to
SMTP server mail.MYDOMAIN.com failed. The server
may be unavailable or is refusing SMTP connections.
Please verify that your SMTP server setting is correct and
try again, or else contact your network administrator.
Here is my main.cf file from Postfix with all comments removed for ease of reading:
Code:
biff = no
append_dot_mydomain = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
myhostname = mail.MYDOMAIN.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mail.MYDOMAIN.com
relayhost =
mynetworks_style = class
# mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
I am able to telnet into the machine and talk to the server, I know that Postfix is working. I can even see my inbox and read my mail (from another user account on the local machine) but my problem seems to be any relay activity whether it be sending or receiving.
Ay Ideas? Thanks.