LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-07-2010, 10:20 AM   #1
w1ckedj
LQ Newbie
 
Registered: Jun 2010
Posts: 2

Rep: Reputation: 0
Postfix as Sending MTA for Multiple Domains


I am setting up a Postfix MTA that will be only sending mail for 10 different domains. We have other servers that will be receiving the mail for the domains so I only need to set up for sending on Postfix.

What my issue is I am trying to configure Postfix so that when it sends mail the header shows what domain the mail came from and not the domain the Postfix server is set to. For example....

Postfix server domain: domain1.com
Mail domain: domain2.com
Mail domain: domain3.com

When I send mail from domain2.com I want it to show in the header it was sent from domain2.com and not from domain1.com. What do I need to set in postfix so that this happens? Right now no matter what domain the mail is from the header always shows the server domain and I can't have that. Any help is greatly appreciated.
 
Old 06-08-2010, 05:11 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
I'm not saying it's not possible, but I'm not aware of any way to achieve that... postfix uses the 'myhostname' directive to determine who it says it is. You may run into problems like being marked as a spammer if your forward and reverse lookup don't match.

hth
 
Old 06-08-2010, 06:44 PM   #3
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
Check out using virtual domains for Postfix. I host multiple email domains with my server using virtual mailboxes and alias stored in a MySQL database. The messages indicate that they originate from the domain and account that sent them, not the default myhostname, which I currently have set as a local LAN. Postfix will accept and act as a relay host as long as the proper authentication is provided. That can be as simple as declaring 'my networks' if these will remain constant and can't be spoofed through SASL and encryption.
 
Old 06-11-2010, 08:48 AM   #4
w1ckedj
LQ Newbie
 
Registered: Jun 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for the help. Noway2 what you are talking about is what I need. I have to set this server up to send mail for 5 different domains and as kbp said I don't want to end up on any blacklists. Noway2 do you have a site you recommend that might show me the right way to set up the virtual domains? I have found a bunch but everyone seems to have a different way of setting things up and not sure which is the right way at this point. Thanks for the help!
 
Old 06-12-2010, 08:21 PM   #5
vince31
LQ Newbie
 
Registered: Jun 2010
Posts: 2

Rep: Reputation: 0
Postfix as partial relay

Sorry to "hijack" this thread, but it is related. What I want to do is configure Postfix so that
it really is a front end for almost all users, but not all. I want aliases (from /etc/postfix/aliases ) to be processed, but if the final (or initial) addresses are not in a local delivery table, the mail will be relayed to a different server. For example:

/etc/aliases:
group1: user1, user2, user3

local delivery
admin, postmaster, joe

Then mail to admin, postmaster and joe would be delivered locally (say by dovecot),
mail to user1, user2, user3 and user4 would be forwarded to user1@otherplace.com,
..., user4@otherplace.com

Especially I would NOT want to have to list every possible name to relay to otherplace.com.

Thanks for your help.
Vince
 
Old 06-13-2010, 07:07 AM   #6
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
@w1ckedj: Try these links. They helped me get my server up and running.
http://johnny.chadda.se/article/mail...rey-and-dspam/
http://workaround.org/ispmail/etch
http://www.howtoforge.com/virtual_po..._quota_courier

@vince31. I think you would need to start with a similar setup and use virtual hosts for the users and domains that you wish to receive for. You would then need to tell it to relay mail to the desired host by setting the relay_domains parameter. Check out this link. There is a section on how to configure Postfix to relay to a host.
http://www.postfix.org/BASIC_CONFIGU...tml#relay_from
 
  


Reply

Tags
relaying



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
multiple domains - postfix sending email with wrong address dlugasx Linux - Server 0 11-09-2009 03:20 AM
Postfix: sending mail from multiple domains scgtrp Linux - Server 6 07-21-2009 11:49 AM
Postfix sending from different domains ssfrstlstnm Linux - Server 5 04-18-2007 08:10 AM
Multiple domains for Postfix sbabcock23 Linux - Server 5 12-12-2006 09:37 AM
Postfix and multiple domains MasterC Linux - Networking 4 07-16-2003 01:19 PM

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

All times are GMT -5. The time now is 11:38 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