Let's see some tricks to resolve some situations, relay with postfix:
1. How to configure postfix to use a relay host (smarthost) Remote
2. Allow postfix to accept mail relay from specific ip address.
4. How to configure virtual domains in postfix
1. How to configure postfix to use a relay host (smarthost) Remote
assume that you are using Linux and your ISP is filtering traffic on port 25, preventing the introduction of ship mail directly from your machine. The only option 'for such cases and' configure your mail server to run all your outgoing mail through your provider's server. With this postfix and 'simple.
in / etc / postfix / main.cf, set the variable:
relayhost = smtp.yourisp.com
then raise postfix:2. Allow postfix to accept mail relay from specific ip address.
In / etc / postfix / main.cf change:
mynetworks = 127.0.0.0 / 8 in mynetworks = 127.0.0.0 / 8, 192.168.0.1/24, 62.35.xx/30, xxxx
or a list of ip address (both subnets that individual hosts), separated by commas.
3. How to retransmit (relay) mail for specific domains (such as local)
You can use the file / etc / postfix / transport with the following format
somedomain.com smtp: [10.0.0.1]: 25
otherdomain.com smtp: 10.0.0.2:25
dominio_per_cui_fare_relay ; smtp: ip_server_remoto: port
The version with the IP address enclosed in [] Disable the verification of the MX records for the domain in question.
NB after each change to the / etc / postfix / transport issue the following command:
4. How to configure virtual domains in postfix
/ etc / postfix / virtual and 'a text file where you specify the domains and users that accept emails. Each virtual domain should begin with a single line containing the name of the domain.
The following lines define the domain addresses to manage. The mail will be delivered to local users listed on the right (as in this example). Clause @ domainname can deliver all other mail user indicated (catchall). You can manage more 'of a domain in this file, simply repeat the structure shown below:
dominio.com text-this-is-ignored
address1@dominio.com
utentelocale1
address2@dominio.com
utentelocale2
@dominio.com utentelocale1
' ); //-->\n
' ); //-->
This e-mail address is being protected from spambots. You need JavaScript enabled to view it
' ); //-->
' ); document.write( addy13724 ); document.write( '
' ); //-->\n
' ); //-->
' ); document.write( addy34889 ); document.write( ' ' ) //--> \\ N
');
//--> This email address is Being protected from spambots. You need JavaScript enabled to view it '); //-->
You have to tell postfix where to look for these maps for virtual aliases. The directive is in the correct file
/ etc / postfix / main.cf
and tells postfix to use the hashed version of the file you just created. The hash file is not created until 'not run the command "postmap virtual
or a list of ip address (both subnets that individual hosts), separated by commas.
3. How to retransmit (relay) mail for specific domains (such as local)
You can use the file / etc / postfix / transport with the following format
somedomain.com smtp: [10.0.0.1]: 25
otherdomain.com smtp: 10.0.0.2:25
namely:
dominio_per_cui_fare_relay ; smtp: ip_server_remoto: port
The version with the IP address enclosed in [] Disable the verification of the MX records for the domain in question.
transport_maps = hash: / etc / postfix / transportNB Check in / etc / postfix / main.cf there is the following line:
NB after each change to the / etc / postfix / transport issue the following command:
postmap hash: / etc / postfix / transport
4. How to configure virtual domains in postfix
/ etc / postfix / virtual and 'a text file where you specify the domains and users that accept emails. Each virtual domain should begin with a single line containing the name of the domain.
The following lines define the domain addresses to manage. The mail will be delivered to local users listed on the right (as in this example). Clause @ domainname can deliver all other mail user indicated (catchall). You can manage more 'of a domain in this file, simply repeat the structure shown below:
dominio.com text-this-is-ignored
postmaster@dominio.com
postmaster
address1@dominio.com
utentelocale1
address2@dominio.com
utentelocale2
@dominio.com utentelocale1
' ); document.write( addy42814 ); document.write( '
' ); //-->\n
' ); //-->
This e-mail address is being protected from spambots. You need JavaScript enabled to view it
' ); //-->
' ); document.write( addy13724 ); document.write( '
' ); //-->\n
' ); //-->
' ); //-->This e-mail address is being protected from spambots. You need JavaScript enabled to view it
' ); document.write( addy34889 ); document.write( ' ' ) //--> \\ N
');
//--> This email address is Being protected from spambots. You need JavaScript enabled to view it '); //-->
You have to tell postfix where to look for these maps for virtual aliases. The directive is in the correct file
/ etc / postfix / main.cf
and tells postfix to use the hashed version of the file you just created. The hash file is not created until 'not run the command "postmap virtual
" as we will see more' forward.
The / etc / postfix / main.cf should contain the following line
virtual_alias_maps = hash: / etc / postfix / virtual Having changed the file
0 comments:
Post a Comment