LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-19-2008, 08:56 AM   #1
Wheddod
LQ Newbie
 
Registered: Aug 2008
Posts: 12

Rep: Reputation: 0
Postfix: help required to configure postfix to redirect email.


--------------------------------------------------------------------------------
Hi all i need some help if you wouldn't mind. I have recently moved from the dark side (windows) and installed Linux Enterprise Version 5. I am trying to install postfix on to it and i am not having much Joy. I am a newbie as far as linux goes and i am still trying to learn the commands, and having lots of fun trying to understand man pages . Here is a copy of my postconf -n (if that is of any use to anyone).

alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
default_privs = nobody
html_directory = /usr/share/doc/postfix-2.5.1-documentation/html
inet_interfaces = all
mail_owner = postfix
mail_spool_directory = /var/spool/mail
mailbox_command = /usr/bin/procmail
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydomain = NGW.UK.COM
myhostname = 7QPHK3J.ngw.uk.com
mynetworks = 10.32.0.0/16, 127.0.0.0/8
mynetworks_style = 255.255.254.0
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.5.1-documentation/readme
relayhost = [10.32.4.250]
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 550

Would someone be able to help me, i can give more details on request but i'm not sure what would be useful and what won't at the moment.

Many Thanks in advance
Dan
 
Old 08-19-2008, 10:19 AM   #2
maas187
Member
 
Registered: Aug 2008
Location: Yemen
Distribution: Fedora, CentOS, RedHat , OpenFiler, ESXI
Posts: 220

Rep: Reputation: 32
Wink

Quote:
Originally Posted by Wheddod View Post
--------------------------------------------------------------------------------
Hi all i need some help if you wouldn't mind. I have recently moved from the dark side (windows) and installed Linux Enterprise Version 5. I am trying to install postfix on to it and i am not having much Joy. I am a newbie as far as linux goes and i am still trying to learn the commands, and having lots of fun trying to understand man pages . Here is a copy of my postconf -n (if that is of any use to anyone).

alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
default_privs = nobody
html_directory = /usr/share/doc/postfix-2.5.1-documentation/html
inet_interfaces = all
mail_owner = postfix
mail_spool_directory = /var/spool/mail
mailbox_command = /usr/bin/procmail
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydomain = NGW.UK.COM
myhostname = 7QPHK3J.ngw.uk.com
mynetworks = 10.32.0.0/16, 127.0.0.0/8
mynetworks_style = 255.255.254.0
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.5.1-documentation/readme
relayhost = [10.32.4.250]
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 550

Would someone be able to help me, i can give more details on request but i'm not sure what would be useful and what won't at the moment.

Many Thanks in advance
Dan
well ...

$vi /etc/postfix/main.cf

" this is you Postfix Configration file .


edit ...
myhostname: mail.yourdomain.com
mydomain: youdomain.com
relayhost: your ISP mail server .

and start Postfix ....

$ service postfix start

......
now try to send mail.

cat "anyfile" | mail -s "postfix test" youremail@somedomain.com


.......
Regards

MaaS
 
Old 08-19-2008, 12:12 PM   #3
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,240
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
postconf -n is the correct info to provide..

What is happening now when mail arrives at the server ?

Where are you trying to redirect email to ? or is this going to be your local mail server?


what is 10.32.4.250 that is specified under the relayhost directive ?
relayhost is used for specifying an external SMTP server (typically your ISP) to handle sending mail from your server.


mynetworks_style= Should read host, class or subnet I think you want subnet. and that entry isn't really needed since you have specified a value for nynetworks


you need to specify mydestination which tells the server who to accept/relay mail for..

mydestinaton= 7QPHK3J.ngw.uk.com, localhost.ngw.uk.com, ngw.uk.com
or
mydestination = $myhostname, localhost.$mydomain $mydomain




who is hosting your email now ?
Code:
it-etch:~# dig MX ngw.uk.com

; <<>> DiG 9.5.0-P2 <<>> MX ngw.uk.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 990
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;ngw.uk.com.			IN	MX

;; ANSWER SECTION:
ngw.uk.com.		900	IN	MX	0 uk-com-wildcard-null-mx.centralnic.net.
 
Old 08-20-2008, 08:55 AM   #4
Wheddod
LQ Newbie
 
Registered: Aug 2008
Posts: 12

Original Poster
Rep: Reputation: 0
Farslayer thanks for taking the time out to help me matey

Quote:
postconf -n is the correct info to provide..

What is happening now when mail arrives at the server ?
I don't think that the mails are hitting the server. I am trying to use an SMTP mail client to send emails to the box, it connects but then discconnets after about 20 seconds of inactivity. This is just a test server that i am trying to configure. We are currently using Qmail which works fine, but the company have decided that they want it replaced as it has been inplace for years.

Quote:
what is 10.32.4.250 that is specified under the relayhost directive ?
10.32.4.250 is our current Qmail server. Basically the way out email works at the moment is, an email is sent then it is picked up by qmail and either sent to our exchange server or to message labs. As we are only licenced to have the one machine contacting message labs i am trying to get post fix to send internal mail to the exchange server and external mail to Qmail which will then send it on to message labs.

What should i do with the mynetworks_style part just # it out?

Quote:
who is hosting your email now ?
I pressume that this would be message labs.
 
  


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: cant send email from my Windows pc using my postfix mailserver elvisious Linux - Software 8 08-01-2008 08:01 PM
how to configure dovecot&sendmail&postfix to accept other domain email? hocheetiong Linux - Server 3 12-24-2007 04:55 AM
Postfix configure as email gateway cylix2000 Linux - Server 3 11-07-2006 03:44 AM
how do you config postfix to redirect incoming email to a php script genux33 Linux - General 0 12-14-2005 04:46 AM
How do I configure postfix master to forward all email to an email server ? hello321_1999 Linux - Software 1 11-18-2004 05:43 AM

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

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