# tail -f /var/log/mail.log
# cat /var/log/mail.log
# tail -f /var/log/mail.err
---------------------------------------------------------------------------------------------------------
# find /home/mail/juralinux.com.br/eric/Maildir/new/ -type f -print0 | xargs -0 -e grep -nH -e "Debian*"
---------------------------------------------------------------------------------------------------------
Procurando na pasta de emails do usuario "eric" emails que possuem a palavra "Aprender"
# find /home/mail/juralinux.com.br/eric/Maildir/new/ -type f -print0 | xargs -0 -e grep -nH -e "Aprenden*"
---------------------------------------------------------------------------------------------------------
Filtrando emails entrados no mes de "Janeiro" no intervalo de horas das "11 as 12 e 50 minutos"
# cat /var/log/mail.log | grep 'from' | grep 'Jan*' | grep "1[1-2]:50"
---------------------------------------------------------------------------------------------------------
# cat /var/log/mail.log | grep 'from' | grep 'Jan*' | grep "1[1-1]:50"
Jan 28 15:11:50 juralinux postfix/smtpd[11182]: connect from unknown[221.182.2.16]
---------------------------------------------------------------------------------------------------------
Filtrando todos os emails que entraram no intervalo de horas das "10:50 e 13:50 h
# cat /var/log/mail.log | grep "1[0-3]:50"
---------------------------------------------------------------------------------------------------------
# cat /var/log/mail.log | grep 'to=<info*' | grep 'Jan 30*'
---------------------------------------------------------------------------------------------------------
Filtrando todos os emails recebidos no horário das "10:00"
# cat /var/log/mail.log | grep " 1[0-0]:00"
---------------------------------------------------------------------------------------------------------
# cat /var/log/mail.log | grep " 1[0-5]:00"
---------------------------------------------------------------------------------------------------------
# cat /var/log/mail.log | grep " 1[0-5]:00" | wc -l
18
---------------------------------------------------------------------------------------------------------
Reinfileirar todos emails
# postsuper -r ALL
postsuper: Requeued: 9 messages
_____________________________________________________________________
Listar emails na fila
# mailq
---------------------------------------------------------------------------------------------------------
# postsuper -d ALL
postsuper: Deleted: 9 messages
---------------------------------------------------------------------------------------------------------
# postsuper -d 58AF8E4143
---------------------------------------------------------------------------------------------------------
Forca entrega imedita de emails adiados
# postqueue -c /etc/postfix -f
---------------------------------------------------------------------------------------------------------
# grep "jurandir*" /var/log/mail.log
# grep -r 'mo*' /var/log/mail.log
# cat /var/log/mail.log | grep 'from=<floripa*' | grep "Mar*" | wc -l
# cat /var/log/mail.log | grep 'from=<floripa*' | grep 'to=<vendas3' | grep 'Jul*' | wc -l
# cat /var/log/mail.log | grep 'from=<floripa*' | grep 'to=<vendas3' | grep 'Jul 6 18:05*'
# cat /var/log/mail.log | grep 'from' wc -l
# cat /var/log/mail.log | grep 'to' | grep 'Jul*' | wc –l
# cat /var/log/mail.log | grep --colour=auto -r "flori*\|folder\|propa*"
# cat /var/log/mail.log | grep "1[0-2]:50" | grep 192.168.0.130
# cat /var/log/mail.log | grep "1[1-5]:20" | grep vendas3
# cat /var/log/mail.log | grep "1[0-2]:50" | grep 'from=<vendas4*'
# cat /var/log/mail.log | grep "1[0-4]:50" | grep 'to=<vendas4*'
# cat /var/log/mail.log | grep "1[0-5]:50" | grep 'from=<su*'
# cat /var/log/mail.log | grep "1[0-4]:50" | grep 'from=<su*' | grep 'to=<vendas3'
# cat /var/log/mail.log | grep "1[0-5]:50" | grep 'from=<su*' | wc -l
# cat /var/log/mail.log | grep -i "jura@juralinux.com.br" | grep -i "sep 24 10:*"
# tail -f /var/log/mail.log | grep 'from' | grep 'Jul*' | wc -l
# grep "almoxa*" /var/log/mail.log | grep sent | wc -l
# grep -r "from" /var/log/mail.log | grep "May 25" | grep 'to=<finan*@tip*' | wc -l
# grep -r "from" /var/log/mail.log | grep "May 25" | grep 'financi*'
# cat /var/log/mail.log | grep -i "jura@juralinux.com.br" | grep -i "May 26 14"
# cat /var/log/mail.log | grep -i vendas3 | grep from | grep "May 26 18:13"
Filtrando informações em arquivos compactados.
# zcat mail.log.1.gz | grep 'from=<carro*'
# zcat mail.log.4.gz | grep carro | wc –l
---------------------------------------------------------------------------------------------------------
# df -h | mail jurandir@juralinux.com.br -s 'Linux server disk space'
---------------------------------------------------------------------------------------------------------
# tail /var/log/mail.log | grep "eric" | mail -s "Danger" way@tpa.com.br
Jul 3 14:03:14 localhost dovecot: POP3(eric@juralinux.com.br): Disconnected: Logged out top=0/0, retr=0/0, del=0/85, size=7988517
Jul 3 14:33:21 localhost dovecot: auth-worker(default): sql(eric@juralinux.com.br,192.168.1.116): query: SELECT username, password FROM mailbox WHERE username='eric@juralinux.com.br' AND active=1
Jul 3 14:33:21 localhost dovecot: auth(default): client out: OK#0111#011user=eric@juralinux.com.br
Jul 3 14:33:21 localhost dovecot: auth-worker(default): sql(eric@juralinux.com.br,192.168.1.116): SELECT maildir FROM mailbox WHERE username = 'eric@juralinux.com.br' AND active = 1
# zcat /var/log/mail.log.1.gz | grep dovecot | grep "auth failed" | grep -v "@" | awk '{print $15}' | cut -d '=' -f2 | cut -d',' -f1 | grep ^[0-9] | sort -n | grep -v "127.0.0.1\|192.168\|187.4.229.187" | uniq -c
------------------------------------------------------------------------------------------------------------------------
===[ Sharing Knowledge ]=== - Obrigado - Thank you - Danke - Merci - Grazie - Gracias - arigatou gozaimasu
“We make a living by what we get, but we make a life by what we give.” - Give and you will receive - just share :)
------------------------------------------------------------------------------------------------------------------------
“We make a living by what we get, but we make a life by what we give.” - Give and you will receive - just share :)
------------------------------------------------------------------------------------------------------------------------
Nenhum comentário:
Postar um comentário