B
B
barkalov2013-08-18 04:54:57
linux
barkalov, 2013-08-18 04:54:57

Postfix relay_domains. How to send mail to the network?

Help understand.
I set up mail on VPS. Debian Postfix. The standard option, I want the mail to just go to the Internet.
I can't seem to grasp the meaning and purpose of relay_domains .
Is this the standard mechanism for sending mail "out"? Or is it made for some special purpose?
Am I doing the right thing by specifying " relay_domains = * " in the config?
If yes, and so it is necessary, then why do we need default_transport ? I'm completely confused.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
P
praporshik, 2013-08-18
@barkalov

Actually, if you run the Debian mailer configurator (dpkg-reconfigure -p low postfix), then it will be enough to add this to what it will create:

smtpd_recipient_restrictions =
    permit_sasl_authenticated,
    permit_mynetworks,
    check_client_access hash:/etc/postfix/whitelist,
    check_recipient_access hash:/etc/postfix/protected_destinations,
    check_recipient_access pcre:/etc/postfix/recipient_checks,
    check_sender_access hash:/etc/postfix/sender_access,
    permit_mx_backup,
    reject_invalid_hostname,
    reject_non_fqdn_hostname,
    reject_non_fqdn_sender,
    reject_non_fqdn_recipient,
    reject_unauth_destination,
    reject_unknown_sender_domain,
    reject_unknown_recipient_domain,
    reject_unverified_recipient,
    reject

smtpd_client_restrictions =
    permit_sasl_authenticated,
    permit_mynetworks,
    check_client_access hash:/etc/postfix/whitelist,
    check_helo_access hash:/etc/postfix/whitelist,
    check_helo_access pcre:/etc/postfix/helo_regexp_access,
    check_client_access pcre:/etc/postfix/client_regexp_access,
    reject_unknown_client,
    reject_non_fqdn_hostname,
    reject_rbl_client bl.spamcop.net

smtpd_sender_restrictions = permit_mynetworks,
   permit_sasl_authenticated,
   check_sender_access hash:/etc/postfix/whitelist,
   check_sender_access hash:/etc/postfix/sender_access,
   reject_unknown_address,
   reject_unknown_client

For details - in the documentation, because there are a lot;)

M
mihalicyn, 2013-08-18
@mihalicyn

relay_domains, as the name implies, is necessary for organizing mail relaying.
For example, if you have several MX records with different priorities and the mail came to the server
with a lower priority. He can accept it, and then forward it to the "main" mail server.
What is your problem with what? Mail not leaving? Or you can't accept? To configure mail reception,
you probably need to look at local_domains.

P
praporshik, 2013-08-18
@praporshik

The relay_domains parameter restricts what destinations this system will relay

Those. is responsible for the list of domains for which mail will be accepted for further forwarding.
The default is $mydestination. For a standard mailer - comment out at all and do not touch.

B
barkalov, 2013-08-18
@barkalov

Or is " mynetworks=* " correct?
PS: SASL is enabled.

P
praporshik, 2013-08-18
@praporshik

And the second point:

If you're connected via UUCP, see also the default_transport parameter.

Those. default_transport is only needed for the UUCP protocol. Today, few people know what it is and why.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question