LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-25-2008, 12:31 AM   #1
su-se
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Rep: Reputation: 0
How to setup Mail Relay server on SUSE Linux ES9 using Postfix 2.1.2


Hi All,

Please find below the scenario, which I need to setup. Please help me to setup the same.

OS : SUSE Linux ES9
SMTP using Postfix 2.1.2
Bind : ver 9

Simple Mail Transfer Protocol Relay

In order to relay mail to the XYZ corporate email servers, the following relays must be configured:

SMTP Relay Configuration
Relay Description

mail1.pif.XYZ.com.au XYZ Corporate
mail2.qif.XYZ.com.au XYZ Corporate
mail3.pif.XYZ.com.au XYZ Corporate
mail4.qif.XYZ.com.au XYZ Corporate
exteralmail.com XYZ

Below are the configuration which needs to be done.

1) In-Bound Email
The SMTP server will not receive any email from the Internet, so Postfix must be configured to block in-bound emails.

2) Out-Bound Email
The SMTP server will be configured to masquerade ‘XYZ.com’ as the default domain name for Out-Bound emails.

I would be grateful if anyone can help me to setup the above scenario.

Thanks & Regards,
Su-Se
(MB)

Last edited by su-se; 09-11-2008 at 08:03 PM.
 
Old 06-25-2008, 01:16 AM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Have you read any of the docs on the postfix website (I'd guess not given question 1)

I think the second part you can achieve with simple transport maps (but your relay description doesn't make lot of sense). You can probably achieve (1) with the simple use of inet_interfaces in main.cf. You could do it through iptables pretty simply too

There's a whole section on address rewriting on the postfix documentation page. You should start there.

Last edited by billymayday; 06-25-2008 at 01:18 AM.
 
Old 06-25-2008, 03:44 AM   #3
su-se
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for you reply.

I am Newbie to this SUSE Linux.

I had read some docs regarding Postfix configuration, but I am not able to find the exact details.

Could you please send the steps how to configure it.

Appreciate you kind help.

Regards,
Su-Se
(MB)
 
Old 06-25-2008, 04:30 AM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
No, but read

http://www.postfix.org/postconf.5.html#inet_interfaces

and

http://www.postfix.org/STANDARD_CONF...ON_README.html

then

http://www.postfix.org/ADDRESS_REWRITING_README.html

Once you've done that, come back with some specific questions with detail on what you've tried.
 
Old 06-25-2008, 07:03 AM   #5
su-se
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for the links.

I will go through and let you know if any questions.

Regards,
Su-Se
(MB)
 
Old 08-07-2008, 12:20 AM   #6
su-se
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Original Poster
Rep: Reputation: 0
I configured all the required parameters. Now i need to make this as DNS server for external name resolution (for ex: www.google.com) in production stage and I need an another server has DNS client in another stage.

Can you please help how to configure DNS server and DNS client as well.

Cheers,
Su-se
 
Old 09-11-2008, 07:58 PM   #7
su-se
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Original Poster
Rep: Reputation: 0
I am getting the below error while sending mail from client maching. Can anyone help me.


bash-3.00# telnet 10.80.0.112 25
Trying 10.80.0.112...
Connected to 10.80.0.112.
Escape character is '^]'.
220 example.com ESMTP Postfix
EHLO testingserver.com
250-example.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH LOGIN
250 8BITMIME
mail from: <sendinguser@otherdomain.com>
250 Ok
rcpt to: <recepientuser@mydomain.com>
554 <recepientuser@mydomain.com>: Relay access denied

I appreciate your kind help.
 
Old 09-11-2008, 08:23 PM   #8
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
How are you authenticating with example.com (I assume that is a server you are trying to relay through)?

Can you post the output of "postconf -n"
 
Old 09-11-2008, 08:30 PM   #9
bsswartz
LQ Newbie
 
Registered: Sep 2008
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by su-se View Post
rcpt to: <recepientuser@mydomain.com>
554 <recepientuser@mydomain.com>: Relay access denied

If postfix is supposed to accept mail for delivery to users, then your configuration does not correctly specify that mydomain.com is a destination domain of virtual domain.

If postfix is supposed relay mail to another domain, your configuration fails to specify that mydomain.com is a relay domain.

If postfix is supposed to relay mail from local users to the internet, you have failed to specify that the server should accept outbound relay mail from the connecting subnet.
 
Old 09-11-2008, 09:06 PM   #10
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Quote:
Originally Posted by bsswartz View Post
If postfix is supposed to accept mail for delivery to users, then your configuration does not correctly specify that mydomain.com is a destination domain of virtual domain.

If postfix is supposed relay mail to another domain, your configuration fails to specify that mydomain.com is a relay domain.

If postfix is supposed to relay mail from local users to the internet, you have failed to specify that the server should accept outbound relay mail from the connecting subnet.
I suspect from the chatter that the OP is trying to relay from his server via example.com.

If that's the case, the relevant doc would be http://www.postfix.org/SASL_README.html#client_sasl

We will see.
 
Old 09-12-2008, 05:54 AM   #11
su-se
LQ Newbie
 
Registered: Jun 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Hi Guys,

Thanks for your valuable reply.

Here is the output of postconf -n

Server2:~ # postconf -n
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
html_directory = /usr/share/doc/packages/postfix/html
ignore_mx_lookup_error = no
inet_interfaces = all
local_transport = error:local mail delivery is disabled
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_domains = $mydomain
mydomain = mydomain.com
myhostname = server2.mydomain.XYZ.com
mynetworks = hash:/etc/postfix/network_table
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix/README_FILES
relay_domains = hash:/etc/postfix/relay_domains_table
relayhost =
sample_directory = /usr/share/doc/packages/postfix/samples
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtpd_client_restrictions =
smtpd_helo_restrictions = permit_mynetworks, warn_if_reject reject_non_fqdn_hostname, reject_invalid_hostname, permit
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, permit
smtpd_sasl_auth_enable = yes
smtpd_sender_restrictions = permit_mynetworks, warn_if_reject reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_pipelining, permit
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550


Please find below the relay domains table

Server2:~# cat /etc/postfix/relay_domains_table
mail1.pif.XYZ.com.au XYZ Corporate
mail2.qif.XYZ.com.au XYZ Corporate
mail3.pif.XYZ.com.au XYZ Corporate
mail4.qif.XYZ.com.au XYZ Corporate
externalmail.com XYZ

And here is the output of transport file

Server2:~#cat /etc/postfix/transport
mydomain.XYZ.com :
.mydomain.XYZ.com :
* smtp:[externalmail.com]

NOTE: Mail should go directly to internet( for ex: gmail.com or yahoo.com) using mail relay server (ie, server2) from Client machine.

Last edited by su-se; 09-13-2008 at 01:02 AM.
 
  


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
Setup sendmail to send outgoing mail to relay server markdjones82 Linux - Enterprise 2 01-31-2008 03:46 AM
Setup Postfix to relay mail globemast Linux - Newbie 1 11-01-2007 10:54 PM
Suse Linux 9.1 Pro Mail Server/Relay mcadle Linux - General 0 06-30-2004 07:28 PM
Suse Linux 9.1 Mail Server/Relay setup? mcadle Linux - Newbie 0 06-23-2004 06:10 PM


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