[FUG-BR] qmail - quase funcionando, só nao envia para fora
Leonardo Augusto
lalinden em gmail.com
Terça Julho 31 13:45:21 BRT 2012
Agradeço a todos que responderam, como foram muitas perguntas, para
nao responder 10 emails e ficar tudo desconexo,
vou responder a todos em um email apenas, com todas a informações
juntas para facilitar a analize ok ?
#----------------------------- ps ax (vejam que os procs estao no
ar)---------------
root em mail:/root # ps ax
PID TT STAT TIME COMMAND
47128 ?? SsJ 0:00.00 /usr/sbin/syslogd -ss -m 0
47175 ?? SJ 0:00.01 /usr/local/bin/svscan /service
47176 ?? IJ 0:00.00 /usr/local/bin/readproctitle service errors:
.........................................................................................................................
47178 ?? IJ 0:00.00 supervise qmail-send
47179 ?? IJ 0:00.00 supervise log
47180 ?? IJ 0:00.00 supervise qmail-smtpd
47181 ?? IJ 0:00.00 supervise log
47182 ?? IJ 0:00.00 supervise qmail-pop3d
47183 ?? IJ 0:00.00 supervise log
47184 ?? IJ 0:00.01 qmail-send
47185 ?? IJ 0:00.00 multilog t s100000 n20 /var/log/qmail/qmail-pop3d
47186 ?? IJ 0:00.01 multilog t s100000 n20 /var/log/qmail/qmail-send
47187 ?? IJ 0:00.00 tcpserver -H -R -v -c100 0 110 qmail-popup
mail.edux.com.br /usr/home/vpopmail/bin/vchkpw qmail-pop3d Maildir
47188 ?? IJ 0:00.01 /usr/local/bin/tcpserver -v -R -H -P -l
mail.edux.com.br -x /etc/tcp.smtp.cdb -c 30 -u 89 -g 89 0 smtp
/usr/local/bin/rblsmtpd -b -r bl.spamcop.net -r list.dsbl.org /
47189 ?? IJ 0:00.00 multilog t s100000 n20 /var/log/qmail/qmail-smtpd
47194 ?? IJ 0:00.00 qmail-lspawn ./Maildir
47195 ?? IJ 0:00.01 qmail-rspawn
47196 ?? IJ 0:00.00 qmail-clean
47197 ?? IJ 0:00.01 qmail-todo
47198 ?? IJ 0:00.00 qmail-clean
47258 ?? IsJ 0:00.03 /bin/sh /usr/local/bin/mysqld_safe
--defaults-extra-file=/usr/local/db_mysql/my.cnf --user=mysql
--datadir=/usr/local/db_mysql --pid-file=/usr/local/db_mysql/mail.edu
47548 ?? IJ 0:00.02 /usr/local/libexec/mysqld
--defaults-extra-file=/usr/local/db_mysql/my.cnf --basedir=/usr/local
--datadir=/usr/local/db_mysql --plugin-dir=/usr/local/lib/mysql/plugin
47589 ?? SsJ 0:00.12 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
47594 ?? IsJ 0:00.00 /usr/sbin/sshd
47598 ?? SsJ 0:00.00 /usr/sbin/cron -J 15 -s
47627 ?? SJ 0:00.00 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
47628 ?? IJ 0:00.00 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
47629 ?? IJ 0:00.00 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
47630 ?? IJ 0:00.00 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
47631 ?? IJ 0:00.00 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
47200 0 IJ 0:00.00 /usr/local/sbin/courierlogger
-pid=/var/sqwebmail/run/sqwebmaild.pid -start
/usr/local/libexec/sqwebmail/sqwebmaild
47201 0 IJ 0:00.00 /usr/local/libexec/sqwebmail/sqwebmaild
47211 0 IJ 0:00.00 /usr/local/libexec/sqwebmail/sqwebmaild
47213 0 IJ 0:00.00 /usr/local/libexec/sqwebmail/sqwebmaild
47554 0 IJ 0:00.00 /usr/local/sbin/courierlogger -facility=mail
-pid=/var/run/authdaemond/pid -start
/usr/local/libexec/courier-authlib/authdaemond
47555 0 SJ 0:00.01 /usr/local/libexec/courier-authlib/authdaemond
47560 0 IJ 0:00.00 /usr/local/sbin/courierlogger
-pid=/var/run/pop3d-ssl.pid -start -name=pop3d-ssl
/usr/local/libexec/courier-imap/couriertcpd -address=0 -maxprocs=40
-maxperip=4 -nodn
47561 0 IJ 0:00.00 /usr/local/libexec/courier-imap/couriertcpd
-address=0 -maxprocs=40 -maxperip=4 -nodnslookup -noidentlookup 995
/usr/local/bin/couriertls -server -tcpd /usr/local/sbi
47570 0 IJ 0:00.01 /usr/local/libexec/courier-authlib/authdaemond
47571 0 IJ 0:00.00 /usr/local/libexec/courier-authlib/authdaemond
47575 0 IJ 0:00.00 /usr/local/sbin/courierlogger
-pid=/var/run/imapd-ssl.pid -start -name=imapd-ssl
/usr/local/libexec/courier-imap/couriertcpd -address=0 -maxprocs=40
-maxperip=30 -nod
47576 0 IJ 0:00.00 /usr/local/libexec/courier-imap/couriertcpd
-address=0 -maxprocs=40 -maxperip=30 -nodnslookup -noidentlookup 993
/usr/local/bin/couriertls -server -tcpd /usr/local/sb
47582 0 IJ 0:00.00 /usr/local/sbin/courierlogger
-pid=/var/run/imapd.pid -start -name=imapd
/usr/local/libexec/courier-imap/couriertcpd -address=0 -maxprocs=40
-maxperip=30 -nodnslookup
47583 0 IJ 0:00.00 /usr/local/libexec/courier-imap/couriertcpd
-address=0 -maxprocs=40 -maxperip=30 -nodnslookup -noidentlookup 143
/usr/local/sbin/imaplogin /usr/local/bin/imapd Maildi
47648 0 SJ 0:00.01 /usr/local/bin/imapd Maildir
47650 0 IJ 0:00.01 couriertls -statusfd=7 -printx509=9 -localfd=5
-tcpd -server
//----------- /etc/tcp.smtp (foi gerado como qmailctl)
---------------------------
root em mail:/root # cat /etc/tcp.smtp
127.:allow,RELAYCLIENT=""
//--------------- saida do smtp --------------------------------------
consigo dar telnet (url e nao o ip, dns resolv ok) porta 25 em um
servidor externo, entao nao é limitacao fisica
//----- o rcpthosts esta ok, pois consigo receber email DA RUA, e
internamente, nao consigo é enviar -----------------------------------
//------- vamos ao daemontools e afins, ta tudo rodando ---------------
root em mail:/var/qmail/supervise # tree
.
|-- qmail-pop3d
| |-- log
| | |-- run
| | `-- supervise
| | |-- control
| | |-- lock
| | |-- ok
| | `-- status
| |-- run
| `-- supervise
| |-- control
| |-- lock
| |-- ok
| `-- status
|-- qmail-send
| |-- log
| | |-- run
| | `-- supervise
| | |-- control
| | |-- lock
| | |-- ok
| | `-- status
| |-- run
| `-- supervise
| |-- control
| |-- lock
| |-- ok
| `-- status
`-- qmail-smtpd
|-- log
| |-- run
| `-- supervise
| |-- control
| |-- lock
| |-- ok
| `-- status
|-- run
|-- run.ori
`-- supervise
|-- control
|-- lock
|-- ok
`-- status
root em mail:/var/qmail/supervise # cat qmail-smtpd/run
#!/bin/sh
#--- com ou sem a alinha abaixo o recebimento externo funciona
QMAILQUEUE="/var/qmail/bin/qmail-queue" export QMAILQUEUE
QMAILDUID=`id -u vpopmail`
NOFILESGID=`id -g vpopmail`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
LOCAL=`head -1 /var/qmail/control/me`
if [ -z "$QMAILDUID" -o -z "$NOFILESGID" -o -z "$MAXSMTPD" -o -z
"$LOCAL" ]; then
echo QMAILDUID, NOFILESGID, MAXSMTPD, or LOCAL is unset in
echo /var/qmail/supervise/qmail-smtpd/run
exit 1
fi
if [ ! -f /var/qmail/control/rcpthosts ]; then
echo "No /var/qmail/control/rcpthosts!"
echo "Refusing to start SMTP listener because it'll create an open relay"
exit 1
fi
exec /usr/local/bin/softlimit -m 40000000 \
/usr/local/bin/tcpserver -v -R -H -P -l "$LOCAL" -x /etc/tcp.smtp.cdb
-c "$MAXSMTPD" -u "$QMAILDUID" -g "$NOFILESGID" 0 smtp \
/usr/local/bin/rblsmtpd -b -r bl.spamcop.net -r list.dsbl.org \
/var/qmail/bin/qmail-smtpd edux.com.br /usr/home/vpopmail/bin/vchkpw
/usr/bin/true 2>&1
root em mail:/var/qmail/supervise # cat qmail-send/run
#!/bin/sh
exec /var/qmail/rc
root em mail:/var/qmail/supervise # cat /var/qmail/rc
#!/bin/sh
exec env - PATH="/var/qmail/bin:$PATH" \
qmail-start "`cat /var/qmail/control/defaultdelivery`"
root em mail:/var/qmail/supervise # cat /var/qmail/control/defaultdelivery
./Maildir
OBS: como eu disse, os email enviados entre os dominios virtuais
presentes no vpopmail chegam ao destino, e os emails enviados do
gmail, do hotmail, a qualquer
conta em algum dos dominio virtuais tambem chegam ao destino.
//-------------- vamos ao qmail-qread e
afins---------------------------------------------------------------------
root em mail:/var/qmail/supervise # qmailctl stat
/service/qmail-send: up (pid 48278) 243 seconds
/service/qmail-send/log: up (pid 48277) 243 seconds
/service/qmail-smtpd: up (pid 48282) 243 seconds
/service/qmail-smtpd/log: up (pid 48283) 243 seconds
/service/qmail-pop3d: up (pid 48280) 243 seconds
/service/qmail-pop3d/log: up (pid 48281) 243 seconds
messages in queue: 43
messages in queue but not yet preprocessed: 0
OBS, 43 messages na queue, elas nao saem ,nao vou postar a listagem
pois é desnecessário, so vai poluir o email, apenas algumas linhas
31 Jul 2012 16:03:34 GMT #8300186 26946 <>
remote retorno em midiaturbo.com.br
30 Jul 2012 13:46:58 GMT #8300325 3815 <>
remote matricula em damasiovitoria.com.br
30 Jul 2012 22:54:30 GMT #8300371 2658 <>
remote root em server.cuttismtp.com.br
30 Jul 2012 21:53:06 GMT #8300335 630 <leonardo em edux.com.br>
remote lalinden em gmail.com
30 Jul 2012 23:44:40 GMT #8300808 1292 <>
30 Jul 2012 17:38:25 GMT #8300331 1440 <teste-return-2- em edux.com.br-@[]>
remote lalinden em gmail.com
remote leonardolinden em hotmail.com
//-------------------- vamos aos logs
------------------------------------------------------------------------------
/var/log/maillog, nao tem nenhum erro, apenas mensagens de ok do
imapd, como esse trecho
Jul 31 16:10:21 mail imapd: LOGIN, user=bsd em edux.com.br,
ip=[::ffff:67.228.23.16], port=[16922], protocol=IMAP
Jul 31 16:10:21 mail imapd: LOGOUT, user=bsd em edux.com.br,
ip=[::ffff:67.228.23.16], headers=0, body=0, rcvd=87, sent=390, time=0
root em mail:/var/log/qmail # tree
|-- qmail-pop3d
| |-- current
| |-- lock
| `-- state
|-- qmail-send
| |-- @4000000050171c121882dd3c.s
| |-- current
| |-- lock
| `-- state
`-- qmail-smtpd
|-- current
|-- lock
`-- state
//---- agora no qmail-send/current, tem um erro de dns, que acho que
pode ser isso, pois pesquisei na net e achei um cara falando isso,
sobre esse tal CNAME_lookup_failed_temporarily._(#4.4.3)/
--> http://www.madeira.eng.br/wiki/index.php?page=Resolvendo+o+erro+deferral%3A+CNAME_lookup_failed_temporarily._(%234.4.3)+no+Qmail
@40000000501807610afac88c new msg 8300180
@40000000501807610afafb54 info msg 8300180: bytes 3605 from
<www-data em mail.somma.consult.nom.br> qp 48663 uid 89
@40000000501807610afbd614 starting delivery 49: msg 8300180 to local
escolaonline.com.br-faleconosco em escolaonline.com.br
@40000000501807610afbdde4 status: local 1/10 remote 0/255
@40000000501807610bb74e44 delivery 49: failure:
Sorry,_no_mailbox_here_by_that_name._(#5.1.1)/
@40000000501807610bb9da9c status: local 0/10 remote 0/255
@40000000501807610bd8c0c4 bounce msg 8300180 qp 48666
@40000000501807610bd9e5bc end msg 8300180
@40000000501807610bf0b1ac new msg 8300836
@40000000501807610bf0b594 info msg 8300836: bytes 4191 from <> qp 48666 uid 87
@40000000501807610bf14234 starting delivery 50: msg 8300836 to remote
www-data em mail.somma.consult.nom.br
@40000000501807610bf14a04 status: local 0/10 remote 1/255
@40000000501807700c185dec delivery 50: deferral:
CNAME_lookup_failed_temporarily._(#4.4.3)/
@40000000501807700c1884fc status: local 0/10 remote 0/255
@40000000501807961e9fd9f4 new msg 8300815
@40000000501807961e9fdddc info msg 8300815: bytes 2816 from
<super em expressemidia.com.br> qp 48674 uid 89
@40000000501807961ea0ace4 starting delivery 51: msg 8300815 to local
escolaonline.com.br-info em escolaonline.com.br
@40000000501807961ea0b0cc status: local 1/10 remote 0/255
@40000000501807961f5a7764 delivery 51: failure:
Sorry,_no_mailbox_here_by_that_name._(#5.1.1)/
@40000000501807961f5ce47c status: local 0/10 remote 0/255
@40000000501807961f7a5b74 bounce msg 8300815 qp 48677
@40000000501807961f7b806c end msg 8300815
@40000000501807961f8c7c14 new msg 8300846
@40000000501807961f8c7ffc info msg 8300846: bytes 3379 from <> qp 48677 uid 87
@40000000501807961f8d146c starting delivery 52: msg 8300846 to remote
super em expressemidia.com.br
@40000000501807961f8d1c3c status: local 0/10 remote 1/255
@4000000050180796389344cc new msg 8300845
@4000000050180796389348b4 info msg 8300845: bytes 558 from
<leonardo em edux.com.br> qp 48683 uid 89
@40000000501807963893f494 starting delivery 53: msg 8300845 to local
edux.com.br-bsd em edux.com.br
@40000000501807963893f87c status: local 1/10 remote 1/255
@400000005018079639518bbc delivery 53: success: did_0+0+1/
@40000000501807963952c054 status: local 0/10 remote 1/255
@40000000501807963953319c end msg 8300845
OBS: ja usei o dns que o outro qmail que funciona usa, o do google, o
do softlayer, e todos dao o mesmo erro, engracado que os qmails foram
compilados via ports da mesma forma, a unica diferenca foi o
qmailqueue, que nesse novo ta on, é a mesma versao do qmail, sera que
o problema
esta no vpopmail ? mas quem envia é o qmail... entao acho que o
vpopmail nao influi no envio para fora.
root em mail:/usr/ports/mail/qmail # make showconfig
===> The following configuration options are available for qmail-1.03_7:
SMTP_AUTH_PATCH=on: Provide SMTP Authentication
QMAILQUEUE_PATCH=on: run a QMAILQUEUE program
BIG_TODO_PATCH=on: enable big_todo qmail patch
BIG_CONCURRENCY_PATCH=on: use a concurrency greater than 240
OUTGOINGIP_PATCH=on: set the IP address to send messages
LOCALTIME_PATCH=on: emit dates in the local timezone
QMTPC_PATCH=off: send email using qmtp protocol
MAILDIRQUOTA_PATCH=on: Maildir++ support
BLOCKEXEC_PATCH=on: block many windows viruses/worms
DISCBOUNCES_PATCH=on: discard double-bounces
SPF_PATCH=on: Implement SPF checker
TARPIT_PATCH=on: Implement TARPIT functions
EXTTODO_PATCH=on: extern high-perform. todo processing
QEXTRA=off: enable QUEUE_EXTRA copy feature
RCDLINK=on: create rc.d/qmail.sh symlink
===> Use 'make config' to modify these settings
Sera que é esse o problema : ??
@40000000501807700c185dec delivery 50: deferral:
CNAME_lookup_failed_temporarily._(#4.4.3)/
Pois no envio de mensagens entre os dominios do servidor nao da esse
erro, como mostra ali no log,
e nao é problema de resolucao de dns, pensei que poderia ser o
bloqueio de recursividade no dns, mas dei
o dig mx pro google e o resultado veio:
root em mail:/var/log/qmail # dig mx gmail.com
; <<>> DiG 9.8.3-P2 <<>> mx gmail.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42241
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 4, ADDITIONAL: 0
;; QUESTION SECTION:
;gmail.com. IN MX
;; ANSWER SECTION:
gmail.com. 3537 IN MX 10
alt1.gmail-smtp-in.l.google.com.
gmail.com. 3537 IN MX 5 gmail-smtp-in.l.google.com.
gmail.com. 3537 IN MX 20
alt2.gmail-smtp-in.l.google.com.
gmail.com. 3537 IN MX 40
alt4.gmail-smtp-in.l.google.com.
gmail.com. 3537 IN MX 30
alt3.gmail-smtp-in.l.google.com.
;; AUTHORITY SECTION:
gmail.com. 172737 IN NS ns4.google.com.
gmail.com. 172737 IN NS ns3.google.com.
gmail.com. 172737 IN NS ns1.google.com.
gmail.com. 172737 IN NS ns2.google.com.
;; Query time: 1 msec
;; SERVER: 174.37.53.32#53(174.37.53.32)
;; WHEN: Tue Jul 31 16:43:29 2012
;; MSG SIZE rcvd: 222
Vou ver se consigo recompilcar o port do qmail sem detonar com tudo,
senao vou ter
que comecar a instalar tudo denovo.
[]´s
Mais detalhes sobre a lista de discussão freebsd