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!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Witam.
Mam problem z konfigurowanie postfixa i dovecot`a.
Sprawa wygląda tak, chcę zakładać tylko konta wirtualne (nie systemowe). Autoryzacja działa.
Wysyłać emaile mogę bezproblemowo, gorzej jest z odbieraniem.
Wydaje mi się, że nie mogę zmusić postfixa do używania maildir.
Config postfixa:
smtpd_banner = $myhostname ESMTP $mail_name (Debek) biff = no append_dot_mydomain = no myhostname = mail.wefer.pl mydomain = wefer.pl myorigin = /etc/mailname mydestination = $myhostname, localhost.$mydomain, localhost relayhost = home_mailbox = Maildir/ mail_spool_directory = /home/ebox mynetworks = 127.0.0.0/8 192.168.1.0/24 #mailbox_command = /usr/bin/procmail -a "DOMAIN" mailbox_command = /usr/bin/procmail -a "$EXTENSION" #DEFAULT=/var/spool/vmail/Maildir/ MAILDIR=/var/spool/vmail/Maildir mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all inet_protocols = all message_size_limit = 15000000 # Restrykcje antyspamowe smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination # Tablice odwzorowań Postfiksa #sender_canonical_maps = hash:/etc/postfix/sender_canonical_maps virtual_mailbox_domains = wefer.pl virtual_mailbox_base = /home/ebox/ virtual_mailbox_maps = hash:/etc/postfix/virtual_mailbox_maps virtual_alias_maps = hash:/etc/postfix/virtual_alias_maps virtual_minimum_uid = 100 virtual_uid_maps = static:10000 virtual_gid_maps = static:10000 alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases # Szyfrowanie TLS smtpd_tls_auth_only = no smtp_use_tls = yes smtpd_use_tls = yes smtp_tls_note_starttls_offer = yes smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem smtpd_tls_loglevel = 1 smtpd_tls_received_header = yes smtpd_tls_session_cache_timeout = 3600s tls_random_source = dev:/dev/urandom # Uwierzytelnianie SASL smtpd_sasl_local_domain = smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous broken_sasl_auth_clients = yes # Dovecot SASL configuration for the Postfix SMTP server smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth
Config dovecot:
default_mail_env = maildir:~ protocols = imap imaps pop3 pop3s mail_privileged_group = mail listen = * log_timestamp = "%Y-%m-%d %H:%M:%S " log_path=/var/log/dovecot.log auth_debug = yes disable_plaintext_auth = no protocol imap { login_executable = /usr/lib/dovecot/imap-login } protocol pop3 { login_executable = /usr/lib/dovecot/pop3-login pop3_uidl_format = %08Xu%08Xv } auth default { mechanisms = plain login digest-md5 passdb passwd-file { args = /etc/dovecot/vmail/passdb } userdb passwd-file { args = /etc/dovecot/vmail/userdb } user = root socket listen { client { path = /var/spool/postfix/private/auth mode = 0660 user = postfix group = postfix } } } ssl_disable = no ssl_cert_file = /etc/postfix/ssl/smtpd.crt ssl_key_file = /etc/postfix/ssl/smtpd.key ssl_parameters_regenerate = 168 verbose_ssl = no
Wygląda to tak:
Gdy wyśle email na moją skrzynke to postfix stworzy plik z nazwą mojego usera i email zostanie tam zapisany.
Wtedy mail.log wyświetla:
Apr 23 17:22:38 japong postfix/smtpd[20165]: connect from xion.pl[88.198.33.4] Apr 23 17:22:39 japong postfix/smtpd[20165]: F410122A8B: client=xion.pl[88.198.33.4] Apr 23 17:22:39 japong postfix/cleanup[20169]: F410122A8B: message-id=<86637299e99796578e24c955cc5004c3@mail.xion.pl> Apr 23 17:22:39 japong postfix/smtpd[20165]: disconnect from xion.pl[88.198.33.4] Apr 23 17:22:39 japong postfix/qmgr[20159]: F410122A8B: from=<bocian@xion.pl>, size=1090, nrcpt=1 (queue active) Apr 23 17:22:39 japong postfix/virtual[20161]: F410122A8B: to=<bocian@wefer.pl>, relay=virtual, delay=0.12, delays=0.12/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox) Apr 23 17:22:39 japong postfix/qmgr[20159]: F410122A8B: removed
Natomiast gdy chcę odczytać tego emaila przez np. Thunderbird to dovecot wyrzuca takie logi:
dovecot: 2008-04-23 17:24:56 Info: auth(default): client in: AUTH 1 PLAIN service=POP3 secured lip=87.105.212.79 rip=192.168.1.2 resp=<hidden> dovecot: 2008-04-23 17:24:56 Info: auth(default): client out: CONT 1 dovecot: 2008-04-23 17:24:56 Info: auth(default): client in: CONT<hidden> dovecot: 2008-04-23 17:24:56 Info: auth(default): client out: OK 1 user=bocian dovecot: 2008-04-23 17:24:56 Info: auth(default): master in: REQUEST 1 20079 1 dovecot: 2008-04-23 17:24:56 Info: auth(default): master out: USER 1 bocian uid=10000 gid=10000 home=/home/ebox/wefer.pl/bocian/ dovecot: 2008-04-23 17:24:56 Info: pop3-login: Login: user=<bocian>, method=PLAIN, rip=192.168.1.2, lip=87.105.212.79, TLS dovecot: 2008-04-23 17:24:56 Error: stat(/home/ebox/wefer.pl/bocian/) failed: Not a directory dovecot: 2008-04-23 17:24:56 Error: POP3(bocian): lstat(/home/ebox/wefer.pl/bocian/cur) failed: Not a directory dovecot: 2008-04-23 17:24:56 Error: POP3(bocian): lstat(/home/ebox/wefer.pl/bocian/cur) failed: Not a directory dovecot: 2008-04-23 17:24:56 Error: POP3(bocian): Couldn't open INBOX: Internal error occurred. Refer to server log for more information. [2008-04-23 17:24:56] dovecot: 2008-04-23 17:24:56 Info: POP3(bocian): No INBOX for user top=0/0, retr=0/0, del=0/0, size=0
(skasowałem plik od usera)
Natomiast robiąc odwrotnie (najpierw odczytuje swoje emaile), dovecot tworzy katalog dla usera, a gdy wyśle email na moją skrzynke to postfix zwróci takie logi:
Apr 23 17:28:31 japong postfix/smtpd[20179]: connect from xion.pl[88.198.33.4] Apr 23 17:28:31 japong postfix/smtpd[20179]: 7990022AE3: client=xion.pl[88.198.33.4] Apr 23 17:28:31 japong postfix/cleanup[20182]: 7990022AE3: message-id=<e3670b55a19b53be3a086f2a29ab07a8@mail.xion.pl> Apr 23 17:28:31 japong postfix/smtpd[20179]: disconnect from xion.pl[88.198.33.4] Apr 23 17:28:31 japong postfix/qmgr[20159]: 7990022AE3: from=<bocian@xion.pl>, size=1096, nrcpt=1 (queue active) Apr 23 17:28:31 japong postfix/virtual[20183]: 7990022AE3: to=<bocian@wefer.pl>, relay=virtual, delay=0.14, delays=0.1/0.02/0/0.02, dsn=4.2.0, status=deferred (delivery failed to mailbox /home/ebox//wefer.pl/bocian: cannot open file: Is a directory)
Czy ktoś wie jak rozwiązać ten problem ?
Ostatnio edytowany przez djinn (2008-04-23 17:23:25)
Offline
Spróbuj zamienić wpis
default_mail_env = maildir:~
na
mail_location = maildir:/home/ebox/%d/%n
Offline
Emaile dochodza, są zapisywane w jednym pliku. Natomiast gdy chcem odczytac emaile dovecot wyrzuca mi bledy takie jak poprzednio.
Ostatnio edytowany przez djinn (2008-05-06 01:08:33)
Offline
Dlaczego sa takie duze:
virtual_uid_maps = static:10000 virtual_gid_maps = static:10000
Wiesz o tym ze to jest UID i GID na jakim pracuje postfix prawda ?
Offline
hm, w sumie to nie wiedzialem.
U mnie jest to uid z jakim sa tworzeni virtualni userzy. Do grupy dodalem postfixa i dovecota.
Offline
Witam ponownie.
Problem jest teraz nastepujacy:
Jak zrobic zeby dovecot odczytywal emaile z podanego mu katalogu.
w confie mam wpisane:
mail_location = maildir:/home/ebox/%d/%n
Niestety dovecot przeszukuje katalog /home/ebox/nazwa_usera
Pomija %d. Problem jest rozwiazany jezeli wpisze np. mail_location = maildir:/home/ebox/nazwa_domeny/%u, ale nie zadowala mnie to, gdyz uzywam kilku domen.
EDIT:
rozwiazane, nazwa konta nie mogla byc dupa, musialem tworzyc dupa@domena.pl, wtedy %d dziala :)
Ostatnio edytowany przez djinn (2008-07-31 14:55:10)
Offline
Time (s) | Query |
---|---|
0.00010 | SET CHARSET latin2 |
0.00006 | SET NAMES latin2 |
0.00115 | 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='18.117.78.87' WHERE u.id=1 |
0.00085 | UPDATE punbb_online SET logged=1732219782 WHERE ident='18.117.78.87' |
0.00041 | SELECT * FROM punbb_online WHERE logged<1732219482 |
0.00056 | SELECT topic_id FROM punbb_posts WHERE id=95757 |
0.00103 | SELECT id FROM punbb_posts WHERE topic_id=11275 ORDER BY posted |
0.00061 | 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=11275 AND t.moved_to IS NULL |
0.00005 | SELECT search_for, replace_with FROM punbb_censoring |
0.00074 | 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=11275 ORDER BY p.id LIMIT 0,25 |
0.00077 | UPDATE punbb_topics SET num_views=num_views+1 WHERE id=11275 |
Total query time: 0.00633 s |