LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-07-2008, 02:44 PM   #1
alejandroye
Member
 
Registered: May 2004
Location: SOUTH FLORIDA USA
Distribution: MANDRIVA / CENTOS
Posts: 146

Rep: Reputation: 15
postfix setup w/multi domains


hi and Thanks you

I have a server with multi domains (3), I can send mail with the first domain that I setup, but I am having problem with the others. The thing is that I am using a PHP application to ask to the visitor some information and send it to my gmail, the application is working fine but just with the first domain, and I am not receiving with the others 2 domain, I am thinking that I need to setup the postfix with virtual domain, but I am not sure, can you help me?

3 Domain
Dynamic IP
Linux,Mysql,PHP,Apache, Postfix 2.x

#postconf -n

alias_maps = hash:/etc/postfix/aliases, hash:/var/lib/mailman/data/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
delay_warning_time = 4h
html_directory = /usr/share/doc/postfix-2.1.4/html
inet_interfaces = localhost
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mynetworks_style = host
newaliases_path = /usr/bin/newaliases.postfix
owner_request_special = no
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.1.4/README_FILES
recipient_delimiter = +
sample_directory = /usr/share/doc/postfix-2.1.4/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) (Mandrake Linux)
smtpd_sasl_path = /etc/postfix/sasl:/usr/lib/sasl2
unknown_local_recipient_reject_code = 450
virtual_alias_domains = my2domain.com


Thank you,
 
Old 07-07-2008, 05:35 PM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
alejandroye,

I see one domain, a virtual_alias_domain:

Code:
virtual_alias_domains = my2domain.com
This explains why you can only send to one domain.

Do you understand the distinction of the different address classes: local, virtual_alias_domains, and virtual_mailbox_domains ?

What is the value of :

Code:
postconf -d myhostname mynetworks mydomain
You are using a "host" style mynetworks:

Code:
mynetworks_style = host
which means postfix will consider only the mail server itself as privileged to relay mail. Is that what you want?

Your php application is going to be using the sendmail compatibility binary. Postfix will pick up the mail from the queue and deliver like mail sent via SMTP.

You mention gmail - do you want all mail for your three domains to relay to your gmail account ?
 
Old 07-07-2008, 09:15 PM   #3
alejandroye
Member
 
Registered: May 2004
Location: SOUTH FLORIDA USA
Distribution: MANDRIVA / CENTOS
Posts: 146

Original Poster
Rep: Reputation: 15
Quote:
Do you understand the distinction of the different address classes: local, virtual_alias_domains, and virtual_mailbox_domains ?
yes, I want to use virtual_domains



Quote:
What is the value of :

myhostname mynetworks mydomain
on my postconf -d, say;
myhostname = my1domain.com
mynetworks = 127.0.0.0/8 192.168.1.0/24
mynetworks_style = subnet


Quote:
You are using a "host" style mynetworks:
yes, that it say on main.cf


Quote:
which means postfix will consider only the mail server itself as privileged to relay mail. Is that what you want?
I think no, I want postfix and php app. work together for the 3 domains that I have, sending mail each other.


Quote:
You mention gmail - do you want all mail for your three domains to relay to your gmail account ?
yes, the php application sendmail to gmail account


why on the postconf -n say mynetworks_style = host, they are different? or it have to be the same?


thank you for your help
 
Old 07-07-2008, 09:40 PM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Quote:
yes, I want to use virtual_domains
I can't tell if you are being careless, or you don't understand. What is "virtual_domains" ?

Where are your virtual_alias_maps ?

Quote:
Quote:
Originally Posted by Mr. C.
You are using a "host" style mynetworks:
yes, that it say on main.cf...
...
why on the postconf -n say mynetworks_style = host, they are different? or it have to be the same?
Set the style to subnet if you want all machines on the 192.168.1.0/24 network to be able to send. If you don't require other systems to send, you can just set mynetworks to 127.0.0.1/8.

Quote:
I think no, I want postfix and php app. work together for the 3 domains that I have, sending mail each other.
If they are on the same server, there is no issue. By "the mail server itself", I meant the system one which the mail server itself runs.

I only see two domains (local: my1domain.com, and a virtual alias domain: my2domain.com. Where is the third domain?

I'm sorry, but this is getting painful. I don't think we're converging towards getting your system working, because you are not clarifying what you want. I won't do it for you, and I won't work harder at trying to figure out what you have done, have not done, and don't understand. You need to drive this process...

Move forward, and ask question about things you don't understand. And be sure to read:

http://www.postfix.org/SOHO_README.html
 
Old 07-07-2008, 11:27 PM   #5
alejandroye
Member
 
Registered: May 2004
Location: SOUTH FLORIDA USA
Distribution: MANDRIVA / CENTOS
Posts: 146

Original Poster
Rep: Reputation: 15
Quote:
I can't tell if you are being careless, or you don't understand. What is "virtual_domains" ?

Where are your virtual_alias_maps ?
yes, you right, I was confused about all this setting, very sorry, I will try to read more about this. I changed back all my postfix setting and I left all original configuration.

so, this the original postconf -d

mydomain = my1domain.com
myhostname = my1domain.com
mynetworks = 127.0.0.0/8 192.168.1.0/24
mynetworks_style = host
myorigin = $myhostname

and this is the postconf -n

alias_maps = hash:/etc/postfix/aliases, hash:/var/lib/mailman/data/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
delay_warning_time = 4h
html_directory = /usr/share/doc/postfix-2.1.4/html
inet_interfaces = localhost
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mynetworks_style = host
newaliases_path = /usr/bin/newaliases.postfix
owner_request_special = no
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.1.4/README_FILES
recipient_delimiter = +
sample_directory = /usr/share/doc/postfix-2.1.4/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) (Mandrake Linux)
smtpd_sasl_path = /etc/postfix/sasl:/usr/lib/sasl2
unknown_local_recipient_reject_code = 450


I just want to add to this original configuration, the two others domain (my2domain, my3domain) to get the sendmail and the php application work fine.

and as I told you, I got the server original configurated for 1 domain(my1domain), it was working fine with the php application sending email, ("ie: mail($email, $email_subject, $confirmation, $headers);"), after 6 month I added one domain more to the server(my2domain), and I added other php application to sendmail, but I didn't make any change on the postfix setup, I noticed that I was not receiving email from the second, 2 months later I added 3th domain(my3domain) and I did the same, but, also I noticed that I was not receiving email neither.

All this domain are working on the same machine with a dynamic IP, hosting all my php code and using zoneedit and godaddy as 3th company.

Mr. C.
once again thank you for any help and sorry for all this mess.
 
Old 07-08-2008, 12:02 AM   #6
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
You can just add the other two domains to mydomains.

mydomains = my1domain.com, my2domain.com, my3domain.com

The thing to understand about local domains, is that each user in your system, say, user bob, is a valid address in each of the domains: bob@my1domain.com == bob@my2domain.com == bob@my3domain.com. Local domains share the local part user space.
 
Old 07-08-2008, 11:29 AM   #7
alejandroye
Member
 
Registered: May 2004
Location: SOUTH FLORIDA USA
Distribution: MANDRIVA / CENTOS
Posts: 146

Original Poster
Rep: Reputation: 15
hi all,

Once again

I have 1 machine with Dynamic IP and linux server(LAMP), postfix for mail, I am hosting 3 websites each website has a php application page where I ask people information and submit to me by email and also the visitor receive a email confirmation, so the php app send 2 emails. My server not receive emails, all 3 email contact are hosted by 3th companies(zoneedit,godaddy), forwaring the info to my gmail account,so, my server just send email.

Now, the php app is working fine just for the first domain, and the issue is that I am not receiving email from the others 2 domain

In the beginning, when I setup the server I never setup postfix, so I think is setup just for one domain, and when the php app send the email it don't go through the ISP.
I really do not know how to setup the postfix to send email on the same machine as my1domain.com, my2domain.com my3domain.com.

this is my postconf -n

alias_maps = hash:/etc/postfix/aliases, hash:/var/lib/mailman/data/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
delay_warning_time = 4h
html_directory = /usr/share/doc/postfix-2.1.4/html
inet_interfaces = localhost
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mynetworks_style = host
newaliases_path = /usr/bin/newaliases.postfix
owner_request_special = no
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.1.4/README_FILES
recipient_delimiter = +
sample_directory = /usr/share/doc/postfix-2.1.4/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) (Mandrake Linux)
smtpd_sasl_path = /etc/postfix/sasl:/usr/lib/sasl2
unknown_local_recipient_reject_code = 450


somebody can help me, I will really appreciate
 
Old 07-08-2008, 06:46 PM   #8
alejandroye
Member
 
Registered: May 2004
Location: SOUTH FLORIDA USA
Distribution: MANDRIVA / CENTOS
Posts: 146

Original Poster
Rep: Reputation: 15
I fixed, thks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 - how do hosted domains download their mail from my postfix franschoek Linux - Software 1 04-01-2006 09:41 PM
run multi-domains in Postfix importboy03 Linux - Networking 0 05-21-2003 05:38 PM
setup multi domains email in postfix importboy03 Linux - Software 1 04-29-2003 04:06 PM
sendmail +multi domains zeky Linux - General 1 12-21-2002 11:10 AM
PostFix multipe domains (virtual setup) dulaus Linux - Networking 0 10-10-2002 04:58 PM

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

All times are GMT -5. The time now is 09:41 AM.

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