Strona 1 z 1

Postfix - problem z konfiguracją

: 13 lipca 2013, 16:30
autor: T0maj
Witam

zrobiłem aktualizację dystrybucji z 6.0 na 7.0 po czym wysypał się postfix i dovecot. Co do dovecot'a to udało mi się go przekonfigurować i wydaję się, że działa poprawnie.
Postfix za to jest oporny ;-) Osiągnąłem stan, że maile z zewnętrznych serwerów dochodzą na odpowiednie skrzynki, lokalnie maile również wychodzą/dochodzą, ale jak chcę wysłać maila na inny serwer to mam błąd:

Kod: Zaznacz cały

Jul 13 16:13:28 Master postfix/smtpd[8351]: connect from tomaj.no-ip.org[77.65.91.184]
Jul 13 16:13:28 Master postfix/smtpd[8351]: NOQUEUE: reject: RCPT from  tomaj.no-ip.org[77.65.91.184]: 554 5.7.1 <tomaj@konto.pl>: Relay  access denied; from=<tomaj@tomaj.no-ip.org>  to=<tomaj@konto.pl> proto=ESMTP helo=<tomaj.no-ip.org>
Jul 13 16:13:28 Master postfix/smtpd[8351]: disconnect from tomaj.no-ip.org[77.65.91.184]
Konfiguracja postfixa main.cf

Kod: Zaznacz cały

# 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

#myorigin = $mydomain

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
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

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_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 = Master
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = Master, Master.TL-WR, localhost.TL-WR, localhost, tomaj.no-ip.org
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
default_transport = error
relay_transport = error

#moje

command_directory = /usr/sbin
mail_owner = postfix
mydomain = tomaj.no-ip.org
home_mailbox = Maildir/
mail_spool_directory = /home/
smtpd_banner = ESMTP on $myhostname

smtpd_helo_restrictions = permit_mynetworks,
permit_sasl_authenticated,
reject_non_fqdn_hostname,
reject_invalid_hostname,
permit

smtpd_recipient_restrictions =
permit_sasl_authenticated,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
reject_unknown_sender_domain,
reject_unknown_recipient_domain,
reject_unauth_pipelining,
permit_mynetworks,
reject_unauth_destination,
reject_rbl_client zen.spamhaus.org,
reject_rbl_client list.dsbl.org,
permit

smtpd_sender_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_non_fqdn_sender,
reject_invalid_hostname,
reject_rhsbl_sender dsn.rfc-ignorant.org
reject_unknown_sender_domain,
permit

: 14 lipca 2013, 10:58
autor: LordRuthwen
Wysyłasz z klienta pocztowego czy z panelu www?
Jeżeli z klienta, to sprawdź czy masz włączoną w kliencie opcję "serwer poczty wychodzącej wymaga autentykacji"

: 14 lipca 2013, 14:39
autor: T0maj
Testowałem na Outlooku, miałem zaznaczoną opcję autentykacji. Wygrzebałem dziś jakąs stara konfigurację mojego postfixa, zrobiłem parę modyfikacji i zadziałało. Nie wiem na 100% co dokładnie powodowało ten problem ponieważ zmieniłem kilka opcji na raz ;-)


Prawdpopodobnie chodzi o te dwie opcje:

myorigin =
relay_domains =
Poniżej main.cf który zadziałał :-)

Kod: Zaznacz cały


# 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 (Debian/GNU)
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

readme_directory = no

smtpd_sasl_local_domain = $myhostname
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes



# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_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 = Master.TL-WR
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = Master, Master.TL-WR, localhost.TL-WR, tomaj.no-ip.org
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
#mailbox_command = /usr/bin/procmail -a "$EXTENSION" DEFAULT=$HOME/Maildir/ MAILDIR=$HOME/Maildir
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
myorigin = tomaj.no-ip.org
relay_domains = tomaj.no-ip.org


smtpd_recipient_restrictions =  permit_sasl_authenticated, reject_non_fqdn_hostname, reject_non_fqdn_sender, 
                reject_non_fqdn_recipient, reject_non_fqdn_hostname, 
                reject_rbl_client b.barracudacentral.org, 
                reject_rbl_client dnsbl-1.uceprotect.net, 
                reject_rbl_client bl.spamcop.net, 
                reject_rbl_client cbl.abuseat.org, 
                reject_rbl_client sbl.spamhaus.org, 
                reject_rbl_client dul.dnsbl.sorbs.net,
                reject_unauth_destination, 
                permit_mynetworks, 
                check_policy_service inet:127.0.0.1:60000

#smtpd_helo_restrictions = reject_invalid_helo_hostname,
#        reject_non_fqdn_helo_hostname,
#        reject_unknown_helo_hostname


smtpd_client_restrictions = permit

smtpd_sender_restrictions = permit


# dnsbl.sorbs.net

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/virtual
smtp_sasl_security_options = noanonymous


home_mailbox = Maildir/
#transport_maps = hash:/etc/postfix/transport
mailman_destination_recipient_limit = 1

#smtpd_sasl_local_domain = $myhostname
#  smtpd_sasl_auth_enable = yes
#    broken_sasl_auth_clients = yes