Skonfigurowałem pocztę za pomocą: https://rtcamp.com/tutorials/mail/serve ... ot-ubuntu/
Postfix+Dovecot+roundcube+vimbadmin, wszystko oparte o wirtualnych użytkowników. Na pokładzie Ubuntu 14, nginx, php-fpm, mysql no i reszta.
Na domenie przekierowałem rekord A na mój serwer, oraz rekord MX 10 domena.com.
Udało mi się stworzyć użytkownika za pomocą vimbadmina, zalogowałem się do roundcube, wysłałem maila na swoją skrzynkę gmail. Mail doszedł chociaż wylądował w spamie - czyli smtp działa. Odpowiedziałem na tego maila, mail nie pojawił mi się w skrzynce mojego serwera. Później próbowałem na ten adres wysłać maile i też nic.
Zrobiłem telnety portu 143 i 25 w odpowiedzi dostałem info o wersjach postfixa i dovecota.
w logach dovecota przy logowaniu do skrzynki przez roundcube mam takie coś:
Kod: Zaznacz cały
Sep 10 18:31:55 auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth
Sep 10 18:31:55 auth: Debug: Module loaded: /usr/lib/dovecot/modules/auth/libdriver_mysql.so
Sep 10 18:31:55 auth: Debug: Read auth token secret from /var/run/dovecot/auth-token-secret.dat
Sep 10 18:31:55 auth: Warning: sql: Ignoring changed iterate_query in /etc/dovecot/dovecot-sql.conf.ext, because userdb sql not used. (If this is intentional, set userdb_warning_disable=yes)
Sep 10 18:31:55 auth: Debug: auth client connected (pid=2128)
Sep 10 18:31:55 auth: Debug: client in: AUTH 1 PLAIN service=imap secured session=4g1DRLoCigB/AAABlip=127.0.0.1 rip=127.0.0.1 lport=143 rport=44170 resp=<hidden>
Sep 10 18:31:55 auth-worker(2133): Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth
Sep 10 18:31:55 auth-worker(2133): Debug: Module loaded: /usr/lib/dovecot/modules/auth/libdriver_mysql.so
Sep 10 18:31:55 auth-worker(2133): Debug: sql([email protected],127.0.0.1): query: SELECT username AS user, password, homedir AS userdb_home, uid AS userdb_uid, gid AS userdb_gid FROM mailbox WHERE username = '[email protected]'
Sep 10 18:31:55 auth: Debug: client passdb out: OK 1 [email protected]
Sep 10 18:31:55 auth: Debug: master in: REQUEST 1161035777 2128 1 48e4b21d57e1553f66272cc08da98ae8session_pid=2135 request_auth_token
Sep 10 18:31:55 auth: Debug: master userdb out: USER 1161035777 [email protected] uid=5000 gid=5000 home=/var/vmail/domena.com/admin auth_token=9620872dfa9c7f5e705fb8cd740b27d2c6b8bc3c
Sep 10 18:31:55 imap-login: Info: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=2135, secured, session=<4g1DRLoCigB/AAAB>
Sep 10 18:31:55 imap([email protected]): Debug: Effective uid=5000, gid=5000, home=/var/vmail/domena.com/admin
Sep 10 18:31:55 imap([email protected]): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/var/vmail/domena.com/admin
Sep 10 18:31:55 imap([email protected]): Debug: maildir++: root=/var/vmail/domena.com/admin, index=, indexpvt=, control=, inbox=/var/vmail/domena.com/admin, alt=
Sep 10 18:31:56 imap([email protected]): Info: Disconnected: Logged out in=29 out=466
Sep 10 18:31:56 auth: Debug: auth client connected (pid=2136)
Sep 10 18:31:56 auth: Debug: client in: AUTH 1 PLAIN service=imap secured session=BJpERLoCjAB/AAABlip=127.0.0.1 rip=127.0.0.1 lport=143 rport=44172 resp=<hidden>
Sep 10 18:31:56 auth-worker(2133): Debug: sql([email protected],127.0.0.1): query: SELECT username AS user, password, homedir AS userdb_home, uid AS userdb_uid, gid AS userdb_gid FROM mailbox WHERE username = '[email protected]'
Sep 10 18:31:56 auth: Debug: client passdb out: OK 1 [email protected]
Sep 10 18:31:56 auth: Debug: master in: REQUEST 2224160769 2136 1 5903587daa3a73d5fc2002ef82dd08e4session_pid=2137 request_auth_token
Sep 10 18:31:56 auth: Debug: master userdb out: USER 2224160769 [email protected] uid=5000 gid=5000 home=/var/vmail/domena.com/admin auth_token=2002c2ee16715db6d69270c27fc6399ebee129e9
Sep 10 18:31:56 imap-login: Info: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=2137, secured, session=<BJpERLoCjAB/AAAB>
Sep 10 18:31:56 imap([email protected]): Debug: Effective uid=5000, gid=5000, home=/var/vmail/domena.com/admin
Sep 10 18:31:56 imap([email protected]): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/var/vmail/domena.com/admin
Sep 10 18:31:56 imap([email protected]): Debug: maildir++: root=/var/vmail/domena.com/admin, index=, indexpvt=, control=, inbox=/var/vmail/domena.com/admin, alt=
Sep 10 18:31:56 imap([email protected]): Info: Disconnected: Logged out in=44 out=460
Sep 10 18:31:56 auth: Debug: auth client connected (pid=2138)
Sep 10 18:31:56 auth: Debug: client in: AUTH 1 PLAIN service=imap secured session=CJdORLoCjQB/AAABlip=127.0.0.1 rip=127.0.0.1 lport=143 rport=44173 resp=<hidden>
Sep 10 18:31:56 auth-worker(2133): Debug: sql([email protected],127.0.0.1): query: SELECT username AS user, password, homedir AS userdb_home, uid AS userdb_uid, gid AS userdb_gid FROM mailbox WHERE username = '[email protected]'
Sep 10 18:31:56 auth: Debug: client passdb out: OK 1 [email protected]
Sep 10 18:31:56 auth: Debug: master in: REQUEST 805568513 2138 1 b6c4dac4c846c6e1d20f7bef56e59535session_pid=2141 request_auth_token
Sep 10 18:31:56 auth: Debug: master userdb out: USER 805568513 [email protected] uid=5000 gid=5000 home=/var/vmail/domena.com/admin auth_token=716801d2f2ee3405d504a807f02636330f9b4c2f
Sep 10 18:31:56 imap-login: Info: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=2141, secured, session=<CJdORLoCjQB/AAAB>
Sep 10 18:31:56 imap([email protected]): Debug: Effective uid=5000, gid=5000, home=/var/vmail/domena.com/admin
Sep 10 18:31:56 imap([email protected]): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/var/vmail/domena.com/admin
Sep 10 18:31:56 imap([email protected]): Debug: maildir++: root=/var/vmail/domena.com/admin, index=, indexpvt=, control=, inbox=/var/vmail/domena.com/admin, alt=
Sep 10 18:31:56 auth: Debug: auth client connected (pid=2140)
Sep 10 18:31:56 auth: Debug: client in: AUTH 1 PLAIN service=imap secured session=crFORLoCjgB/AAABlip=127.0.0.1 rip=127.0.0.1 lport=143 rport=44174 resp=<hidden>
Sep 10 18:31:56 auth-worker(2133): Debug: sql([email protected],127.0.0.1): query: SELECT username AS user, password, homedir AS userdb_home, uid AS userdb_uid, gid AS userdb_gid FROM mailbox WHERE username = '[email protected]'
Sep 10 18:31:56 auth: Debug: client passdb out: OK 1 [email protected]
Sep 10 18:31:56 imap([email protected]): Info: Disconnected: Logged out in=50 out=469
Sep 10 18:31:56 auth: Debug: master in: REQUEST 1379794945 2140 1 0abfbf328a283b97406f3994c63b33e1session_pid=2142 request_auth_token
Sep 10 18:31:56 auth: Debug: master userdb out: USER 1379794945 [email protected] uid=5000 gid=5000 home=/var/vmail/domena.com/admin auth_token=7bf707f41bfaf13f9ef8fd3c3fbf6d2d308edae1
Sep 10 18:31:56 imap-login: Info: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=2142, secured, session=<crFORLoCjgB/AAAB>
Sep 10 18:31:56 imap([email protected]): Debug: Effective uid=5000, gid=5000, home=/var/vmail/domena.com/admin
Sep 10 18:31:56 imap([email protected]): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/var/vmail/domena.com/admin
Sep 10 18:31:56 imap([email protected]): Debug: maildir++: root=/var/vmail/domena.com/admin, index=, indexpvt=, control=, inbox=/var/vmail/domena.com/admin, alt=
Sep 10 18:31:56 imap([email protected]): Info: Disconnected: Logged out in=119 out=591
Kod: Zaznacz cały
Sep 10 19:02:38 http postfix/smtpd[2959]: warning: cannot get RSA certificate from file /etc/ssl/certs/dovecot.pem: disabling TLS support
Sep 10 19:02:38 http postfix/smtpd[2959]: warning: TLS library problem: error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('/etc/ssl/certs/dovecot.pem','r'):
Sep 10 19:02:38 http postfix/smtpd[2959]: warning: TLS library problem: error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:
Sep 10 19:02:38 http postfix/smtpd[2959]: warning: TLS library problem: error:140DC002:SSL routines:SSL_CTX_use_certificate_chain_file:system lib:ssl_rsa.c:722:
Sep 10 19:02:38 http postfix/smtpd[2959]: connect from mail-lb0-f179.google.com[209.85.217.179]
Sep 10 19:02:39 http postfix/cleanup[2962]: 3013924B60: message-id=<20140910190239.3013924B60@http>
Sep 10 19:02:39 http postfix/qmgr[1264]: 3013924B60: from=<double-bounce@http>, size=827, nrcpt=1 (queue active)
Sep 10 19:02:39 http postfix/smtpd[2959]: disconnect from mail-lb0-f179.google.com[209.85.217.179]
Sep 10 19:02:39 http postfix/trivial-rewrite[2963]: warning: do not list domain domena.com in BOTH mydestination and virtual_mailbox_domains
Sep 10 19:02:39 http postfix/local[2966]: 3013924B60: to=<[email protected]>, orig_to=<postmaster>, relay=local, delay=0.07, delays=0.04/0.01/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox)
Sep 10 19:02:39 http postfix/qmgr[1264]: 3013924B60: removed
Sep 10 19:03:05 http postfix/smtpd[2959]: connect from mail-lb0-f169.google.com[209.85.217.169]
Sep 10 19:03:05 http postfix/cleanup[2962]: AB92F24B60: message-id=<20140910190305.AB92F24B60@http>
Sep 10 19:03:05 http postfix/qmgr[1264]: AB92F24B60: from=<double-bounce@http>, size=827, nrcpt=1 (queue active)
Sep 10 19:03:05 http postfix/smtpd[2959]: disconnect from mail-lb0-f169.google.com[209.85.217.169]
Sep 10 19:03:05 http postfix/local[2966]: AB92F24B60: to=<[email protected]>, orig_to=<postmaster>, relay=local, delay=0.06, delays=0.03/0/0/0.03, dsn=2.0.0, status=sent (delivered to mailbox)
Sep 10 19:03:05 http postfix/qmgr[1264]: AB92F24B60: removed
Sep 10 19:06:25 http postfix/anvil[2961]: statistics: max connection rate 1/60s for (smtp:209.85.217.179) at Sep 10 19:02:38
Sep 10 19:06:25 http postfix/anvil[2961]: statistics: max connection count 1 for (smtp:209.85.217.179) at Sep 10 19:02:38
Sep 10 19:06:25 http postfix/anvil[2961]: statistics: max cache size 2 at Sep 10 19:03:05
Sep 10 19:19:23 http postfix/smtpd[3270]: warning: cannot get RSA certificate from file /etc/ssl/certs/dovecot.pem: disabling TLS support
Sep 10 19:19:23 http postfix/smtpd[3270]: warning: TLS library problem: error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('/etc/ssl/certs/dovecot.pem','r'):
Sep 10 19:19:23 http postfix/smtpd[3270]: warning: TLS library problem: error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:
Sep 10 19:19:23 http postfix/smtpd[3270]: warning: TLS library problem: error:140DC002:SSL routines:SSL_CTX_use_certificate_chain_file:system lib:ssl_rsa.c:722:
Sep 10 19:19:23 http postfix/smtpd[3270]: connect from mail-la0-f43.google.com[209.85.215.43]
Sep 10 19:19:24 http postfix/cleanup[3273]: 27E09213EE: message-id=<20140910191924.27E09213EE@http>
Sep 10 19:19:24 http postfix/smtpd[3270]: disconnect from mail-la0-f43.google.com[209.85.215.43]
Sep 10 19:19:24 http postfix/qmgr[1264]: 27E09213EE: from=<double-bounce@http>, size=824, nrcpt=1 (queue active)
Sep 10 19:19:24 http postfix/trivial-rewrite[3274]: warning: do not list domain domena.com in BOTH mydestination and virtual_mailbox_domains
Sep 10 19:19:24 http postfix/local[3277]: 27E09213EE: to=<[email protected]>, orig_to=<postmaster>, relay=local, delay=0.06, delays=0.03/0.01/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox)
Sep 10 19:19:24 http postfix/qmgr[1264]: 27E09213EE: removed
Sep 10 19:22:44 http postfix/anvil[3272]: statistics: max connection rate 1/60s for (smtp:209.85.215.43) at Sep 10 19:19:23
Sep 10 19:22:44 http postfix/anvil[3272]: statistics: max connection count 1 for (smtp:209.85.215.43) at Sep 10 19:19:23
Sep 10 19:22:44 http postfix/anvil[3272]: statistics: max cache size 1 at Sep 10 19:19:23
Sep 10 19:28:33 http postfix/pickup[1263]: 4841A24B5B: uid=1000 from=<ubuntu>
Sep 10 19:28:33 http postfix/cleanup[3430]: 4841A24B5B: message-id=<20140910192833.4841A24B5B@http>
Sep 10 19:28:33 http postfix/qmgr[1264]: 4841A24B5B: from=<[email protected]>, size=390, nrcpt=1 (queue active)
Sep 10 19:28:33 http postfix/trivial-rewrite[3431]: warning: do not list domain domena.com in BOTH mydestination and virtual_mailbox_domains
Sep 10 19:28:33 http postfix/local[3434]: 4841A24B5B: to=<[email protected]>, orig_to=<root>, relay=local, delay=0.09, delays=0.06/0.01/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox)
Sep 10 19:28:33 http postfix/qmgr[1264]: 4841A24B5B: removed
Sep 10 19:30:49 http postfix/pickup[1263]: 421C424B5B: uid=1000 from=<ubuntu>
Sep 10 19:30:49 http postfix/cleanup[3495]: 421C424B5B: message-id=<20140910193049.421C424B5B@http>
Sep 10 19:30:49 http postfix/qmgr[1264]: 421C424B5B: from=<[email protected]>, size=390, nrcpt=1 (queue active)
Sep 10 19:30:49 http postfix/trivial-rewrite[3496]: warning: do not list domain domena.com in BOTH mydestination and virtual_mailbox_domains
Sep 10 19:30:49 http postfix/local[3499]: 421C424B5B: to=<[email protected]>, orig_to=<root>, relay=local, delay=0.09, delays=0.06/0.01/0/0.03, dsn=2.0.0, status=sent (delivered to mailbox)
Sep 10 19:30:49 http postfix/qmgr[1264]: 421C424B5B: removed
Sep 10 19:31:42 http postfix/pickup[1263]: 943FE24B5B: uid=1000 from=<ubuntu>
Sep 10 19:31:42 http postfix/cleanup[3495]: 943FE24B5B: message-id=<20140910193142.943FE24B5B@http>
Sep 10 19:31:42 http postfix/qmgr[1264]: 943FE24B5B: from=<[email protected]>, size=390, nrcpt=1 (queue active)
Sep 10 19:31:42 http postfix/local[3499]: 943FE24B5B: to=<[email protected]>, orig_to=<root>, relay=local, delay=0.08, delays=0.05/0/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox)
Sep 10 19:31:42 http postfix/qmgr[1264]: 943FE24B5B: removed
Sep 10 19:33:13 http postfix/pickup[3647]: 4CE3F24B5B: uid=1000 from=<ubuntu>
Sep 10 19:33:13 http postfix/cleanup[3495]: 4CE3F24B5B: message-id=<20140910193313.4CE3F24B5B@http>
Sep 10 19:33:13 http postfix/qmgr[1264]: 4CE3F24B5B: from=<[email protected]>, size=390, nrcpt=1 (queue active)
Sep 10 19:33:13 http postfix/local[3499]: 4CE3F24B5B: to=<[email protected]>, orig_to=<root>, relay=local, delay=0.08, delays=0.05/0/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox)
Sep 10 19:33:13 http postfix/qmgr[1264]: 4CE3F24B5B: removed
postfix/main.cf:
Kod: Zaznacz cały
# 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 (Ubuntu)
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/ssl/certs/ssl-cert-snakeoil.pem
#smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.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
smtpd_tls_cert_file=/etc/ssl/certs/dovecot.pem
smtpd_tls_key_file=/etc/ssl/private/dovecot.pem
smtpd_use_tls=yes
#smtpd_tls_auth_only = yes
#Handle SMTP authentication using Dovecot
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions =
permit_sasl_authenticated,
permit_mynetworks,
reject_unauth_destination
# other destination domains should be handled using virtual domains
#mydomain = domena.com
#myhostname = debian
#mydestination = mail.domena.com, localhost
# using Dovecot's LMTP for mail delivery and giving it path to store mail
virtual_transport = lmtp:unix :p rivate/dovecot-lmtp
# virtual mailbox setups
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_alias_maps = mysql:/etc/postfix/mysql/virtual_alias_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql/virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql/virtual_mailbox_maps.cf
# 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 = http
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = domena.com, http, localhost.localdomain, 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
Pliki konfiguracyjne wyglądają tak samo jak w poradniku, jedynie zmieniłem hasła i ewentualnie podmieniłem na domena.com (moja zakupiona domena). Jeśli jednak potrzeba wkleić konfiguracje, chętnie ją udostępnię.
Zawsze korzystałem z hostingu shared. Jeśli już były to vpsy, jakiś admin konfigurował serwerek a ja zajmowałem się swoją robotą - jestem webdev :-) Jednak przyszła pora nauczyć się konfigurować chociaż podstawy i więcej niż lamp.
Prosiłbym o pomoc.
Dziękuje