[+] Postfix/Dovecot

Konfiguracja serwerów, usług, itp.
uh4
Posty: 26
Rejestracja: 27 grudnia 2012, 22:16

[+] Postfix/Dovecot

Post autor: uh4 »

Witam,
Mam problem z pocztą. Kombiuje.
Gdzieś mi się nie spina:
Robiłem według tej strony : http://www.howtoforge.com/perfect-serve ... spconfig-3


mail/log
Apr 25 11:40:02 budma24 postfix/smtps/smtpd[8842]: connect from localhost[::1]
Apr 25 11:40:02 budma24 postfix/smtps/smtpd[8842]: SSL_accept error from localhost[::1]: lost connection
Apr 25 11:40:02 budma24 postfix/smtps/smtpd[8842]: lost connection after CONNECT from localhost[::1]
Apr 25 11:40:02 budma24 postfix/smtps/smtpd[8842]: disconnect from localhost[::1]
Apr 25 11:40:02 budma24 dovecot: imap-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, session=<XTnyv9r3ZAAAAAAAAAAAAAAAAAAAAAAB>
Apr 25 11:40:02 budma24 dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, session=<hGXyv9r32wAAAAAAAAAAAAAAAAAAAAAB>
Apr 25 11:40:03 budma24 postfix/pickup[8781]: 57E9524C2FAD: uid=105 from=<smmsp>
Apr 25 11:40:03 budma24 postfix/cleanup[8992]: 57E9524C2FAD: message-id=<20140425094003.57E9524C2FAD@budma24.pl>
Apr 25 11:40:03 budma24 postfix/qmgr[8782]: 57E9524C2FAD: from=<smmsp@budma24.pl>, size=669, nrcpt=1 (queue active)
Apr 25 11:40:04 budma24 postfix/smtpd[8998]: connect from localhost[127.0.0.1]
Apr 25 11:40:04 budma24 postfix/smtpd[8998]: D97D124C2FAC: client=localhost[127.0.0.1]
Apr 25 11:40:04 budma24 postfix/cleanup[8992]: D97D124C2FAC: message-id=<20140425094003.57E9524C2FAD@budma24.pl>
Apr 25 11:40:04 budma24 postfix/qmgr[8782]: D97D124C2FAC: from=<smmsp@budma24.pl>, size=1087, nrcpt=1 (queue active)
Apr 25 11:40:04 budma24 postfix/smtpd[8998]: disconnect from localhost[127.0.0.1]
Apr 25 11:40:04 budma24 amavis[2435]: (02435-05) Passed CLEAN {RelayedInbound}, <smmsp@budma24.pl> -> <root@budma24.pl>, Message-ID: <20140425094003.57E9524C2FAD@budma24.pl>, mail_id: LZnX34kXrn2x, Hits: -0.001, size: 669, queued_as: D97D124C2FAC, 987 ms
Apr 25 11:40:04 budma24 postfix/smtp[8995]: 57E9524C2FAD: to=<root@budma24.pl>, orig_to=<root>, relay=127.0.0.1[127.0.0.1]:10024, delay=3, delays=2/0/0/0.99, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as D97D124C2FAC)
Apr 25 11:40:05 budma24 postfix/qmgr[8782]: 57E9524C2FAD: removed
Apr 25 11:40:05 budma24 postfix/local[8999]: D97D124C2FAC: to=<root@budma24.pl>, relay=local, delay=0.29, delays=0.05/0/0/0.23, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")
Apr 25 11:40:05 budma24 postfix/qmgr[8782]: D97D124C2FAC: removed
Apr 25 11:41:08 budma24 postfix/smtps/smtpd[8842]: connect from mail-ee0-f50.google.com[74.125.83.50]
Apr 25 11:45:02 budma24 dovecot: imap-login: Disconnected (disconnected before greeting, waited 0 secs): user=<>, rip=::1, lip=::1, secured, session=<8rXa0dr3wQAAAAAAAAAAAAAAAAAAAAAB>
Apr 25 11:45:02 budma24 postfix/smtps/smtpd[9222]: connect from localhost[::1]
Apr 25 11:45:02 budma24 postfix/smtps/smtpd[9222]: SSL_accept error from localhost[::1]: lost connection
Apr 25 11:45:02 budma24 postfix/smtps/smtpd[9222]: lost connection after CONNECT from localhost[::1]
Apr 25 11:45:02 budma24 postfix/smtps/smtpd[9222]: disconnect from localhost[::1]
Apr 25 11:45:02 budma24 dovecot: pop3-login: Disconnected (no auth attempts in 0 secs): user=<>, rip=::1, lip=::1, secured, session=<RIbc0dr3OAAAAAAAAAAAAAAAAAAAAAAB>
Apr 25 11:45:54 budma24 postfix/smtps/smtpd[9222]: connect from mail-ee0-f51.google.com[74.125.83.51]
Apr 25 11:46:08 budma24 postfix/smtps/smtpd[8842]: SSL_accept error from mail-ee0-f50.google.com[74.125.83.50]: Connection timed out
Apr 25 11:46:08 budma24 postfix/smtps/smtpd[8842]: lost connection after CONNECT from mail-ee0-f50.google.com[74.125.83.50]
Apr 25 11:46:08 budma24 postfix/smtps/smtpd[8842]: disconnect from mail-ee0-f50.google.com[74.125.83.50]
dovecot -n
root@budma24:/var/log# dovecot -n
# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-042stab085.20 i686 Debian 7.4
auth_mechanisms = plain login
disable_plaintext_auth = no
listen = *,[::]
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_privileged_group = vmail
passdb {
args = /etc/dovecot/dovecot-sql.conf
driver = sql
}
plugin {
quota = dict:user::file:/var/vmail/%d/%n/.quotausage
sieve = /var/vmail/%d/%n/.sieve
}
protocols = imap pop3
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
unix_listener auth-userdb {
group = vmail
mode = 0600
user = vmail
}
user = root
}
service imap-login {
client_limit = 1000
process_limit = 500
}
ssl_cert = </etc/postfix/smtpd.cert
ssl_key = </etc/postfix/smtpd.key
userdb {
args = /etc/dovecot/dovecot-sql.conf
driver = sql
}
protocol imap {
mail_plugins = quota imap_quota
}
protocol pop3 {
mail_plugins = quota
pop3_uidl_format = %08Xu%08Xv
}
protocol lda {
mail_plugins = sieve quota
}
postfix
root@budma24:~# cat /etc/postfix/main.cf
# 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 = /usr/share/doc/postfix


# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.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 = budma24.pl
alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
myorigin = /etc/mailname
mydestination = budma24.pl, localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
html_directory = /usr/share/doc/postfix/html
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf, hash:/var/lib/mailman/data/virtual-mailman
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /var/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
inet_protocols = all
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_tls_security_level = may
transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks
smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
smtpd_client_message_rate_limit = 100
maildrop_destination_concurrency_limit = 1
maildrop_destination_recipient_limit = 1
virtual_transport = dovecot
header_checks = regexp:/etc/postfix/header_checks
mime_header_checks = regexp:/etc/postfix/mime_header_checks
nested_header_checks = regexp:/etc/postfix/nested_header_checks
body_checks = regexp:/etc/postfix/body_checks
owner_request_special = no
smtp_tls_security_level = may
dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
message_size_limit = 0
hostname i hosts
root@broot@budma24:~# cat /etc/hostname
budma24.pl


budma24:~# cat /etc/hostname
budma24.pl
root@budma24:~# cat /etc/hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
#fe00::0 ip6-localnet
#ff00::0 ip6-mcastprefix
#ff02::1 ip6-allnodes
#ff02::2 ip6-allrouters


127.0.0.2 localhost.localdomain localhost budma24 budma24.pl
# Auto-generated hostname. Please do not remove this comment.
185.49.12.237 budma24.pl budma24
#::1 localhost ip6-localhost ip6-loopback
::1 localhost ip6-localhost ip6-loopback


uh4
Posty: 26
Rejestracja: 27 grudnia 2012, 22:16

Post autor: uh4 »

OK, działa
Trzeba było w master.cf odhaszować 2 linijki smtpd i submissions
ODPOWIEDZ