IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Réseau Discussion :

Configuration Postfix Directly to Internet


Sujet :

Réseau

  1. #1
    Candidat au Club
    Homme Profil pro
    Inscrit en
    Juin 2012
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Juin 2012
    Messages : 8
    Points : 2
    Points
    2
    Par défaut Configuration Postfix Directly to Internet
    Bonjour tout le monde

    Dans la boîte où je bosse nous voulons remplacer un Esafe, qu’on utilisait auparavant pour du filtrage mail, HTTP dans les deux sens, par un Postfix afin de garder que le transit de mail vers l’extérieur. Notre infra étant LAN -> Postfix (ou Esafe) -> Firewall -> Internet.

    La configuration actuelle de Esafe, en terme de Relais Mail, est « Allow eSafe to send email directly to the internet », il n’y a aucun relais mail de configurer.

    Je souhaiterais donc que le Postfix est la même configuration que l’Esafe, c'est-à-dire que tous les mails à destination de l’extérieur passent par Postfix et directement envoyé sur internet, sans qu’il y ait de relais à définir.

    J’ai donc effectué des tests, après avoir configurer au niveau réseau le serveur, en ne mettant pas de « Relais Host » dans le main.cf. Logiquement le mail devrait suivre la route par défaut et sortir sur internet. Mais cela ne fonctionne pas…

    - Quelle configuration doit avoir Postfix pour laisser passer les mails directement sur internet ?

    J’ai peut être oublié un point important dans la logique de Postfix d’où mon post.

    Je ne sais pas si j’ai été assez clair, n’hésitez pas à me poser des questions.

    Merci d’avance.

  2. #2
    Expert confirmé
    Avatar de Katyucha
    Femme Profil pro
    DevUxSecScrumOps Full Stack Bullshit
    Inscrit en
    Mars 2004
    Messages
    3 287
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Irlande

    Informations professionnelles :
    Activité : DevUxSecScrumOps Full Stack Bullshit

    Informations forums :
    Inscription : Mars 2004
    Messages : 3 287
    Points : 5 075
    Points
    5 075
    Par défaut
    Tu peux donner ton main.cf ? ca sera plus facile
    Merci
    Grave urgent !!!

  3. #3
    Candidat au Club
    Homme Profil pro
    Inscrit en
    Juin 2012
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Juin 2012
    Messages : 8
    Points : 2
    Points
    2
    Par défaut
    Bonjour,

    Désolé du temps de réponse mais je pensais que mon message avait été posté.

    Ci-dessous mon main.cf ainsi que des logs que j'obtiens.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    smtpd_banner=$myhostname ESMTP $mail_name (Debian/GNU)
    biff=no
    append_dot_mydomain=no
    readme_directory=no
    smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
    smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
    smtpd_use_tls = no
    smtpd_tls_session_cache_database=btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database=btree:/var/lib/postfix/smtpd_tls_session_cache
    myhostname = postmail.teamlog.intra
    alias_database=hash:/etc/postfix/aliases
    mailbox_size_limit = 20480000
    recipient_delimiter=+
    inet_interfaces = all
    address_verify_map = btree:/var/lib/postfix/verify
    address_verify_negative_cache = yes
    address_verify_poll_count = 3
    address_verify_poll_delay = 3s
    address_verify_sender = 
    address_verify_negative_expire_time = 3d
    address_verify_negative_refresh_time = 3h
    address_verify_positive_expire_time = 31d
    address_verify_positive_refresh_time = 7d
    message_size_limit = 20480000
    virtual_mailbox_limit = 20480000
    default_destination_recipient_limit = 50
    smtpd_recipient_limit = 1000
    mime_nesting_limit = 100
    minimal_backoff_time = 300s
    maximal_backoff_time = 4000s
    maximal_queue_lifetime = 5d
    bounce_queue_lifetime = 5d
    smtp_connection_cache_on_demand = yes
    smtp_connection_cache_time_limit = 2s
    smtp_connection_reuse_time_limit = 300s
    connection_cache_ttl_limit = 2s
    connection_cache_status_update_time = 600s
    smtpd_error_sleep_time = 1s
    smtpd_soft_error_limit = 10
    smtpd_hard_error_limit = 20
    smtpd_client_connection_count_limit = 50
    smtpd_client_connection_rate_limit = 0
    smtpd_client_message_rate_limit = 0
    smtpd_client_recipient_rate_limit = 0
    smtpd_client_new_tls_session_rate_limit = 0
    initial_destination_concurrency = 5
    default_destination_concurrency_limit = 20
    smtp_destination_concurrency_limit = 20
    local_destination_concurrency_limit = 2
    default_process_limit = 100
    qmgr_message_recipient_limit = 20000
    in_flow_delay = 1s
    smtp_connect_timeout = 30s
    smtp_helo_timeout = 300s
    queue_run_delay = 300s
    daemon_directory = /usr/lib/postfix
    smtpd_delay_reject = yes
    smtpd_sasl_auth_enable = no
    smtpd_sasl_authenticated_header = yes
    smtpd_tls_auth_only = no
    broken_sasl_auth_clients = yes
    smtpd_sasl_local_domain = 
    smtpd_tls_security_level = may
    smtpd_tls_received_header = yes
    smtpd_restriction_classes = artica_restrict_relay_domains
    smtp_sasl_security_options = noanonymous
    smtp_sasl_tls_security_options = noanonymous
    smtp_sasl_mechanism_filter = login, plain, digest-md5, cram-md5, !gssapi, !external, static:all
    artica-filter_destination_recipient_limit = 1
    content_filter = 
    zarafa_destination_recipient_limit = 1
    mailbox_transport = lmtp:unix:/var/spool/postfix/var/run/cyrus/socket/lmtp
    lmtp_sasl_auth_enable = no
    body_checks = regexp:/etc/postfix/body_checks
    bounce_service_name=bounce
    bounce_size_limit=20480000
    bounce_notice_recipient=postmaster
    double_bounce_sender = double-bounce
    header_address_token_limit=10240
    smtpd_reject_unlisted_recipient=yes
    qmgr_message_recipient_minimum=10
    smtpd_timeout=300
    enable_original_recipient=yes
    ignore_mx_lookup_error=no
    disable_dns_lookups=yes
    smtpd_tls_ask_ccert=no
    smtpd_tls_req_ccert=no
    smtp_sender_dependent_authentication = no
    undisclosed_recipients_header=To: undisclosed-recipients:;
    smtp_tls_mandatory_protocols=SSLv3,TLSv1
    2bounce_notice_recipient = postmaster
    error_notice_recipient = postmaster
    delay_notice_recipient = postmaster
    empty_address_recipient = postmaster
    smtp_send_xforward_command=yes
    smtpd_sasl_path=smtpd
    virtual_uid_maps=static:5000
    virtual_gid_maps=static:5000
    bounce_template_file = /etc/postfix/bounce.template.cf
    virtual_transport=$mailbox_transport
    multi_instance_directories = 
    inet_protocols = ipv4
    relay_domains = hash:/etc/postfix/relay_domains
    notify_class = software,resource,policy,delay,2bounce,bounce,protocol
    smtp_sasl_auth_enable = no
    recipient_bcc_maps = hash:/etc/postfix/recipient_bcc,pcre:/etc/postfix/copy.pcre
    mydomain = $myhostname
    sample_directory=/etc/postfix
    sendmail_path=/usr/sbin/sendmail
    html_directory=no
    setgid_group=postdrop
    command_directory=/usr/sbin
    manpage_directory=/usr/local/man
    newaliases_path=/usr/bin/newaliases
    mailq_path=/usr/bin/mailq
    queue_directory=/var/spool/postfix
    mail_owner=postfix
    data_directory=/var/lib/postfix
    smtpd_tls_session_cache_timeout=3600s
    myorigin = postmail.teamlog.intra
    relayhost = 
    smtp_bind_address6 = 
    recipient_canonical_maps = 
    local_recipient_maps = 
    smtpd_sasl_exceptions_networks = 100.30.1.6,100.30.1.0,192.5.1.0
    auth_relay = 
    master_service_disable = 
    disable_vrfy_command=no
    artica_restrict_relay_domains = reject_unverified_recipient
    mime_header_checks = regexp:/etc/postfix/mime_header_checks,regexp:/etc/postfix/mime_header_checks
    smtp_fallback_relay = 
    luser_relay = 
    smtpd_sender_restrictions = 
    smtpd_end_of_data_restrictions = 
    header_checks = pcre:/etc/postfix/pcre_headers_checks
    receive_override_options=
     
    ############ RESTRICTIONS ############
    mynetworks = 100.30.1.0/24, 127.0.0.0/8
    artica_destination_recipient_limit = 1
    virtual_alias_maps = hash:/etc/postfix/virtual,pcre:/etc/postfix/virtual.domains
    relay_recipient_maps = 
    sender_canonical_maps = hash:/etc/postfix/sender_canonical
    smtp_generic_maps = hash:/etc/postfix/smtp_generic_maps
    sender_dependent_relayhost_maps = hash:/etc/postfix/sender_dependent_relayhost
    smtp_sasl_password_maps = 
    transport_maps = hash:/etc/postfix/transport.throttle, hash:/etc/postfix/transport, hash:/etc/postfix/transport.banned,hash:/etc/postfix/copy.transport
    smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,check_recipient_access hash:/etc/postfix/relay_domains_restricted,check_recipient_access hash:/etc/postfix/amavis_bypass_rcpt,reject_unauth_destination
    smtpd_client_restrictions = 
    smtp_connection_cache_destinations = 
    smtpd_client_event_limit_exceptions =
    LOGS :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    Jun 12 13:58:39 postmail postfix/smtpd[17014]: connect from tou1lap0015.nomdedomaine[x.x.x.x]
    Jun 12 13:58:39 postmail postfix/smtpd[17014]: F05AC427A6: client=tou1lap0015.nomdedomaine[x.x.x.x]
    Jun 12 13:58:40 postmail postfix/cleanup[17017]: F05AC427A6: message-id=<007801cd4892$a36df590$ea49e0b0$@toto@domaineemetteur>
    Jun 12 13:58:40 postmail postfix/qmgr[4656]: F05AC427A6: from=<toto@domaineemetteur>, size=22654, nrcpt=1 (queue active)
    Jun 12 13:58:40 postmail postfix/smtp[17018]: F05AC427A6: to=<toto@domainerecepteur>, relay=none, delay=0.23, delays=0.18/0.01/0.04/0, dsn=5.4.4, status=bounced (unable to look up host domaineemetteur: Name or service not known)
    Jun 12 13:58:40 postmail postfix/cleanup[17017]: 3EB02427A9: message-id=<20120612115840.3EB02427A9@postmail.nomdedomaine>
    Jun 12 13:58:40 postmail postfix/qmgr[4656]: 3EB02427A9: from=<>, size=24611, nrcpt=1 (queue active)
    Jun 12 13:58:40 postmail postfix/bounce[17019]: F05AC427A6: sender non-delivery notification: 3EB02427A9
    Jun 12 13:58:40 postmail postfix/qmgr[4656]: F05AC427A6: removed
    Jun 12 13:58:40 postmail postfix/smtp[17018]: 3EB02427A9: to=<toto@domaineemetteur>, relay=none, delay=0.05, delays=0.05/0/0.01/0, dsn=5.4.4, status=bounced (unable to look up host domaineemetteur: Name or service not known)
    Jun 12 13:58:40 postmail postfix/qmgr[4656]: 3EB02427A9: removed
    Jun 12 13:58:42 postmail postfix/smtpd[17014]: disconnect from tou1lap0015.nomdedomaine[x.x.x.x]
    Et quand j'envoie vers une adresse mail Externe à mon domaine, je pense que pour mon domaine c'est la résolution qui passe pas, mais pour les adresses tels que Hotmail ou Yahoo...

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     Jun 12 16:57:29 postmail postfix/smtp[2914]: connect to hotmail.com[65.55.72.167]:25: Connection timed out
        Jun 12 16:57:50 postmail postfix/smtp[2914]: connect to hotmail.com[65.55.72.151]:25: Connection timed out
        Jun 12 16:57:50 postmail postfix/smtp[2914]: 1A4AC41316: to=<adressemail@hotmail.com>, relay=none, delay=520, delays=436/0.02/84/0, dsn=4.4.1, status=deferred (connect to hotmail.com[65.55.72.151]:25: Connection timed out)
    Au niveau de mon firewall tous les flux sont ouvert vers l'extérieur pour ce serveur, le temps des tests. Et quand j'envoie un mail en passant par un relais SMTP publique cela fonctionne. J'ai l'impression que Postfix n'arrive pas à résoudre les enregistrements MX des domaines (yahoo, gmx, hotmail...).

  4. #4
    Candidat au Club
    Homme Profil pro
    Inscrit en
    Juin 2012
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Juin 2012
    Messages : 8
    Points : 2
    Points
    2
    Par défaut
    Je viens de faire un test avec la résolution MX et j'obtiens d'autres serveurs sur lesquels je peux faire un telnet du port 25.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    root@postmail:~# dig hotmail.com mx
     
    ; <<>> DiG 9.7.3 <<>> hotmail.com mx
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60686
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 24
     
    ;; QUESTION SECTION:
    ;hotmail.com.                   IN      MX
     
    ;; ANSWER SECTION:
    hotmail.com.            2251    IN      MX      5 mx2.hotmail.com.
    hotmail.com.            2251    IN      MX      5 mx3.hotmail.com.
    hotmail.com.            2251    IN      MX      5 mx4.hotmail.com.
    hotmail.com.            2251    IN      MX      5 mx1.hotmail.com.
     
    ;; ADDITIONAL SECTION:
    mx2.hotmail.com.        350     IN      A       65.54.188.110
    mx2.hotmail.com.        350     IN      A       65.54.188.126
    mx2.hotmail.com.        350     IN      A       65.54.188.72
    mx2.hotmail.com.        350     IN      A       65.55.92.152
    mx2.hotmail.com.        350     IN      A       65.55.37.88
    mx2.hotmail.com.        350     IN      A       65.55.37.120
    mx2.hotmail.com.        350     IN      A       65.55.37.72
    mx2.hotmail.com.        350     IN      A       65.55.37.104
    mx2.hotmail.com.        350     IN      A       65.55.92.136
    mx2.hotmail.com.        350     IN      A       65.55.92.168
    mx2.hotmail.com.        350     IN      A       65.55.92.184
    mx2.hotmail.com.        350     IN      A       65.54.188.94
    mx3.hotmail.com.        3557    IN      A       65.55.37.104
    mx3.hotmail.com.        3557    IN      A       65.55.37.120
    mx3.hotmail.com.        3557    IN      A       65.55.92.152
    mx3.hotmail.com.        3557    IN      A       65.55.37.88
    mx3.hotmail.com.        3557    IN      A       65.55.92.136
    mx3.hotmail.com.        3557    IN      A       65.55.92.184
    mx3.hotmail.com.        3557    IN      A       65.54.188.72
    mx3.hotmail.com.        3557    IN      A       65.54.188.94
    mx3.hotmail.com.        3557    IN      A       65.54.188.110
    mx3.hotmail.com.        3557    IN      A       65.54.188.126
    mx3.hotmail.com.        3557    IN      A       65.55.92.168
    mx3.hotmail.com.        3557    IN      A       65.55.37.72
     
    ;; Query time: 26 msec
    ;; SERVER: 100.30.13.240#53(100.30.13.240)
    ;; WHEN: Thu Jun 14 11:21:00 2012
    ;; MSG SIZE  rcvd: 493
     
    root@postmail:~# telnet 65.54.188.110 25
    Trying 65.54.188.110...
    Connected to bay0-mc3-f.bay0.hotmail.com (65.54.188.110).
    Escape character is '^]'.
    220 BAY0-MC3-F17.Bay0.hotmail.com Sending unsolicited commercial or bulk e-mail to Microsoft's computer network is prohibited. Other restrictions are found at http://privacy.microsoft.com/en-us/anti-spam.mspx. Thu, 14 Jun 2012 02:21:13 -0700
    Connection closed by foreign host.
    Lorsque j'envoie un mail il ne s'agit pas des serveurs MX des domaines.

  5. #5
    Candidat au Club
    Homme Profil pro
    Inscrit en
    Juin 2012
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Juin 2012
    Messages : 8
    Points : 2
    Points
    2
    Par défaut
    Et quand je rentre une de ces adresses ip comme "relay =" cela fonctionne et mon mail arrive à destination, que ça soit avec yahoo ou hotmail...

  6. #6
    Candidat au Club
    Homme Profil pro
    Inscrit en
    Juin 2012
    Messages
    8
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Juin 2012
    Messages : 8
    Points : 2
    Points
    2
    Par défaut
    Plus d'idée ??

    J'ai fais un test en résolvant un domaine en faisant "nslookup --> set type=mx-->yahoo.fr" puis en mettant dans "Relais Host" le nom de domaine que j'ai obtenu. Mon serveur résout bien le domaine et mon mail arrive à destination... J'ai essayé différent serveurs DNS publique en plus des serveurs DNS interne à l'entreprise et ceux là fonctionnent. Cependant le serveur ne résout toujours pas lors d'un envois de mail...

Discussions similaires

  1. Configuration de mon site internet en local
    Par Giantrick dans le forum Apache
    Réponses: 37
    Dernier message: 11/02/2007, 00h02
  2. Configuration postfix - probleme mail (ispconfig)
    Par thibaut06 dans le forum Debian
    Réponses: 5
    Dernier message: 24/10/2006, 00h27
  3. Configuration PostFix-LDAP
    Par xamxeladog dans le forum Réseau
    Réponses: 2
    Dernier message: 27/05/2005, 14h40
  4. Configuration postfix + courier pop3 + courier imap
    Par eric.bruneau dans le forum Réseau
    Réponses: 4
    Dernier message: 10/02/2005, 15h52

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo