Mam prośbę do Was o wydanie, opinii i zweryfikowanie konfiguracji Postfiksa w pewnej sprawie dotyczącej Open Relay.
Otóż istnieje sobie serwer poczty smtp (najnowszy Postfix) z następującym plikiem konfiguracyjnym
Kod: Zaznacz cały
# main.cf
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /var/lib/postfix/deamons
mail_owner = postfix
myhostname = mail.domena.pl
mydomain = domena.pl
myorigin = $mydomain
mydestination = $myhostname, $mydomain, www.$mydomian
unknown_local_recipient_reject_code = 550
mynetworks = 192.168.0.0/24, 127.0.0.0/8
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/bin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
html_directory = /etc/postfix/html_files
manpage_directory = /usr/local/man
sample_directory = /etc/postfix
readme_directory = /etc/postfix/readme_files
alias_maps = hash:/etc/aliases, nis:mail.aliases
alias_database = hash:/etc/aliases
home_mailbox = Maildir/
####################
# -= Cyrus SASL =- # - autoryzacja SMTP, uwierzytelnianie uzytkownikow
####################
smtpd_sasl_auth_enable = yes
logach pokaze sie wpis o braku mechanizow uwierzytelniania SASL - oczywiste
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_helo_required = yes
smtpd_sender_login_maps = hash:/etc/postfix/login_maps
smtpd_data_restrictions = reject_multi_recipient_bounce
smtp_recipient_restrictions =
reject_non_fqdn_recipient,
reject_non_fqdn_sender,
reject_unknown_sender_domain,
reject_uknown_recipient_domain,
permit_mynetworks,
permit_sasl_authenticated,
reject_sender_login_mismatch,
reject_unauth_destination,
check_recipient_access hash:/etc/postfix/roleaccount_exeptions,
check_helo_access pcre:/etc/postfix/helo_checks,
reject_invalid_hostname,
check_sender_mx_access cidr:/etc/postfix/bogus_mx,
permit
header_checks = regexp:/etc/postfix/header_checks
#############
# -= TLS =- # - szyfrowanie polaczen KLIENT<->SERWER
#############
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
smtpd_tls_key_file = /etc/postfix/certs/postfix_private_key.pem
smtpd_tls_cert_file = /etc/postfix/certs/postfix_public_cert.pem
smtpd_tls_CAfile = /etc/postfix/certs/cacert.pem
smtpd_tls_loglevel = 4
smtpd_tls_received_header = yes
# nie wlaczac bo wysylanie przez squirrelmail wywala 553 encryption required
# smtpd_tls_auth_only = yes
smtpd_tls_session_cache_database = btree:/etc/postfix/smtpd_scache
smtpd_sasl_tls_security_options = noanonymous
Kod: Zaznacz cały
Warning found on port smtp (25/tcp)
The remote SMTP server is insufficiently protected against relaying
This means that spammers might be able to use your mail server
to send their mails to the world.
Nessus was able to relay mails by sending those sequences:
MAIL FROM: <nobody@example.com>
RCPT TO: <nobody@example.com>
Risk factor : Medium
Solution : upgrade your software or improve the configuration so that
your SMTP server cannot be used as a relay any more.
Information found on port smtp (25/tcp)
An SMTP server is running on this port
Here is its banner :
220 mail.domena.pl ESMTP Postfix
Na serwerze mam również uruchomioną usługę statystyk Srvreport http://srvreport.chosting.de/ , która monitoruje mi pewne części systemu (w tym log maillog Postfiksa) i generuje systematyczny raport. W raporcie tym relatywnie często (codziennie) pojawiają się wpisy w stylu:
Kod: Zaznacz cały
candy59839@yahoo.com.tw michael78694@MyMainServer.com 0 REJECT
nomail12378@yahoo.com.tw michael78694@MyMainServer.com 0 REJECT
Kod: Zaznacz cały
Oct 9 13:59:28 serwer postfix/smtpd[6628]: NOQUEUE: reject: RCPT from 218-170-59-166.dynamic.hinet.net[218.170.59.166]: 554 5.7.1 <antelop7@ms11.hinet.net>: Relay access denied; from=<antelop7@ms11.hinet.net> to=<antelop7@ms11.hinet.net> proto=ESMTP helo=<none-9m4f9c59gi>
Oct 9 13:59:28 serwer postfix/smtpd[6628]: > 218-170-59-166.dynamic.hinet.net[218.170.59.166]: 554 5.7.1 <antelop7@ms11.hinet.net>: Relay access denied
Oct 10 06:16:27 serwer postfix/smtpd[16009]: NOQUEUE: reject: RCPT from 59-117-202-239.dynamic.hinet.net[59.117.202.239]: 554 5.7.1 <nomail12378@yahoo.com.tw>: Relay access denied; from=<michael78694@MyMainServer.com> to=<nomail12378@yahoo.com.tw> proto=SMTP helo=<www.MyMainServer.com>
Oct 10 06:16:27 serwer postfix/smtpd[16009]: > 59-117-202-239.dynamic.hinet.net[59.117.202.239]: 554 5.7.1 <nomail12378@yahoo.com.tw>: Relay access denied
Oct 10 06:17:18 serwer postfix/smtpd[16009]: NOQUEUE: reject: RCPT from 59-117-199-199.dynamic.hinet.net[59.117.199.199]: 554 5.7.1 <nomail12356@yahoo.com.hk>: Relay access denied; from=<michael78694@MyMainServer.com> to=<nomail12356@yahoo.com.hk> proto=SMTP helo=<www.MyMainServer.com>
Oct 10 06:17:18 serwer postfix/smtpd[16009]: > 59-117-199-199.dynamic.hinet.net[59.117.199.199]: 554 5.7.1 <nomail12356@yahoo.com.hk>: Relay access denied
Oct 12 13:46:54 serwer postfix/smtpd[14987]: NOQUEUE: reject: RCPT from 61-230-65-131.dynamic.hinet.net[61.230.65.131]: 554 5.7.1 <nomail12378@yahoo.com.tw>: Relay access denied; from=<michael78694@MyMainServer.com> to=<nomail12378@yahoo.com.tw> proto=SMTP helo=<www.MyMainServer.com>
Oct 12 13:46:54 serwer postfix/smtpd[14987]: > 61-230-65-131.dynamic.hinet.net[61.230.65.131]: 554 5.7.1 <nomail12378@yahoo.com.tw>: Relay access denied
Oct 12 13:46:56 serwer postfix/smtpd[14991]: NOQUEUE: reject: RCPT from 61-230-70-177.dynamic.hinet.net[61.230.70.177]: 554 5.7.1 <candy59839@yahoo.com.tw>: Relay access denied; from=<michael78694@MyMainServer.com> to=<candy59839@yahoo.com.tw> proto=SMTP helo=<www.MyMainServer.com>
Oct 12 13:46:56 serwer postfix/smtpd[14991]: > 61-230-70-177.dynamic.hinet.net[61.230.70.177]: 554 5.7.1 <candy59839@yahoo.com.tw>: Relay access denied
Prosiłbym Was o zapoznanie się z przedstawionym zagadnieniem i wypowiedzenie się w sprawie tego Ostrzeżenia wdanego przez Nessusa. Czy jest powód do obaw? A może jednak popełniłem, gdzies błąd w konfiguracji Postfiksa, który może być przyczyną ew. problemów. Jak będą potrzebne dodatkowe informację to służę pomocą.
Źródło testu (plugina) wykonywanego przez Nessusa jest dostępne pod adresem http://www.nessus.org/plugins/index.php ... c&id=11852
Będę wdzięczny, pozdrawiam :)