Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!

Ogłoszenie

Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.

#1  2012-04-29 02:24:47

  Alkifron - Użytkownik

Alkifron
Użytkownik
Zarejestrowany: 2012-04-22

Postfix mysql dovecot - nie dociera poczta

Witam


System to Debian Squeeze. Mam problem z serwerem pocztowym. Serwer Postfix do tego jest baza MySQL gdzie są umieszczani użytkownicy i domeny + dovecot. Mogę połączyć się na port 25 mogę również na 110 problem polega na tym że maile nie docierają i nie wiem gdzie jest błąd. Są to przykłady z testów, nie ma reguł dla iptables wszystko jest w sieci lokalnej. Port 110

Kod:

# telnet localhost 110 
Trying 127.0.0.1... 
Connected to localhost. 
Escape character is '^]'. 
+OK Welcome. I’m ready … 
user andy@mojadomena.pl 
+OK 
pass haslo 
Logged in. 
list 
+OK 0 messages:

Na port 25 również mogę się połączyć i wysłać maila

Kod:

mail from: root@mojadomena.pl
250 2.1.0 Ok
rcpt to: andy@mojadomena.pl
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
Subject: mail testowy
test
.
250 2.0.0 Ok: queued as A912CBACD
quit
221 2.0.0 Bye

Zainstalowałem roundcub'a mogę się do niego zalogować na użytkownika, który jest w bazie, ale poczty brak.

Po wysłaniu każdego maila w logach mail.log jest coś takiego:

Kod:

Apr 29 01:27:18 mail postfix/pickup[1581]: 326B9CCB: uid=0 from=<root>
Apr 29 01:27:18 mail postfix/cleanup[3963]: 326B9CCB: message-id=<20120428232718.326B9CCB@mojadomena.pl>
Apr 29 01:27:18 mail postfix/qmgr[1582]: 326B9CCB: from=<root@mojadomena.pl>, size=285, nrcpt=1 (queue active)
Apr 29 01:27:18 mail postfix/local[3966]: 326B9CCB: to=<andy@mojadomena.pl>, relay=local, delay=0.02, delays=0.01/0/0/0.01, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")
Apr 29 01:27:18 mail postfix/qmgr[1582]: 326B9CCB: removed

Postfix main.cf

Kod:

# 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 = mail

alias_maps = hash:/etc/aliases

alias_database = hash:/etc/aliases

myorigin = /etc/mailname

mydestination = $mydomain, $myhostname, localhost, localhost.mojadomena.pl

relayhost = 
mynetworks = 192.168.1.0/24 127.0.0.0/8

mailbox_command = procmail -a "$EXTENSION"

mailbox_size_limit = 0

recipient_delimiter = +

inet_interfaces = all

html_directory = /usr/share/doc/postfix/html

mydomain = mojadomena.pl

message_size_limit = 30720000

virtual_alias_domains = 

virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf

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 = /home/vmail

virtual_uid_maps = static:5000

virtual_gid_maps = static:5000

smtpd_sasl_auth_enable = yes

broken_sasl_auth_clients = yes

smtpd_sasl_authenticated_header = yes

smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination

virtual_create_maildirsize = yes

virtual_maildir_extended = yes

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 $virtual_mailbox_limit_maps

virtual_transport = dovecot

dovecot_destination_recipient_limit = 1

postfix master.cf


Kod:

#

# Postfix master process configuration file.  For details on the format

# of the file, see the master(5) manual page (command: "man 5 master").

#

# Do not forget to execute "postfix reload" after editing this file.

#

# ==========================================================================

# service type  private unpriv  chroot  wakeup  maxproc command + args

#               (yes)   (yes)   (yes)   (never) (100)

# ==========================================================================

smtp      inet  n       -       -       -       -       smtpd

#submission inet n       -       -       -       -       smtpd

#  -o smtpd_tls_security_level=encrypt

#  -o smtpd_sasl_auth_enable=yes

#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject

#  -o milter_macro_daemon_name=ORIGINATING

#smtps     inet  n       -       -       -       -       smtpd

#  -o smtpd_tls_wrappermode=yes

#  -o smtpd_sasl_auth_enable=yes

#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject

#  -o milter_macro_daemon_name=ORIGINATING

#628       inet  n       -       -       -       -       qmqpd

pickup    fifo  n       -       -       60      1       pickup

cleanup   unix  n       -       -       -       0       cleanup

qmgr      fifo  n       -       n       300     1       qmgr

#qmgr     fifo  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

# When relaying mail as backup MX, disable fallback_relay to avoid MX loops

relay     unix  -       -       -       -       -       smtp

    -o smtp_fallback_relay=

#       -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

#

# ====================================================================

# Interfaces to non-Postfix software. Be sure to examine the manual

# pages of the non-Postfix software to find out what options it wants.

#

# Many of the following services use the Postfix pipe(8) delivery

# agent.  See the pipe(8) man page for information about ${recipient}

# and other message envelope options.

# ====================================================================

#

# maildrop. See the Postfix MAILDROP_README file for details.

# Also specify in main.cf: maildrop_destination_recipient_limit=1

#

maildrop  unix  -       n       n       -       -       pipe

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

#

# ====================================================================

#

# Recent Cyrus versions can use the existing "lmtp" master.cf entry.

#

# Specify in cyrus.conf:

#   lmtp    cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4

#

# Specify in main.cf one or more of the following:

#  mailbox_transport = lmtp:inet:localhost

#  virtual_transport = lmtp:inet:localhost

#

# ====================================================================

#

# Cyrus 2.1.5 (Amos Gouaux)

# Also specify in main.cf: cyrus_destination_recipient_limit=1

#

#cyrus     unix  -       n       n       -       -       pipe

#  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}

#

# ====================================================================

# Old example of delivery via Cyrus.

#

#old-cyrus unix  -       n       n       -       -       pipe

#  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}

#

# ====================================================================

#

# See the Postfix UUCP_README file for configuration details.

#

uucp      unix  -       n       n       -       -       pipe

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

#

# Other external delivery methods.

#

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 -d ${recipient}

dovecot.conf

Kod:

protocols = imap imaps pop3 pop3s

log_timestamp = "%Y-%m-%d %H:%M:%S "

mail_location = maildir:/home/vmail/%d/%n/Maildir



ssl_cert_file = /etc/ssl/certs/dovecot.pem

ssl_key_file = /etc/ssl/private/dovecot.pem



namespace private {

    separator = .

    prefix = INBOX.

    inbox = yes

}



protocol lda {

    log_path = /home/vmail/dovecot-deliver.log

    auth_socket_path = /var/run/dovecot/auth-master

    postmaster_address = root@mojadomena.pl

    mail_plugins = sieve

    global_script_path = /home/vmail/globalsieverc

}



protocol pop3 {

    pop3_uidl_format = %08Xu%08Xv

}



auth default {

    user = root



    passdb sql {

        args = /etc/dovecot/dovecot-sql.conf

    }



    userdb static {

        args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes

    }



    socket listen {

        master {

            path = /var/run/dovecot/auth-master

            mode = 0600

            user = vmail

        }



        client {

            path = /var/spool/postfix/private/auth

            mode = 0660

            user = postfix

            group = postfix

        }

    }

}

Może jestem ślepy, ale nie wiem co jest nie tak.

Offline

 

Stopka forum

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
Możesz wyłączyć AdBlock — tu nie ma reklam ;-)

[ Generated in 0.007 seconds, 9 queries executed ]

Informacje debugowania

Time (s) Query
0.00012 SET CHARSET latin2
0.00005 SET NAMES latin2
0.00057 SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='3.137.218.220' WHERE u.id=1
0.00072 UPDATE punbb_online SET logged=1716129043 WHERE ident='3.137.218.220'
0.00025 SELECT * FROM punbb_online WHERE logged<1716128743
0.00084 SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=21178 AND t.moved_to IS NULL
0.00008 SELECT search_for, replace_with FROM punbb_censoring
0.00175 SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=21178 ORDER BY p.id LIMIT 0,25
0.00076 UPDATE punbb_topics SET num_views=num_views+1 WHERE id=21178
Total query time: 0.00514 s