Outils pour utilisateurs

Outils du site


postfixmailrelay

= Configuration de postfix comme serveur relais = En frontal devant un serveur Exchange, afin de servir système de filtrage

/etc/postfix/main.cf:

smtpd_banner	          = $myhostname ESMTP
smtpd_helo_required	  = yes
#smtpd_sender_restrictions = reject_unknown_sender_domain
smtpd_client_restrictions =
	check_client_access hash:/etc/postfix/blacklist
	reject_rbl_client relays.ordb.org
	reject_rbl_client dynablock.njabl.org
	reject_rbl_client sbl.spamhaus.org
	reject_rbl_client opm.blitzed.org
	reject_rbl_client dnsbl.njabl.org
	reject_rbl_client blackholes.wirehub.net
	reject_rbl_client list.dsbl.org
	permit_mynetworks
	reject_unauth_destination

biff		        = no
append_dot_mydomain	= no
myhostname		= HOSTNAME
mydomain		= DOMAINNAME
myorigin		= DOMMAINNAME
relay_domains		= **domaines dont on accept les mails**
relayhost		= PROVIDER'S SMTP
alias_maps		= hash:/etc/aliases
mydestination		= $myhostname, localhost.$mydomain, localhost
relay_recipient_maps	= hash:/etc/postfix/recipients
transport_maps		= hash:/etc/postfix/transport
virtual_alias_maps	= hash:/etc/postfix/virtual

/etc/postfix/transport:

relay_domains	  smtp:[ip serveur Exchange]

/etc/postfix/master.cf:

configuration pour que le filtrage ne se fasse que sur les mails sortants

modifier les références à smtp de la façon suivante:

amavis unix - - n - 2 smtp
   -o smtp_data_done_timeout=1200
   -o disable_dns_lookups=yes

127.0.0.1:10025      inet  n - n - - smtpd
   -o content_filter=
   -o local_recipient_maps=
   -o relay_recipient_maps=
   -o smtpd_restriction_classes=
   -o smtpd_client_restrictions=
   -o smtpd_helo_restrictions=
   -o smtpd_sender_restrictions=
   -o smtpd_recipient_restrictions=permit_mynetworks,reject
   -o mynetworks=127.0.0.0/8
   -o strict_rfc821_envelopes=yes

<ip interne>:25          inet  n       -       n       -       -       smtpd
 -o smtpd_client_restrictions=permit_mynetworks,reject
127.0.0.1:25          inet  n       -       n       -       -       smtpd
 -o smtpd_client_restrictions=permit_mynetworks,reject
<ip externe>:25    inet  n       -       n       -       -       smtpd
 -o content_filter=amavis:[127.0.0.1]:10024

/etc/postfix/virtual:

root            admin@opendoor.fr
postmaster	admin@opendoor.fr
fetchmail	admin@opendoor.fr
abuse		admin@opendoor.fr

/etc/postix/recipients:

liste des mails autorisés cette liste est générée automatiquement et régulièrement par le script [SmtpUserFromAdsl] ' normalement on devrait pouvoir s'en passer '

toto@domain.fr OK
tata@domain.fr OK

Remarques aditionnelles:

pour les utilisateur wanadoo, voir postfix et wanadoo

# vim: set filetype=dokuwiki:

postfixmailrelay.txt · Dernière modification: 2015/10/06 20:06 (modification externe)