segue abaixo um script simples que mostra resumidamente o status das filas do postfix:
Blog com conteúdo sobre os projetos que tenho trabalhado: SEGURANÇA DA INFORMAÇÃO, VOIP COM ASTERISK, VIRTUALIZAÇÃO DE SERVIDORES VMWARE SERVER, ESX, EMAIL, FIREWALL, WEB-PROXIES, VPN, MIGRAÇÕES, LDAP, SAMBA, AD, ORACLE, MySQL, RADIUS, DHCP, DNS, PHP, C++, AUTENTICAÇÃO WIFI, CAPTIVEPORTAL, SATELITE, NETWORK...
Pesquisar neste blog
terça-feira, 6 de novembro de 2012
Script Mostra Status das Filas do Postfix
segue abaixo um script simples que mostra resumidamente o status das filas do postfix:
Apagar mensagens do Postfix
segue abaixo algumas dicas para apagar mensagens do postfix:
postsuper -d ID #Apaga mensagem de ID postsuper -d ALL #Apaga todas mensagens postsuper -d ALL deferred #Apaga todas as mensanges com status deferred
segunda-feira, 10 de setembro de 2012
Aumentar a capacidade de envio e recebimento do seu Postfix
escrevo abaixo uma breve dica para aumentar a capacidade de envio ou recebimento do seu servidor postfix, tudo de acordo com o hardware do seu servidor, é claro!
/etc/postfix/master.cf:
# ====================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ====================================================================
. . .
smtp inet n - - - 200 smtpd
/etc/postfix/master.cf:
# ====================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ====================================================================
. . .
smtp unix - - n - 200 smtp
disable_dns_lookups = yes
maximal_queue_lifetime = 1d bounce_queue_lifetime = 1d queue_run_delay = 300s minimal_backoff_time = 300s maximal_backoff_time = 1800s disable_vrfy_command = yes
referências
quinta-feira, 26 de janeiro de 2012
Limites e Restrições de envio de Email Marketing
fazendo uma pesquisa na internet descobri algumas políticas restritivas de combate ao envio de Spams, usadas por alguns dos provedores de serviços de email mais populares. Alerto que isso é muito importante para quem realiza o envio de Email Marketing, que realize as adaptações do seu software de envio, respeitando a política de cada Provedor, caso contrário seus endereços ips serão simplesmente adicionados nas black lists ficando com a reputação cada vez pior, de acordo com o numero de vezes que eles forem adicionados nas mesmas.
The following restrictions apply when sending emails from a Google Gmail account:
- Gmail email send limit - no more than 500 recipients per message for the Gmail web interface, or max 100 recipients if you are using an email client software.
- Gmail other SMTP limits - outgoing messages sent via Google Gmail can not exceed 10Mb per email (including attachments)
- Google Mail Policy - http://www.google.com/mail/
- Google Mail SMTP restriction expiry method - the restriction is automatically removed within 24 hours after the limit was reached.
The following restrictions apply when sending emails from a Hotmail account:
- Hotmail email send limit - no more than 100 recipients per day.
- Hotmail other SMTP limits - outgoing messages sent via Hotmail can not exceed 10Mb per email (including attachments)
The following restrictions apply when sending emails from a Yahoo Mail account:
- Yahoo Mail email send limit - no more than 100 emails or recipients per hour
- Yahoo Mail other SMTP limits - max 10Mb per message for the free Yahoo Mail Service, or 20Mb per message for Yahoo! Mail Plus
- Yahoo! Anti-Spam Policy - http://docs.yahoo.com/info/
- Yahoo Mail SMTP restriction expiry method - N/A
The following restrictions apply when sending emails from a Lycos Mail account:
- Lycos Mail email send limit - max 25 recipients per message and max 250 emails per day
- Lycos Mail other SMTP limits - Lycos Mail does not have a limit to the attachment file size at this time.
- Lycos Email Policy - http://info.lycos.com/legal/
AOL imposes a rate limit on an AOL member when a member exceeds the acceptable number of email messages sent in a given time period. The following restrictions apply when sending emails from an AOL connection:
- AOL email send limit - no more than 100 recipients per message or 500 recipients per connection
- AOL other SMTP limits - max 16mb per message
- AOL email-outbound policy - http://postmaster-us.info.
- AOL SMTP restriction expiry method - N/A
The following restrictions apply when sending emails from a web site / domain hosted by GoDaddy:
- GoDaddy email send limit for shared web hosting - no more than 250 relays (recipients) per day. You can purchase additional relays, in packs of 50
- GoDaddy email send limit for dedicated servers or dedicated virtual servers - no more than 1000 relays (recipients) per day.
- GoDaddy other SMTP limits - outgoing messages sent via GoDaddy can not exceed 30Mb per email (including attachments)
- GoDaddy email FAQ - http://help.godaddy.com/
- GoDaddy SMTP restriction expiry method - the restriction is automatically lifted 24 hours after the email send limit was reached.
The following restrictions apply when sending emails from a web site / domain hosted by APlus.net:
- APlus email send limit for shared web hosting - no more than 1000 recipients per mailing list AND no more than 500 emails per 30 minutes.
- APlus other SMTP limits - max 7Mb for web email or max 20Mb for local email client messages
- APlus email FAQ - http://www.apluskb.com/
- APlus SMTP restriction expiry method - N/A
RackSpace.com apparently has no email rate limit, however all outgoing messages must be compliant with theRackSpace Acceptable Use Policy. Rackspace may test and otherwise monitor your compliance with its requirements, and may block the transmission of e-mail that violates these provisions.
HostWay allows customers to send emails to mailing lists, using the MailMan service. The number of mailing list subscribers depend on your hosting plan. Using a MailMan mailing list for spamming can lead to the termination of your web hosting account.
The following restrictions apply when sending emails from a web site / domain hosted by Homestead:
- Homestead email send limit for web hosting - no more than 10 messages per second. All mass emails must be compliant with the Homestead Mass Mailing Policy.
The following restrictions apply when sending emails from a web site / domain hosted by IPowerWeb:
- IPowerWeb email send limit - no more than 200 emails per hour and 600 emails per day (for newly created account) OR no more than 500 emails per hour and 5000 emails per day.
- IPowerWeb other SMTP limits - outgoing messages sent via IPowerWeb can not exceed 25Mb per email, including attachments. Mailing lists should not exceed 200 recipients.
- IPowerWeb Email Policy - http://www.ipowerweb.com/
The following restrictions apply when sending emails from a web site / domain hosted by Bluehost:
- Bluehost email send rate limit - the default limit is set to 50 emails per hour. The limit may be raised by contacting the Bluehost support team and explaining why you need the send email limit to be lifted
- Bluehost other SMTP limits - outgoing messages sent via Bluehost can not exceed 10Mb per email (including attachments)
- Bluehost email FAQ - http://helpdesk.bluehost.
The following restrictions apply when sending emails from a web site / domain hosted by LunarPages:
- LunarPages email send rate limit for shared hosting plans - max 20 emails per minute, 600 emails per hour and 14400 emails per day
- LunarPages email send rate limit for dedicated server plans - no limit (according to the LunarPages support forum)
- LunarPages Email Policy - http://www.lunarpages.com/
The following restrictions apply when sending emails from a web site / domain hosted by 1and1:
- 1and1 email send rate limit - max 99 emails at once
- 1and1 Other SMTP restrictions - each outgoing message must have less than 50Mb (including attachments)
The following restrictions apply when sending emails from a verizon.net email account:
- Verizon email send limit - no more than 100 recipients per email message AND max 500 emails (recipients) per hour
- Verizon other SMTP limits - max 2mb per message
- Verizon email-outbound policy - http://www2.verizon.net/
- Verizon SMTP restriction expiry method - the restriction is automatically lifted 24 hours after the email send limit was reached.
Below you can find the Comcast email send or rate limit for Comcast high speed internet customers. Please note that Comcast can also block port 25 for your connection (triggering the error message: "Error #1: Port25.Secure(SSL); no Socket Error: 10053. Error Number 0x800CC0F"), in order to prevent you (or viruses on your computer) from sending emails using your own SMTP agent:
- Comcast email send limit - no more than 1000 recipients per day
- Comcast other SMTP limits - max 10mb per message
- Comcast email-outbound policy - http://www.comcast.net/help/
- Comcast SMTP restriction expiry method - the restriction is automatically lifted 24 hours after the email send limit was reached.
When you reached your EarthLink email send limit, you will receive the following error message from the EarthLink SMTP server: "error 554: www.earthlink.net/go/bulk - Outbound message limit exceeded". The following restrictions apply when sending emails from an EarthLink internet connection:
- EarthLink email send limit - max 1000 recipients per day
- EarthLink other SMTP limits - N/A
- EarthLink email-outbound policy - http://kb.earthlink.net/
- EarthLink SMTP restriction expiry method - A member of EarthLink 's Abuse team will investigate the circumstances that led to your SMTP privileges being suspended. If it is deemed that your use was legitimate, then your SMTP privileges will be reactivated within 24 hours.
Cablevision / Optimum does NOT allow customers to send emails using an email client program or SMTP mail server, unless the customer subscribed to "Optimum Online Boost" or "Optimum Online for Business".
- Cablevision/Optimum (OOL) email send limit - maximum 50 recipients at one time
- Cablevision other SMTP limits - max 20mb per outgoing message
- Cablevision/Optimum email-outbound policy - http://www.optimum.net/
- Cablevision SMTP restriction expiry method - N/A.
If your account has reached the email send limit, you will receive the following error message: "ERROR:5.7.1:550 Outbound Mail Refused - YOUR_IP_ADDRESS". The following restrictions apply when sending emails from a Road Runner internet connection:
- Road Runner email send limit - max 1,000 recipients per day per IP
- Road Runner other SMTP limits - max 5mb per message
- Road Runner email-outbound policy - http://help.rr.com/HMSFaqs/
- Road Runner SMTP restriction expiry method - the suspension is automatically lifted after 24 hours
Cox did not publish the official email send limit for Cox High Speed Internet subscribers. According to the Cox web site: "Specific email sending limits are not published because they vary from time to time depending on a variety of factors". We strongly advise you to contact the Cox support department before sending out large amounts of emails.
- Cox other SMTP limits - max 10mb per message
- Cox email-outbound policy - http://www.cox.com/policy/
Please note that, according to the AT&T Yahoo! Membership Agreement, AT&T Yahoo! can assess a charge of $50.00 per day for unintentional violations or $500.00 per day for deliberate violations of their unsolicited email policy. The following restrictions apply when sending emails from an AT&T Yahoo! Internet/email connection:
- AT&T Yahoo! email send limit - no more than 100 recipients per email message
- AT&T Yahoo! other SMTP limits - max 20mb per message, max 50 file attachments
- AT&T Yaho0! email-outbound policy - http://edit.client.yahoo.
- AT&T Yahoo! SMTP restriction expiry method - penalty charges may apply
If you are a Charter Internet access residential customer and you receive the following error message when trying to send emails: "421 Connection Refused - Customer has exceeded the maximum number of messages allowed per hour", it means your account SMTP access was temporarily blocked. The following restrictions apply when emailing from a Charter connection:
- Charter email send limit - maximum 50 recipients / emails per hour
- Charter other SMTP limits - max 10mb per message
- Charter email-outbound policy - http://www.charter.com/
- Charter SMTP restriction expiry method - wait an hour to send additional emails or brake up the recipients number into smaller groups.
BellSouth does not publish a clear email send limit: "Sending mass, unsolicited e-mail by Service users is prohibited. BellSouth Internet Services reserves the right, in BellSouth’s sole discretion, to determine whether such email constitutes unsolicited messages or transmission. Sending large volumes of unsolicited e-mail to a single user, or group of users, commercial or otherwise, by Service users is prohibited.".
- BellSouth email send limit - BellSouth’s sole discretion
- BellSouth other SMTP limits - max 10mb per message
- BellSouth email-outbound policy - Acceptable Use Policies
- BellSouth SMTP restriction expiry method - BellSouth Internet Services may immediately terminate any account which it determines, in its sole discretion, is transmitting or is otherwise connected with any 'spam' or other unsolicited bulk email. In addition, because damages are often difficult to quantify, if actual damages cannot be reasonably calculated then BellSouth Internet Services may seek liquidated damages of five dollars (US$5.00) for each piece of 'spam' or unsolicited bulk email transmitted from or otherwise connected with your account.
Gmail Sending Limit and Send Rate
Gmail Send Rate: 100 people / day
Gmail Attachment Size Limit: 25MB
Gmail Restriction Expiry Method: Recovered within 24 hours after the limit is reached
Hotmail Sending Limit and Send Rate
Hotmail Send Rate: 100 people / day
Hotmail Attachment Size Limit: 25MB
Hotmail Restriction Expiry Method: N/A
Yahoo! Mail Sending Limit and Send Rate
Yahoo! Mail Send Rate: 100 people / day
Yahoo! Mail Attachment Size Limit: 25MB
Yahoo! Mail Restriction Expiry Method: N/A
AOL Mail Sending Limit and Send Rate
AOL Mail Send Rate: Constantly changing
AOL Mail Attachment Size Limit: 25MB
AOL Mail Restriction Expiry Method: N/A
sexta-feira, 18 de março de 2011
Servidor de Email Marketing com Postfix
para as empresas ou pessoas que estiverem interessadas em criar seu próprio Servidor de envio de Email Marketing Profissional, Email Pessoal, Email Empresarial. Presto consultoria e execução de projetos de servidores de email de alta performance, com multiplos endereços ips de saída, cluster de servidores de email, balanceamento e distribuição.(SMTP / IMAP / POP)
Configuração de Servidores de DNS com seus devidos Reversos, SPF e MX.
segunda-feira, 4 de janeiro de 2010
Comite Gestor da Internet no Brasil (CGI.br) contra os Spams
Para evitar a disseminação de spam, o Comite Gestor da Internet no Brasil (CGI.br) determinou o bloqueio do “local” por onde grande parte dos e-mail falsos são enviados, a porta 25 de seu computador. O bloqueio ocorre no dia 5 de janeiro de 2010.
Se você usa programas de gerenciamento de e-mails —como o Outlook, Thunderbird ou Mail— para não ficar impedido de mandar mensagens, a porta de envio deve ser trocada de 25 para 587. Usuários apenas de webmail não serão impactados.
“Com a implementação das recomendações, será mais difícil para que computadores zumbis sejam utilizados para o envio de spam, pois além de necessitar de um usuário e senha para utilizar o serviço de e-mail, ele ainda deverá burlar os possíveis controles antispam existentes no serviço mencionado”, diz Nelson Novaes, gerente de segurança do UOL.
A medida não é nova, órgãos internacionais aconselham o bloqueio da porta 25 desde 1998, mas apenas em 2005, provedores e operadoras de todo o mundo começaram a adotá-la em massa. O UOL oferece o acesso pela porta 587 desde 2004.
Fonte: UOL Tecnologia
sexta-feira, 13 de fevereiro de 2009
Postfix - Como evitar o envio de emails falsos de dominios válidos
Segue um exemplo abaixo, uma simulação do que ocorre na realidade:
[root@mail ~]# telnet mail.meumailserver.edu.br 25
Trying 200.198.111.111...
Connected to mail.meumailserver.edu.br (200.198.111.111).
Escape character is '^]'.
220 mail.meumailserver.edu.br ESMTP Postfix (2.2.10)
helo dominiodocara.com.br
250 mail.meumailserver.edu.br
MAIL FROM:
250 Ok
RCPT TO:
250 Ok
data
354 End data with
teste de envio
.
250 Ok: queued as C4B4D10E000F
Como vimos acima o email foi tranquilamente, sem checar relay, autenticação, nada.
Então pesquisando na internet e ajuda de alguns membros da comunidade livre consegui encontrar uma solução para esse problema.
Vou mostrar-lhes abaixo como fica a solução implementada e seu teste:
##################### CONFIGURAÇÕES ##############################
# Segue fonte para maiores informações
# http://www.postfix.org/uce.html
# Como uso ldap
smtpd_sender_login_maps = ldap:ldapmaps
# Restriça aplicada no MAIL FROM
smtpd_sender_restrictions = reject_unknown_client,
reject_non_fqdn_sender,
reject_unknown_sender_domain,
reject_sender_login_mismatch, (Essa linha em conjunto com a regra smtpd_sender_login_maps)
permit_sasl_authenticated,
reject_unauthenticated_sender_
permit_mynetworks,
reject_unauth_pipelining
### mapeamento virtual ###
ldapmaps_server_host = ldapsrv.dominio.net
ldapmaps_server_port = 389
ldapmaps_search_base = dc=dominio,dc=edu,dc=br
ldapmaps_version = 3
ldapmaps_query_filter = (|(mail=%s)(
ldapmaps_result_attribute = mail
ldapmaps_bind = no
Agora vem o teste
[root@mail ~]# telnet mail.meumailserver.edu.br 25
Trying 200.198.111.111...
Connected to mail.meumailserver.edu.br (200.198.111.111).
Escape character is '^]'.
220 mail.meumailserver.edu.br ESMTP Postfix (2.2.10)
helo dominiodocara.com.br
250 mail.meumailserver.edu.br
MAIL FROM:marcos.abadi@meumailserver.edu.br
250 Ok
RCPT TO:marcos.abadi@
553 marcos.abadi@meumailserver.edu.br: Sender address rejected: not logged in
data
554 Error: no valid recipients
######################### LOGS ##############################
Feb 13 12:45:09 mail postfix/smtpd[3800]: connect from mail.dominiodocara.com.br[201.22.
Feb 13 12:45:24 mail postfix/smtpd[3800]: NOQUEUE: reject: RCPT from mail.dominiodocara.com.br[201.22.