Deve estar na fila de mensagens
Envie um email simples
# echo "Hello world" | swaks -4 --server smtp.example.net --from [email protected] --to [email protected] --h-Subject "Test message" --body -
=== Trying smtp.example.net:25...
=== Connected to smtp.example.net.
<- 220 smtp.example.net ESMTP Postfix
-> EHLO tl-resin-node1.example.net
<- 250-smtp.example.net
<- 250-PIPELINING
<- 250-SIZE 10240000
<- 250-VRFY
<- 250-ETRN
<- 250-AUTH LOGIN PLAIN
<- 250-ENHANCEDSTATUSCODES
<- 250-8BITMIME
<- 250 DSN
-> MAIL FROM:<[email protected]>
<- 250 2.1.0 Ok
-> RCPT TO:<[email protected]>
<- 250 2.1.5 Ok
-> DATA
<- 354 End data with <CR><LF>.<CR><LF>
-> Date: Tue, 05 Apr 2016 03:45:43 -0400
-> To: [email protected]
-> From: [email protected]
-> Subject: Test message
-> X-Mailer: swaks v20130209.0 jetmore.org/john/code/swaks/
->
-> Hello world
->
->
-> .
<- 250 2.0.0 Ok: queued as 581271C1811
-> QUIT
<- 221 2.0.0 Bye
=== Connection closed with remote host.
Verifique o maillog no smtp.example.net
# cat /var/log/maillog | grep 581271C1811
Apr 5 07:45:41 ci postfix/smtpd[31639]: 581271C1811: client=smtp.example.com[192.168.88.130]
Apr 5 07:45:41 ci postfix/cleanup[31642]: 581271C1811: message-id=<>
Apr 5 07:45:41 ci postfix/qmgr[31633]: 581271C1811: from=<[email protected]>, size=389, nrcpt=1 (queue active)
Apr 5 07:45:41 ci postfix/virtual[31643]: 581271C1811: to=<[email protected]>, relay=virtual, delay=0.07, delays=0.02/0.01/0/0.04, dsn=4.2.0, status=deferred (maildir delivery failed: create maildir file /var/mail/virtual/example.net/[email protected]/tmp/1459842341.P31643.ci.example.net: Permission denied)
Verifique o maillog
# postqueue -p
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
581271C1811 389 Tue Apr 5 07:45:41 [email protected]
(maildir delivery failed: create maildir file /var/mail/virtual/example.net/[email protected]/tmp/1459842341.P31643.ci.example.net: Permission denied)
[email protected]
-- 1 Kbytes in 1 Request.
Corrigir as permissões
# ls -la
total 16
drwxr-xr-x 4 alex alex 4096 Mar 18 14:32 .
drwxrwxr-x. 3 root mail 4096 Apr 2 03:35 ..
drwx------ 3 virtual virtual 4096 Mar 15 09:18 example.com
drwx------ 3 root virtual 4096 Mar 18 14:32 example.net
# chown virtual:virtual example.net
Descarregue a fila de mensagens e verifique novamente o maillog
# postqueue -f
Apr 5 07:49:01 ci postfix/anvil[31640]: statistics: max cache size 1 at Apr 5 07:45:41
Apr 5 07:49:29 ci postfix/qmgr[31633]: 581271C1811: from=<[email protected]>, size=389, nrcpt=1 (queue active)
Apr 5 07:49:29 ci postfix/virtual[31894]: 581271C1811: to=<[email protected]>, relay=virtual, delay=228, delays=228/0.02/0/0.06, dsn=2.0.0, status=sent (delivered to maildir)
Apr 5 07:49:29 ci postfix/qmgr[31633]: 581271C1811: removed