erlug
[Top] [All Lists]

Re: [Erlug] Postfix: relay aperto ma non proprio

To: ERlug - Lista Pubblica <erlug@xxxxxxxxxxxxxx>
Subject: Re: [Erlug] Postfix: relay aperto ma non proprio
From: Il Pask <pask@xxxxxxxx>
Date: Tue, 04 May 2010 10:28:38 +0200
On 03/05/2010 11:57, Francesco Conti wrote:
ci stavo lavorando infatti, solo che dovrei riuscire a matchare le mail
in relay verso l'esterno AND provenienti dal server sputtanato
oppure quelle
in relay verso l'esterno AND NOT provenienti dal server sputtanato

Direi la prima che hai detto, provenienti dal server sputtanato, eventualmente MAIL FROM da un dominio o address specifico, credo tu abbia diverse opzioni, con gradi variabili di paranoia... ehm, sicurezza.

http://www.postfix.org/SMTPD_ACCESS_README.html
http://www.postfix.org/ADDRESS_VERIFICATION_README.html#how
http://www.postfix.org/postconf.5.html#relay_domains

smtpd_client_restrictions        Optional
        Reject all client commands
smtpd_sender_restrictions        Optional
        Reject MAIL FROM information
smtpd_recipient_restrictions     Required
        Reject RCPT TO information


By default, the Postfix SMTP server accepts:

    * Mail from clients whose IP address matches $mynetworks,
* Mail to remote destinations that match $relay_domains, except for addresses that contain sender-specified routing * Mail to local destinations that match $inet_interfaces or $proxy_interfaces, $mydestination, $virtual_alias_domains, or $virtual_mailbox_domains.

inserisci l'ip con cui si presenta il server sputtanato tra quelli permessi,

/etc/postfix/main.cf:
    # Allow connections from trusted networks only.
    smtpd_client_restrictions = permit_mynetworks, reject

oppure, mettere in permit "OK", il dominio d'origine (MAIL FROM) delle mail che devono essere veicolate,

/etc/postfix/main.cf:

    smtpd_sender_restrictions =
        permit_mynetworks
        ...
        check_sender_access hash:/etc/postfix/sender_access
        
/etc/postfix/sender_access:

    # Don't do this when you handle lots of email.
    aol.com                     reject_unverified_sender
    spammer@xxxxxxxxxxxxxx      REJECT
    miodominio.tld              OK
    veryevildomain.tld          REJECT
    .gmessaging.net             REJECT
    spam@                       REJECT
    ...blablabla...

operare su relayhost, relay_domains

In a typical scenario one would override the relayhost setting for address verification probes and leave everything else alone:

    /etc/postfix/main.cf:
        relayhost = $mydomain
        address_verify_relayhost =
        ...

--
 Il Pask

<Prev in Thread] Current Thread [Next in Thread>