Hi,
I finally installed SASL so my IMAP user(s) need to login to use the SMTP server.
But know, the problem, every email from outside (tested from gmail.com/hotmail.com) are rejected. I understand why, because they are not in the "trusted" domain list.
This means I have to add all the domains that are gonna mail us in that list

that's gonna take some time?
Is there a way to configure it like this:
IMAP users that use SMTP, AUTH required!
Outside users, in this example gmail.com, just deliver the email IF the email is one of the domains I specify.
My /etc/postfix/main.cf:
Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
# TLS parameters
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
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = server1.example.com
mydomain = alitrix.nl
mydestination = $myhostname, localhost.$mydomain, localhost, phoenix, r1k7s19.kdiss.com, localhost.kdiss.com
mynetworks = 127.0.0.0/8, 217.170.21.50, alitrix.nl, mail.alitrix.nl, mail.spelladder.nl, spelladder.nl
myorigin = alitrix.nl
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
home_mailbox = .mailbox/
mailbox_size_limit = 0
recipient_delimiter = +
local_destination_concurrency_limit = 10
ignore_mx_lookup_error = yes
# Don't accept mail from domains that don't exist.
smtpd_sender_restrictions = reject_unknown_sender_domain
mailbox_command = /usr/bin/procmail
smtpd_helo_required = yes
relay_recipient_maps = hash:/etc/postfix/relay_recipients
allow_untrusted_routing = yes
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
inet_interfaces = all
smtpd_tls_auth_only = no
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
/var/log/mail
Code:
May 29 14:10:33 r1k7s19 postfix/smtpd[5596]: disconnect from unknown[121.170.129.117]
May 29 14:10:34 r1k7s19 dovecot: IMAP(alitrix): Disconnected: Logged out
May 29 14:11:29 r1k7s19 postfix/smtpd[5596]: connect from an-out-0708.google.com[209.85.132.251]
May 29 14:11:30 r1k7s19 postfix/smtpd[5596]: NOQUEUE: reject: RCPT from an-out-0708.google.com[209.85.132.251]: 554 5.7.1 <alitrix@alitrix.nl>: Relay access denied; from=<alitrix@gmail.com> to=<alitrix@alitrix.nl> proto=ESMTP helo=<an-out-0708.google.com>
May 29 14:11:30 r1k7s19 postfix/smtpd[5596]: disconnect from an-out-0708.google.com[209.85.132.251]
May 29 14:12:22 r1k7s19 postfix/smtpd[5596]: connect from an-out-0708.google.com[209.85.132.246]
May 29 14:12:22 r1k7s19 postfix/smtpd[5596]: NOQUEUE: reject: RCPT from an-out-0708.google.com[209.85.132.246]: 554 5.7.1 <alitrix@alitrix.nl>: Relay access denied; from=<alitrix@gmail.com> to=<alitrix@alitrix.nl> proto=ESMTP helo=<an-out-0708.google.com>
May 29 14:12:22 r1k7s19 postfix/smtpd[5596]: disconnect from an-out-0708.google.com[209.85.132.246]
May 29 14:13:31 r1k7s19 postfix/smtpd[5596]: connect from 190-76-126-138.dyn.movilnet.com.ve[190.76.126.138]
May 29 14:13:31 r1k7s19 postfix/smtpd[5596]: disconnect from 190-76-126-138.dyn.movilnet.com.ve[190.76.126.138]
As u see, I'm trying to send from
alitrix@gmail.com =>
alitrix@alitrix.nl
Can somebody please explain what I'm dong wrong?
Greetz,
alitrix