LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-08-2006, 03:56 AM   #1
arjanhs
LQ Newbie
 
Registered: Jan 2005
Posts: 12

Rep: Reputation: 0
Postfix forward


I'm using postfix as a receiving mail server, i wanted to forward all incoming mail to an other host, what do i need to change for this.

Arjan
 
Old 03-09-2006, 02:41 PM   #2
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
The easy way to do this is to add the following to /etc/postfix/main.cf:

transport_maps = hash:/etc/postfix/transport

And then create the /etc/postfix/transport file with the following type of information:

server1.whatever local:
server2.whatever smtp:[111.222.333.444]
server3.whatever smtp:[server3.whatever]
 
Old 03-27-2006, 11:48 PM   #3
arjanhs
LQ Newbie
 
Registered: Jan 2005
Posts: 12

Original Poster
Rep: Reputation: 0
OK, i have added the line in the main.cf and have created transport with the following lines

<localhost name> local:
<domain name> smtp:[192.168.0.80]

I wanted all mail received on the local host be forwarded to 192.168.0.80, will it work this way ?

Arjan
 
Old 03-28-2006, 04:42 AM   #4
WindowBreaker
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 228

Rep: Reputation: 40
put this in your main.cf:
Quote:
mydestination = localhost, $myhostname
relay_domains = $mydomain
relay_transport = smtp:[192.168.0.80]
Or even better, use postconf to alter the settings for you (-e for edit) - like this:
Code:
postconf -e "mydestination = localhost, $myhostname"
postconf -e "relay_domains = $mydomain"
postconf -e "relay_transport = smtp:[192.168.0.80]"
Then, to make them take effect do:
*If postfix is running:
Code:
postfix reload
or
*If postfix isn't running:
Code:
postfix start
*Note: The reason I put in the 'mydestination' parameter is to show you that it shouldn't have $mydomain listed, since that's listed as 'relay_domains'.

Last edited by WindowBreaker; 03-28-2006 at 04:44 AM.
 
Old 04-06-2006, 03:01 AM   #5
arjanhs
LQ Newbie
 
Registered: Jan 2005
Posts: 12

Original Poster
Rep: Reputation: 0
With this script the messages are forwarded, but when someone outside tries to connect to send a message a relaying is denied message is served.

So only local generated messages are forwarded, when come from the internet they are denied.

Arjan
 
  


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
please help with Postfix+courier+forward+bcc? shadowsa SUSE / openSUSE 2 08-15-2005 10:20 PM
postfix: forward messages to root mozilla Linux - Networking 3 06-23-2005 08:11 AM
Postfix forward to another server BorgKiller *BSD 1 05-27-2005 11:07 AM
Forward All Postfix messages and deliver them dlublink Linux - Networking 1 12-27-2004 10:34 PM
Postfix Forward problem paulten Linux - Networking 1 12-14-2003 08:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:51 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration