LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-04-2017, 01:13 AM   #1
Dante K
LQ Newbie
 
Registered: Sep 2017
Posts: 1

Rep: Reputation: Disabled
Question Postfix multiple instance only default instance work


Hello all,
Let me explain what I'm doing and what I want to reach from this postfix multiple instances

Quote:
I have domain for example "example1.com" and "mail.example1.com" for mail server and has proper DNS MX records and everything is fine, Now I have another domain "example2.com" and "mail.example2.com" for mail server, Each time I send mail from server the mail went to clients SPAM folder and the smtp.mailfrom shows "mail.example1.com"& IP: 1.1.1.1 (for example) at the end I found the newer domain in websites mails blacklist databases, So I searched for a solution but at the end it appears that I must use 2 myhostname by create additional postfix instance to accomplish this and for complete isolation.


I created another instance called "postfix-secondary" via this command:

Code:
    postmulti -e init
Then created it by this command:

Code:
    postmulti -I postfix-secondary -e create
After that mad it run via this:

Code:
    postmulti -i postfix-secondary -p start
The problem now is the emails still forced to go through "mail.example1.com" even with disabled the default mail server and I see it kept gathered in the default queue

I will list the configs now

(example1.com) /etc/postfix/main.cf:

Code:

    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=yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    
    smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination check_sender_access hash:/etc/postfix/mail_blacklist
    myhostname = mail.example1.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = mail.example1.com, example1.com, localhost.example1.com, localhost
    relayhost = 
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = 1.1.1.1
    inet_protocols = ipv4
    
    smtpd_recipient_restrictions = reject_invalid_hostname,
            reject_unknown_recipient_domain,
            reject_unauth_destination,
    		reject_invalid_hostname,
            reject_non_fqdn_hostname,
            reject_non_fqdn_sender,
    		reject_non_fqdn_recipient,
    		reject_unknown_sender_domain,
    		reject_unknown_recipient_domain,
            reject_rbl_client sbl.spamhaus.org,
    		reject_rbl_client cbl.abuseat.org,
    		reject_rbl_client dul.dnsbl.sorbs.net,
            permit
    
    smtpd_helo_restrictions = reject_invalid_helo_hostname,
            reject_non_fqdn_helo_hostname,
    		reject_non_fqdn_hostname,
    		reject_invalid_hostname,
            reject_unknown_helo_hostname
    
    
    default_process_limit = 100
    smtpd_client_connection_count_limit = 10
    smtpd_client_connection_rate_limit = 30
    queue_minfree = 20971520
    header_size_limit = 51200
    message_size_limit = 10485760
    smtpd_recipient_limit = 100
    disable_vrfy_command= yes
    smtpd_helo_required = yes
    smtpd_delay_reject = yes
    smtpd_error_sleep_time = 1s
    smtpd_soft_error_limit = 10
    smtpd_hard_error_limit = 20
(example1.com) /etc/postfix/master.cf (default)

Code:
    smtp      inet  n       -       -       -       -       smtpd
(example2.com) /etc/postfix-secondary/main.cf

Code:
    unknown_local_recipient_reject_code = 550
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
    debugger_command =
    	 PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
    	 ddd $daemon_directory/$process_name $process_id & sleep 5
    
    readme_directory = no
    inet_protocols = ipv4
    #master_service_disable = inet
    authorized_submit_users = 
    queue_directory = /var/spool/postfix-secondary
    multi_instance_name = postfix-secondary
    
    myhostname = mail.example2.com
    inet_interfaces = 2.2.2.2
    multi_instance_enable = yes
    mydestination = mail.example2.com, example2.com, localhost.example2.com, localhost
    
    
    
    smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination check_sender_access hash:/etc/postfix/mail_blacklist
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    relayhost = 
    mailbox_size_limit = 0
    recipient_delimiter = +
    #smtp_bind_address = 0.0.0.0
    
    
    smtpd_recipient_restrictions = reject_invalid_hostname,
            reject_unknown_recipient_domain,
            reject_unauth_destination,
    		reject_invalid_hostname,
            reject_non_fqdn_hostname,
            reject_non_fqdn_sender,
    		reject_non_fqdn_recipient,
    		reject_unknown_sender_domain,
    		reject_unknown_recipient_domain,
            reject_rbl_client sbl.spamhaus.org,
    		reject_rbl_client cbl.abuseat.org,
    		reject_rbl_client dul.dnsbl.sorbs.net,
            permit
    
    smtpd_helo_restrictions = reject_invalid_helo_hostname,
            reject_non_fqdn_helo_hostname,
    		reject_non_fqdn_hostname,
    		reject_invalid_hostname,
            reject_unknown_helo_hostname
    
    
    default_process_limit = 100
    smtpd_client_connection_count_limit = 10
    smtpd_client_connection_rate_limit = 30
    queue_minfree = 20971520
    header_size_limit = 51200
    message_size_limit = 10485760
    smtpd_recipient_limit = 100
    disable_vrfy_command= yes
    smtpd_helo_required = yes
    smtpd_delay_reject = yes
    smtpd_error_sleep_time = 1s
    smtpd_soft_error_limit = 10
    smtpd_hard_error_limit = 20
    
    
    
    append_dot_mydomain = 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=yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
(example2.com) /etc/postfix-secondary/master.cf (default)

Code:
    smtp      inet  n       -       -       -       -       smtpd
The DNS records for (example1.com) is fine and same as DNS for (example2.com) execpt different domain & IP:

Code:
    example2.com.	IN	MX	10 mail.example2.com.
    mail.example2.com.          IN      A  2.2.2.2
    example2.      IN TXT     "v=spf1 mx ip4:2.2.2.2/32 ~all"
    _dmarc.example2.com.	IN	TXT	"v=DMARC1; pct=100; p=none; adkim=r; aspf=r"
I really need to hide the first domain (example1.com) from the mails info of (example2.com) mails. I need complete isolation. So if anyone try to know the sender he only gets (mail.example2.com), It is been 6 days since I encounter this issue and I can't progress because of this headache.

Thanks in advance

Last edited by Dante K; 09-04-2017 at 01:15 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
postfix instance harish-mn Linux - Newbie 31 09-18-2016 04:24 PM
postfix instance saurabhkumar Linux - Server 1 04-13-2014 06:25 PM
[SOLVED] Switch to instance instead of creating a new instance of a program javascriptninja Linux - Newbie 8 01-28-2012 03:39 PM
multiple instance of X satinet Linux - General 3 03-10-2005 01:05 PM
Second postfix instance divingdave Linux - Software 0 07-16-2004 12:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration