Mudanças entre as edições de "Iredmail"

De MochilaWiki
Ir para navegaçãoIr para pesquisar
(37 revisões intermediárias pelo mesmo usuário não estão sendo mostradas)
Linha 2: Linha 2:
 
* http://www.iredmail.org/
 
* http://www.iredmail.org/
  
 +
== pré-configuração ==
 
em /etc/apt/sources.list adicione
 
em /etc/apt/sources.list adicione
deb http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free
+
<source lang="bash">
 +
echo deb http://ftp.us.debian.org/debian wheezy main non-free contrib > /etc/apt/sources.list
 +
echo deb http://security.debian.org/ wheezy/updates main non-free contrib >> /etc/apt/sources.list
 +
echo deb http://http.us.debian.org/debian wheezy-updates main non-free contrib >> /etc/apt/sources.list
 +
</source>
  
 
hostname
 
hostname
echo mail > /etc/hostname
+
<source lang="bash">
hostname -F /etc/hostname
+
echo mail > /etc/hostname
 
+
hostname -F /etc/hostname
 +
</source>
 
em /etc/hosts
 
em /etc/hosts
 
  127.0.0.1  mail.quijaua.net mail localhost localhost.localdomain
 
  127.0.0.1  mail.quijaua.net mail localhost localhost.localdomain
  
 +
== criando swap ==
 +
 +
Se acaso estiver usando DigitalOcean crie uma swap do tamanho da memória ram ou o dobro
 +
<source lang="bash">
 +
dd if=/dev/zero of=/swapfile bs=1024 count=512k
 +
chown root:root /swapfile
 +
chmod 0600 /swapfile
 +
mkswap /swapfile
 +
swapon /swapfile
 +
echo /swapfile none swap sw 0 0  >> /etc/fstab
 +
echo 10 | tee /proc/sys/vm/swappiness
 +
echo vm.swappiness = 10 | tee -a /etc/sysctl.conf
 +
</source>
  
 
== instalando ==
 
== instalando ==
cd /usr/src
+
<source lang="bash">
apt-get install -y mysql-server dialog bzip2 postfix-policyd
+
cd /usr/src
wget http://iredmail.googlecode.com/files/iRedMail-0.6.1.tar.bz2
+
apt-get update
tar jxvf iRedMail-0.6.1.tar.bz2
+
apt-get upgrade
cd iRedMail-0.6.1/pkgs/
+
apt-get install -y dialog bzip2 locales locales-all
sh get_all.sh
+
wget https://bitbucket.org/zhb/iredmail/downloads/iRedMail-0.8.7.tar.bz2
cd ..
+
tar jxvf iRedMail-0.8.7.tar.bz2
  sh iRedMail.sh
+
cd iRedMail-0.8.7
 +
bash iRedMail.sh
 +
apt-get install postgrey
 +
</source>
 +
 
 +
== implementando SPF ==
 +
 
 +
instalando
 +
<source lang="bash">
 +
apt-get install postfix-policyd-spf-perl
 +
</source>
 +
 
 +
acrescente em /etc/postfix/mainf.cf
 +
<source lang="bash">
 +
smtpd_recipient_restrictions = [...], check_policy_service unix:private/policy
 +
</source>
 +
 
 +
acrescente em /etc/postfix/master.cf
 +
<source lang="bash">
 +
policy unix - n n - - spawn user=nobody argv=/usr/bin/perl /usr/sbin/postfix-policyd-spf-perl
 +
</source>
 +
 
 +
reinicie o postfix
 +
<source lang="bash">
 +
/etc/init.d/postfix restart
 +
</source>
 +
 
 +
== removendo iredmail ==
 +
<source lang="bash">
 +
wget http://iredmail.googlecode.com/hg/extra/clear_iredmail.sh
 +
mv clear_iredmail.sh tools/ && cd tools/
 +
bash clear_iredmail.sh
 +
rm -f /usr/src/iRedMail-0.8.6/./.iRedMail.installation.status
 +
</source>
 +
 
 +
== testar antivirus ==
 +
* http://pt.wikipedia.org/wiki/EICAR_%28arquivo_de_teste%29
 +
* http://www.eicar.org/anti_virus_test_file.htm
 +
 
 +
== permissões ==
 +
* http://www.iredmail.org/wiki/index.php?title=Addition/Protect.Configure.Files
 +
 
 +
== aumentar tamanho de arquivo anexo ==
 +
 
 +
o padrão é 10M, nesse caso estou aumentando para 32M
 +
<source lang="bash">
 +
postconf -e 'message_size_limit = 268435456'
 +
sed -i 's/post_max_size\ =\ 12M/post_max_size\ =\ 32M/g' /etc/php5/apache2/php.ini
 +
sed -i 's/upload_max_filesize\ =\ 10M/upload_max_filesize\ =\ 32M/g' /etc/php5/apache2/php.ini
 +
/etc/init.d/apache2 restart
 +
/etc/init.d/postfix restart
 +
</source>
 +
 
 +
para ver valor atual
 +
<source lang="bash">
 +
# postconf | grep mailbox_size_limit
 +
# postconf | grep message_size_limit
 +
</source>
 +
 
 +
para ver o valor padrão
 +
<source lang="bash">
 +
# postconf -d | grep mailbox_size_limit
 +
# postconf -d | grep message_size_limit
 +
</source>
 +
 
 +
== reiniciar todos os serviços ==
 +
<source lang="bash">
 +
for i in rsyslog apache2 postfix mysql dovecot amavis clamav-daemon clamav-freshclam cron iredapd iptables; do /etc/init.d/${i} restart; done
 +
</source>
 +
 
 +
== Complementos ==
 +
* [[DKIM]]
 +
* [[Razor2, pyzor e DCC Antispam no iRedMail‎]]
 +
 
 +
== E-mail no Android ==
 +
* http://www.proweb.co.id/articles/support/imap_android_iredmail.html
 +
 
 +
== Recipient address rejected: Sender is not same as SMTP authenticate username ==
 +
 
 +
em /opt/iredapd/settings.py incluir
 +
  ALLOWED_LOGIN_MISMATCH_SENDERS = ['seu@email.com.br']
  
atualizando clamav
+
e depois reiniciar o iRedAPD
  # freshclam
+
  service iredapd restart
  
atualize
+
== Recipient address rejected: Policy Rejection- Please try later. ==
aptitude update; aptitude upgrade
 
  
== com roundcubemail-0.4 ==
+
Entre em /opt/iredapd/tools e rode o comando
wget -c http://ufpr.dl.sourceforge.net/project/roundcubemail/roundcubemail/0.4.2/roundcubemail-0.4.2.tar.gz
+
  python greylisting_admin.py --whitelist-domain --from '@example.com'
  tar zxvf roundcubemail-0.4.2.tar.gz
 
mv roundcubemail-0.4.2 /usr/share/apache2/
 
cd /usr/share/apache2/
 
cp roundcubemail/config/* roundcubemail-0.4.2/config/
 
chown -R www-data\: roundcubemail-0.4.2/
 
sed -i 's/roundcubemail/roundcube/g' roundcubemail-0.4.2/config/db.inc.php
 
sed -i "1s/^/create database roundcube;\n/" roundcubemail-0.4.2/SQL/mysql.initial.sql
 
sed -i "1s/^/grant all on roundcube.* to roundcube@localhost; \n/" roundcubemail-0.4.2/SQL/mysql.initial.sql
 
sed -i "1s/^/use roundcube;\n/" roundcubemail-0.4.2/SQL/mysql.initial.sql
 
  
no /etc/apache2/conf.d/roundcubemail.conf adicione
+
Referências
Alias /webmail "/usr/share/apache2/roundcubemail-0.4.2/"
+
* https://forum.iredmail.org/topic14517-recipient-address-rejected-intentional-policy-rejection-please-try-a.html
<Directory "/usr/share/apache2/roundcubemail-0.4.2/">
+
* https://ixnfo.com/en/troubleshooting-recipient-address-rejected-intentional-policy-rejection-please-try-again-later.html
    Options -Indexes
 
</Directory>
 
  
e comente a linha 12
+
== Referências ==
 +
* http://sogoth.com/?tag=postfix-message_size_limit
 +
* http://www.iredmail.org/forum/topic778-iredmail-support-error-on-changing-messagesizelimit-how-exactly-does-quota-work.html
 +
* https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-12-04
 +
* http://respirandolinux.wordpress.com/2013/08/06/postfix-bloqueando-spam-com-o-proprio-dominio/
 +
* http://www.debiantutorials.com/implementing-spf-checks-in-postfix/
 +
* [https://docs.iredmail.org/allow.insecure.pop3.imap.smtp.connections.html Allow insecure POP3/IMAP/SMTP connections without STARTTLS]
  
reinicie as configurações
+
[[Categoria:Email]]
/etc/init.d/apache2 reload
+
[[Categoria:Servidor]]
 +
[[Categoria:SPF]]

Edição das 19h41min de 3 de julho de 2021

página do projeto

pré-configuração

em /etc/apt/sources.list adicione

echo deb http://ftp.us.debian.org/debian wheezy main non-free contrib > /etc/apt/sources.list
echo deb http://security.debian.org/ wheezy/updates main non-free contrib >> /etc/apt/sources.list
echo deb http://http.us.debian.org/debian wheezy-updates main non-free contrib >> /etc/apt/sources.list

hostname

echo mail > /etc/hostname
hostname -F /etc/hostname

em /etc/hosts

127.0.0.1   mail.quijaua.net mail localhost localhost.localdomain

criando swap

Se acaso estiver usando DigitalOcean crie uma swap do tamanho da memória ram ou o dobro

dd if=/dev/zero of=/swapfile bs=1024 count=512k
chown root:root /swapfile
chmod 0600 /swapfile
mkswap /swapfile
swapon /swapfile
echo /swapfile none swap sw 0 0  >> /etc/fstab
echo 10 | tee /proc/sys/vm/swappiness
echo vm.swappiness = 10 | tee -a /etc/sysctl.conf

instalando

cd /usr/src
apt-get update
apt-get upgrade
apt-get install -y dialog bzip2 locales locales-all
wget https://bitbucket.org/zhb/iredmail/downloads/iRedMail-0.8.7.tar.bz2
tar jxvf iRedMail-0.8.7.tar.bz2
cd iRedMail-0.8.7
bash iRedMail.sh
apt-get install postgrey

implementando SPF

instalando

apt-get install postfix-policyd-spf-perl

acrescente em /etc/postfix/mainf.cf

smtpd_recipient_restrictions = [...], check_policy_service unix:private/policy

acrescente em /etc/postfix/master.cf

policy unix - n n - - spawn user=nobody argv=/usr/bin/perl /usr/sbin/postfix-policyd-spf-perl

reinicie o postfix

/etc/init.d/postfix restart

removendo iredmail

wget http://iredmail.googlecode.com/hg/extra/clear_iredmail.sh
mv clear_iredmail.sh tools/ && cd tools/
bash clear_iredmail.sh
rm -f /usr/src/iRedMail-0.8.6/./.iRedMail.installation.status

testar antivirus

permissões

aumentar tamanho de arquivo anexo

o padrão é 10M, nesse caso estou aumentando para 32M

postconf -e 'message_size_limit = 268435456'
sed -i 's/post_max_size\ =\ 12M/post_max_size\ =\ 32M/g' /etc/php5/apache2/php.ini
sed -i 's/upload_max_filesize\ =\ 10M/upload_max_filesize\ =\ 32M/g' /etc/php5/apache2/php.ini
/etc/init.d/apache2 restart
/etc/init.d/postfix restart

para ver valor atual

# postconf | grep mailbox_size_limit
# postconf | grep message_size_limit

para ver o valor padrão

# postconf -d | grep mailbox_size_limit
# postconf -d | grep message_size_limit

reiniciar todos os serviços

for i in rsyslog apache2 postfix mysql dovecot amavis clamav-daemon clamav-freshclam cron iredapd iptables; do /etc/init.d/${i} restart; done

Complementos

E-mail no Android

Recipient address rejected: Sender is not same as SMTP authenticate username

em /opt/iredapd/settings.py incluir

ALLOWED_LOGIN_MISMATCH_SENDERS = ['seu@email.com.br']

e depois reiniciar o iRedAPD

service iredapd restart

Recipient address rejected: Policy Rejection- Please try later.

Entre em /opt/iredapd/tools e rode o comando

python greylisting_admin.py --whitelist-domain --from '@example.com'

Referências

Referências