LINUX.ORG.RU

Сообщения TheZ

 

Postfix принимает почту от неавторизованных пользователей

Ребят, помогите пожалуйста. Такая проблема - шлют вирусы с моей же почты мне. Как понял постфикс почему-то не заставляет авторизоваться отправителя.

Конфиг

debug_peer_list = server.domain
debug_peer_level = 2
## определение псевдонимов ##
#alias_maps = hash:/etc/postfix/aliases
#alias_database = hash:/etc/postfix/aliases
alias_maps = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
alias_database = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf 
virtual_alias_maps=mysql:/etc/postfix/mysql-virtual-alias-maps.cf

## определение transport ##
transport_maps = mysql:/etc/postfix/mysql-transport.cf
#transport_maps = hash:/etc/postfix/transport

# 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
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
queue_directory = /var/spool/postfix
readme_directory = no

# Настройка SMTP-клиента, отправляющего почту
smtp_tls_loglevel = 2
smtp_tls_CApath = /etc/ssl/certs

# TLS parameters
smtpd_tls_cert_file = /etc/ssl/mail2.server.domain.public.pem
smtpd_tls_key_file = /etc/ssl/mail2.server.domain.pem
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_tls_CApath = /etc/ssl/certs
smtpd_tls_loglevel = 2
smtpd_tls_received_header = yes

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
# defer_unauth_destination
myhostname = mail.server.domain
mydomain = server.domain
myorigin = $mydomain
#alias_maps = hash:/etc/aliases
#alias_database = hash:/etc/aliases
#myorigin = /etc/mailname
mydestination = localhost
#,server.domain, mail.server.domain
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
#smtpd_sasl_authenticated_header = yes
smtpd_sasl_security_options = noanonymous
#smtpd_sasl_local_domain = 
#broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_sender_restrictions = reject_unknown_sender_domain
#mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/dovecot.conf -m "${EXTENSION}"
smtp_use_tls = yes
#smtpd_tls_received_header = yes
#smtpd_tls_mandatory_protocols = SSLv3, TLSv1
#smtpd_tls_mandatory_ciphers = medium
#smtpd_tls_auth_only = yes
tls_random_source = dev:/dev/urandom
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_uid_maps = static:999
virtual_gid_maps = static:999
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
local_recipient_maps =
virtual_mailbox_base = /home/mail
virtual_transport = $transport_maps
default_destination_recipient_limit = 1
#dovecot_destination_recipient_limit = 1
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf

Ну и сам лог сессии http://pastebin.com/zKudc48L

 

TheZ
()

Опять про SASL postfix+dovecot

Помогите спецы САСЛ'a)) Весь мозг сломал, не могу заставить работать SASL на Postfix 2.11.0 и Dovecot 2.2.9

Лог получается такой при попытке приема почты


Mar 14 16:41:28 mailserver postfix/smtpd[24977]: xsasl_dovecot_server_create: SASL service=smtp, realm=(null)
Mar 14 16:41:28 mailserver postfix/smtpd[24977]: name_mask: noanonymous
Mar 14 16:41:28 mailserver postfix/smtpd[24977]: xsasl_dovecot_server_connect: Connecting
Mar 14 16:41:38 mailserver postfix/smtpd[24977]: xsasl_dovecot_server_connect: auth reply: status
Mar 14 16:41:48 mailserver postfix/smtpd[24977]: fatal: no SASL authentication mechanisms
Mar 14 16:41:48 mailserver postfix/pipe[24980]: warning: unexpected end-of-input from dovecot socket while reading input attribute name
Mar 14 16:41:48 mailserver postfix/pipe[24980]: warning: deliver_request_get: error receiving common attributes
Mar 14 16:41:49 mailserver postfix/master[24972]: warning: process /usr/lib/postfix/smtpd pid 24977 exit status 1
Mar 14 16:41:49 mailserver postfix/master[24972]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling

master.cf

smtp      inet  n       -       -       -       -       smtpd -v

smtps     inet  n       -       -       -       -       smtpd
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes

#628       inet  n       -       -       -       -       qmqpd
pickup    unix  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
#qmgr     unix  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
rewrite   unix  -       -       -       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       -       -       -       smtp
relay     unix  -       -       -       -       -       smtp
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
retry     unix  -       -       -       -       -       error
discard   unix  -       -       -       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       -       -       -       lmtp
anvil     unix  -       -       -       -       1       anvil
scache    unix  -       -       -       -       1       scache

maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}


uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)


ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix	-	n	n	-	2	pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman   unix  -       n       n       -       -       pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}

dovecot   unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}

main.cf

debug_peer_list = domain.com
debug_peer_level = 2

alias_maps = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
alias_database = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf 

## определение transport ##
transport_maps = mysql:/etc/postfix/mysql-transport.cf

smtpd_banner = $myhostname ESMTP
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
queue_directory = /var/spool/postfix
readme_directory = no

# Настройка SMTP-клиента, отправляющего почту
smtp_tls_loglevel = 2
smtp_tls_CApath = /etc/ssl/certs

# TLS parameters
smtpd_tls_cert_file = /etc/ssl/mail2.domain.com.public.pem
smtpd_tls_key_file = /etc/ssl/mail2.domain.com.pem
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_tls_CApath = /etc/ssl/certs
smtpd_tls_loglevel = 2
smtpd_tls_received_header = yes

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = mail.domain.com
mydomain = domain.com
myorigin = $mydomain
#alias_maps = hash:/etc/aliases
#alias_database = hash:/etc/aliases
#myorigin = /etc/mailname
mydestination = localhost
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/dovecot
#smtpd_sasl_authenticated_header = yes
smtpd_sasl_security_options = noanonymous
#smtpd_sasl_local_domain = 
#broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination,permit_sasl_authenticated,permit
smtpd_sender_restrictions = reject_unknown_sender_domain
#mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/dovecot.conf -m "${EXTENSION}"
smtp_use_tls = yes
#smtpd_tls_received_header = yes
#smtpd_tls_mandatory_protocols = SSLv3, TLSv1
#smtpd_tls_mandatory_ciphers = medium
#smtpd_tls_auth_only = yes
tls_random_source = dev:/dev/urandom
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_uid_maps = static:999
virtual_gid_maps = static:999
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
local_recipient_maps =
virtual_mailbox_base = /home/mail
virtual_transport = $transport_maps
default_destination_recipient_limit = 1
#dovecot_destination_recipient_limit = 1

 , ,

TheZ
()

postfix не передает почту dovecot - need help

Ребят, второй день мучаюсь с проблемой :D Поставил Postfix пытаюсь прикрутить к нему Dovecot 2.2.9 и уткнулся в проблему что Postfix не передает почту для раcкладывания в Maildir а делает это сам в формате mbox просто скидывая её в папку указанную в virtual_mailbox_base

Мне видится что проблема в использовании параметра dovecot_destination_recipient_limit=1 тк у меня он просто не работает.

Вот как ругается на него postfix при старте

/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: dovecot_destination_recipient_limit=1

Полный конфиг Postfix

debug_peer_list = domain.com
debug_peer_level = 2
## определение псевдонимов ##
#alias_maps = hash:/etc/postfix/aliases
#alias_database = hash:/etc/postfix/aliases
alias_maps = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
alias_database = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf 

## определение transport ##
transport_maps = mysql:/etc/postfix/mysql-transport.cf
#transport_maps = hash:/etc/postfix/transport

# 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
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/dovecot/dovecot.pem
smtpd_tls_key_file = /etc/dovecot/private/dovecot.pem
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.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = mail.domain.com
mydomain = domain.com
myorigin = $mydomain
#alias_maps = hash:/etc/aliases
#alias_database = hash:/etc/aliases
#myorigin = /etc/mailname
mydestination = localhost
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_authenticated_header = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = 
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_sender_restrictions = reject_unknown_sender_domain
smtp_use_tls = yes
smtpd_tls_received_header = yes
smtpd_tls_mandatory_protocols = SSLv3, TLSv1
smtpd_tls_mandatory_ciphers = medium
smtpd_tls_auth_only = yes
tls_random_source = dev:/dev/urandom
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_uid_maps = static:999
virtual_gid_maps = static:999
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
local_recipient_maps =
virtual_mailbox_base = /home/mail
virtual_transport = dovecot
#default_destination_recipient_limit = 1
dovecot_destination_recipient_limit = 1

 ,

TheZ
()

iptables и несколько шлюзов

Ситуация следующая, есть два (IP1, IP2) шлюза в инет. И есть железка (IP3) подключенная к инету через IP2.

Задача: подключаться через IP1 к этой железке (IP3), по телнету и отправлять через него же пакеты обратно. У железки шлюз по умолчанию IP2, который менять нельзя.

С IP1 проброшен порт на IP2, с него на железку (IP3). Из инета пакеты доходят до IP3 через IP1 а потом IP2, но обратно железка отвечает через шлюз IP2.

Вопрос: какое правило написать в iptables на IP2 чтоб пакеты он отправлял с IP3:5000 не в инет, а на шлюз IP1?

 , ,

TheZ
()

Проблемы с маршрутизацией на шлюзе с debian

Уважаемы гуру подскажите в чем косяк может быть.. Есть сервак с ESX 5.1 на борту и подсеть для виртуалок. Для маршрутизации подсети поставлен шлюз на Debian 7.4 на шлюзе две сетевухи eth0, eth1

( ifconfig )

прописаны маршруты на шлюзе

( route -n )

разрешаем айпи форвардинг net.ipv4.ip_forward=1

Маршруты у виртуалки

route add -net xxx.xxx.xxx.0 netmask 255.255.255.0 eth0

route add default gw xxx.xxx.xxx.55 eth0

и вот теперь кульминация :) на клиентской машине с Ubuntu 12.04 LTS все работает нормально. С такого же Debian 7.4 доступ к виртуалке появляется только при пинге шлюза (xxx.xxx.xxx.55) на вируталке с Windows XP связи нет вобще :)

P.S. Прошу прощения за много текста, но использовать кат почему-то не получилось

 ,

TheZ
()

Москва в розыске Python программиста

Срочно ищем на интересный проект Python программиста для реализации функционала обменника электро валют. Работа с API платежных систем. Знание XML, Mongo.db, MySQL, Linux на уровне пользователя, JavaScript приветсвуется, плюсом будет навыки кроссбраузерной верстки в HTML5

Комфортный офис напротив Кремля, зарплата от 80тр по результатам собеседования, рабочий день с 10 до 19

Присылайте резюме на job(собачка)itsfiles(тчк)com или сразу звоните 926адынтриадын-4О-48 Вячеслав

 , , ,

TheZ
()

RSS подписка на новые темы