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 Fundację Dzieciom „Zdążyć z Pomocą”.
Więcej informacji na dug.net.pl/pomagamy/.

#1 2017-11-27 18:00:37

hubot
Użytkownik
Zarejestrowany: 2017-04-13

postfix i dovecot nie wysyła ani nie odbiera wiadomości

Przy próbie wysłania wiadomości do samego siebie otrzymuję następujący błąd:

Kod:

An error occurred while sending mail. The mail server responded:  
4.3.0 <user@example.com>: Temporary lookup failure.
 Please check the message recipient "user@example.com" and try again

Próba wysłania maila na moje główne konto pocztowe do odzyskiwania hasła również się nie udaje. Tak samo nie jestem w stanie odebrać wiadomości wysłanych na pocztę user@example.com z mojego głównego konta pocztowego.

/var/log/mail.log:

Kod:

Nov 27 17:45:02 example postfix/lmtp[15150]: 1B282428F5: to=<user@example.com>, orig_to=<root>, relay=mail.example.com[private/dovecot-lmtp], delay=0.16, delays=0.04/0.02/0.08/0.02, dsn=2.0.0, status=sent (250 2.0.0 <user@example.com> gPCrDA5BHFowOwAA0j1nSg Saved)
Nov 27 17:45:02 example dovecot: lmtp(user@example.com): gPCrDA5BHFowOwAA0j1nSg: msgid=<20171127164502.1B282428F5@mail.example.com>: saved mail to INBOX
Nov 27 17:45:02 example postfix/qmgr[11494]: 1B282428F5: removed
Nov 27 17:45:02 example dovecot: lmtp(15152): Disconnect from local: Successful quit
Nov 27 17:45:02 example dovecot: lmtp(user@example.com): wfQWDg5BHFoyOwAA0j1nSg: msgid=<20171127164502.1E955403DE@mail.example.com>: saved mail to INBOX
Nov 27 17:45:02 example postfix/lmtp[15153]: 1E955403DE: to=<user@example.com>, orig_to=<root>, relay=mail.example.com[private/dovecot-lmtp], delay=0.18, delays=0.05/0.04/0.06/0.02, dsn=2.0.0, status=sent (250 2.0.0 <user@example.com> wfQWDg5BHFoyOwAA0j1nSg Saved)
Nov 27 17:45:02 example dovecot: lmtp(15154): Disconnect from local: Successful quit
Nov 27 17:45:02 example postfix/qmgr[11494]: 1E955403DE: removed
Nov 27 17:45:51 example postfix/anvil[15060]: statistics: max connection rate 1/60s for (smtp:196.38.89.85) at Nov 27 17:42:30
Nov 27 17:45:51 example postfix/anvil[15060]: statistics: max connection count 1 for (smtp:196.38.89.85) at Nov 27 17:42:30
Nov 27 17:45:51 example postfix/anvil[15060]: statistics: max cache size 1 at Nov 27 17:42:30
Nov 27 17:47:23 example postfix/proxymap[15191]: error: open /etc/postfix/pgsql-boxes.cf: Permission denied
Nov 27 17:47:23 example postfix/proxymap[15191]: error: open /etc/postfix/pgsql-aliases.cf: Permission denied
Nov 27 17:47:24 example postfix/smtpd[15190]: warning: hostname 123.188.142.83.hornet.pl does not resolve to address 83.142.188.123: Name or service not known
Nov 27 17:47:24 example postfix/smtpd[15190]: connect from unknown[83.142.188.123]
Nov 27 17:47:24 example postfix/proxymap[15191]: warning: pgsql:/etc/postfix/pgsql-boxes.cf is unavailable. open /etc/postfix/pgsql-boxes.cf: Permission denied
Nov 27 17:47:24 example postfix/smtpd[15190]: warning: proxy:pgsql:/etc/postfix/pgsql-boxes.cf lookup error for "user@example.com"
Nov 27 17:47:24 example postfix/smtpd[15190]: NOQUEUE: reject: RCPT from unknown[83.142.188.123]: 451 4.3.0 <user@example.com>: Temporary lookup failure; from=<user@example.com> to=<user@example.com> proto=ESMTP helo=<[192.168.1.100]>
Nov 27 17:49:05 example postfix/smtpd[15190]: lost connection after RCPT from unknown[83.142.188.123]
Nov 27 17:49:05 example postfix/smtpd[15190]: disconnect from unknown[83.142.188.123] ehlo=2 starttls=1 auth=1 mail=1 rcpt=0/1 commands=5/6
Nov 27 17:50:01 example postfix/pickup[14841]: 2D414403E2: uid=0 from=<root>
Nov 27 17:50:01 example postfix/cleanup[15273]: 2D414403E2: message-id=<20171127165001.2D414403E2@mail.example.com>
Nov 27 17:50:01 example postfix/qmgr[11494]: 2D414403E2: from=<root@example.com>, size=630, nrcpt=1 (queue active)
Nov 27 17:50:01 example dovecot: lmtp(15277): Connect from local
Nov 27 17:50:01 example dovecot: lmtp(user@example.com): pOHwDjlCHFqtOwAA0j1nSg: msgid=<20171127165001.2D414403E2@mail.example.com>: saved mail to INBOX
Nov 27 17:50:01 example postfix/lmtp[15276]: 2D414403E2: to=<user@example.com>, orig_to=<root>, relay=mail.example.com[private/dovecot-lmtp], delay=0.11, delays=0.02/0.02/0.04/0.02, dsn=2.0.0, status=sent (250 2.0.0 <user@example.com> pOHwDjlCHFqtOwAA0j1nSg Saved)
Nov 27 17:50:01 example dovecot: lmtp(15277): Disconnect from local: Successful quit
Nov 27 17:50:01 example postfix/qmgr[11494]: 2D414403E2: removed
root@example:~# tail -f /var/log/mail.log
Nov 27 17:53:37 example postfix/smtpd[15332]: disconnect from unknown[221.121.148.77] commands=0/0
Nov 27 17:53:56 example postfix/smtpd[15323]: warning: hostname 123.188.142.83.hornet.pl does not resolve to address 83.142.188.123: Name or service not known
Nov 27 17:53:56 example postfix/smtpd[15323]: connect from unknown[83.142.188.123]
Nov 27 17:53:56 example postfix/smtpd[15323]: C0D8D403DA: client=unknown[83.142.188.123], sasl_method=PLAIN, sasl_username=user@example.com
Nov 27 17:53:56 example postfix/cleanup[15345]: C0D8D403DA: message-id=<65f32aec-0fe3-67fb-5ff9-0a92a84e0f84@example.com>
Nov 27 17:53:56 example postfix/qmgr[11494]: C0D8D403DA: from=<user@example.com>, size=615, nrcpt=1 (queue active)
Nov 27 17:53:56 example postfix/smtpd[15323]: disconnect from unknown[83.142.188.123] ehlo=2 starttls=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=8
Nov 27 17:53:57 example dovecot: imap(user@example.com): Connection closed (IDLE running for 0.001 + waiting input for 0.002 secs, 2 B in + 10+0 B out, state=wait-input) in=1702 out=3426
Nov 27 17:53:58 example postfix/smtp[15346]: C0D8D403DA: to=<hubot@mail.com>, relay=mx00.mail.com[74.208.5.20]:25, delay=2.2, delays=0.09/0.01/0.63/1.5, dsn=2.0.0, status=sent (250 Requested mail action okay, completed: id=0MHHV7-1eOdaX0SJf-00E5gp)
Nov 27 17:53:58 example postfix/qmgr[11494]: C0D8D403DA: removed
Nov 27 17:54:05 example dovecot: imap-login: Login: user=<user@example.com>, method=PLAIN, rip=83.142.188.123, lip=moj-ip, mpid=15350, TLS, session=<slUSwPleoKdTjrx7>
Nov 27 17:54:05 example dovecot: imap(user@example.com): Warning: autocreate plugin is deprecated, use mailbox { auto } setting instead
Nov 27 17:55:01 example postfix/pickup[14841]: 4C616403E2: uid=0 from=<root>
Nov 27 17:55:01 example postfix/cleanup[15345]: 4C616403E2: message-id=<20171127165501.4C616403E2@mail.example.com>
Nov 27 17:55:01 example postfix/qmgr[11494]: 4C616403E2: from=<root@example.com>, size=630, nrcpt=1 (queue active)
Nov 27 17:55:01 example postfix/pickup[14841]: 4E913403DA: uid=0 from=<root>
Nov 27 17:55:01 example postfix/cleanup[15345]: 4E913403DA: message-id=<20171127165501.4E913403DA@mail.example.com>
Nov 27 17:55:01 example postfix/qmgr[11494]: 4E913403DA: from=<root@example.com>, size=661, nrcpt=1 (queue active)
Nov 27 17:55:01 example dovecot: lmtp(15419): Connect from local
Nov 27 17:55:01 example dovecot: lmtp(15421): Connect from local
Nov 27 17:55:01 example postfix/lmtp[15417]: 4C616403E2: to=<user@example.com>, orig_to=<root>, relay=mail.example.com[private/dovecot-lmtp], delay=0.14, delays=0.02/0.03/0.06/0.03, dsn=2.0.0, status=sent (250 2.0.0 <user@example.com> phodGGVDHFo7PAAA0j1nSg Saved)
Nov 27 17:55:01 example dovecot: lmtp(user@example.com): phodGGVDHFo7PAAA0j1nSg: msgid=<20171127165501.4C616403E2@mail.example.com>: saved mail to INBOX
Nov 27 17:55:01 example postfix/qmgr[11494]: 4C616403E2: removed
Nov 27 17:55:01 example dovecot: lmtp(15419): Disconnect from local: Successful quit
Nov 27 17:55:01 example dovecot: lmtp(user@example.com): /QVwGWVDHFo9PAAA0j1nSg: msgid=<20171127165501.4E913403DA@mail.example.com>: saved mail to INBOX
Nov 27 17:55:01 example postfix/lmtp[15420]: 4E913403DA: to=<user@example.com>, orig_to=<root>, relay=mail.example.com[private/dovecot-lmtp], delay=0.15, delays=0.02/0.05/0.05/0.03, dsn=2.0.0, status=sent (250 2.0.0 <user@example.com> /QVwGWVDHFo9PAAA0j1nSg Saved)
Nov 27 17:55:01 example dovecot: lmtp(15421): Disconnect from local: Successful quit
Nov 27 17:55:01 example postfix/qmgr[11494]: 4E913403DA: removed

Dodam, że używam postfixa i dovecota z postgresql i spamassasinem.

Offline

 

#2 2017-11-27 18:05:38

Jacekalex
Podobno człowiek...;)
Skąd: /dev/urandom
Zarejestrowany: 2008-01-07

Re: postfix i dovecot nie wysyła ani nie odbiera wiadomości

Kod:

Nov 27 17:47:24 example postfix/proxymap[15191]: warning: pgsql:/etc/postfix/pgsql-boxes.cf is unavailable. open /etc/postfix/pgsql-boxes.cf: Permission denied

Co to jest?
I dlaczego się tym nie zająłeś najpierw?


W demokracji każdy naród ma taką władzę, na jaką zasługuje ;)
Si vis pacem  para bellum  ;)       |       Pozdrawiam :)

Offline

 

#3 2017-11-27 18:19:27

hubot
Użytkownik
Zarejestrowany: 2017-04-13

Re: postfix i dovecot nie wysyła ani nie odbiera wiadomości

Mam SELinuxa w trybie permissive. Próbowałem ustawić chmod 755 /etc/postfix i setsebool -P httpd_can_sendmail=1 ale to nic nie dało.

Kod:

root@example:~# ls -al /etc/postfix
total 172
drwxr-xr-x.   5 root root  4096 Nov 27 17:52 .
drwxr-xr-x. 136 root root 12288 Nov 27 06:55 ..
-rwxr-xr-x.   1 root root     0 Nov 15 20:49 bcc
-rw-r--r--.   1 root root 12288 Nov 15 20:49 bcc.db
-rw-r--r--.   1 root root   120 Nov 26 20:03 dynamicmaps.cf
drwxr-xr-x.   2 root root  4096 Sep 27 06:56 dynamicmaps.cf.d
-rw-r--r--.   1 root root  1495 Nov 27 16:21 main.cf
-rw-r--r--.   1 root root  1905 Nov 25 14:49 main.cf.orig
-rw-r--r--.   1 root root 27130 Nov 15 20:42 main.cf.proto
-rw-r--r--.   1 root root  4416 Sep 27 06:56 makedefs.out
-rw-r--r--.   1 root root  6631 Nov 27 00:35 master.cf
-rw-r--r--.   1 root root  6068 Nov 15 20:42 master.cf.proto
-rw-------.   1 root root   110 Nov 26 20:18 pgsql-aliases.cf
-rwxr-xr-x.   1 root root   109 Nov 26 20:19 pgsql-boxes.cf
-rw-r--r--.   1 root root 10170 Sep 27 06:56 postfix-files
drwxr-xr-x.   2 root root  4096 Nov 26 20:03 postfix-files.d
-rwxr-xr-x.   1 root root  9502 Sep 27 06:56 postfix-script
-rwxr-xr-x.   1 root root 29446 Sep 27 06:56 post-install
drwxr-xr-x.   2 root root  4096 Nov 15 20:48 sasl
-rwxr-xr-x.   1 root root     0 Nov 15 20:49 virtual
-rw-r--r--.   1 root root 12288 Nov 15 20:49 virtual.db
root@example:~# ls -aZ /etc/postfix
 system_u:object_r:postfix_etc_t:s0 .
         system_u:object_r:etc_t:s0 ..
  staff_u:object_r:postfix_etc_t:s0 bcc
  staff_u:object_r:postfix_etc_t:s0 bcc.db
  staff_u:object_r:postfix_etc_t:s0 dynamicmaps.cf
 system_u:object_r:postfix_etc_t:s0 dynamicmaps.cf.d
 system_u:object_r:postfix_etc_t:s0 main.cf
  staff_u:object_r:postfix_etc_t:s0 main.cf.orig
  staff_u:object_r:postfix_etc_t:s0 main.cf.proto
 system_u:object_r:postfix_etc_t:s0 makedefs.out
  staff_u:object_r:postfix_etc_t:s0 master.cf
  staff_u:object_r:postfix_etc_t:s0 master.cf.proto
  staff_u:object_r:postfix_etc_t:s0 pgsql-aliases.cf
  staff_u:object_r:postfix_etc_t:s0 pgsql-boxes.cf
 system_u:object_r:postfix_etc_t:s0 postfix-files
 system_u:object_r:postfix_etc_t:s0 postfix-files.d
system_u:object_r:postfix_exec_t:s0 postfix-script
 system_u:object_r:postfix_etc_t:s0 post-install
 system_u:object_r:postfix_etc_t:s0 sasl
  staff_u:object_r:postfix_etc_t:s0 virtual
  staff_u:object_r:postfix_etc_t:s0 virtual.db

Offline

 

#4 2017-11-27 19:05:27

Jacekalex
Podobno człowiek...;)
Skąd: /dev/urandom
Zarejestrowany: 2008-01-07

Re: postfix i dovecot nie wysyła ani nie odbiera wiadomości

Ledwo czaisz konfigurację Linuxa, a od razu się pakujesz w SELINUXa?

Kandydujesz do nagrody Dawina, czy co?

SELinuxa możesz włączyć dopiero wtedy, jak wszystko inne będzie działało prawidłowo.
I tak Ci wtedy gimnastyki nie zabraknie...

Kod:

setsebool -P httpd_can_sendmail=1

Czyli z poziomu php na Apachu te maile nie wychodzą?

Ostatnio edytowany przez Jacekalex (2017-11-27 19:06:53)


W demokracji każdy naród ma taką władzę, na jaką zasługuje ;)
Si vis pacem  para bellum  ;)       |       Pozdrawiam :)

Offline

 

Stopka forum

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
Nas ludzie lubią po prostu, a nie klikając w przyciski ;-)