LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 10-18-2003, 07:18 AM   #1
kublador
Member
 
Registered: Aug 2002
Location: Philippines
Distribution: Slackware, CentOS, Ubuntu
Posts: 325

Rep: Reputation: 30
SENDMAIL as an SMTP RELAY SERVER that can send email to internet. how?


SENDMAIL as an SMTP RELAY SERVER that can send email to internet. how?
im using rh8..
downloaded the latest version of sendmail and installed it..
i have 2 computers here..

PC1 - 192.168.0.1 - rh8 - this should be the sendmail smtp server - dial up connection
PC2 - 192.168.0.2 - winxp - internet connection shared through PC1, both pingable

well, i just want to make PC1 as an SMTP SERVER that can send email to the internet, like sending email to kublador@yahoo.com, so PC2 will use MS OUTLOOK and set the SMTP Server to the IP or the computer name of PC1 and send the email.
well, actually, im sure that my ISP is allowing to send data through port 25, because i tried a SMTP RELAY SERVER in WindowsXP and it works, i just want to do that thing also in Redhat 8.
please help.
what should i do?
 
Old 10-18-2003, 08:19 AM   #2
pablob
Member
 
Registered: Apr 2003
Location: Madrid
Distribution: RHEL, Kubuntu, Solaris, TRU64
Posts: 382

Rep: Reputation: 31
First of all I'd upgrade from sendmail to Postfix, which could be seen as a "mask" over sendmail which makes easier administration, and fixes the million bugs with sendmail.

It's an easy procedure, well documented, more secure and the most important:

No human being is able to configure sendmail. If they tell you so, they are indeed aliens. Call Mulder & Scully.

postfix config is at least human readable.

As an example:

SENDMAIL config:

##################
P=/usr/bin/procmail, F=lsSDFMAw5:/|@qPfhn9, S=10/30, R=20/40,
T=DNS/RFC822/X-Unix,
A=procmail -Y -a $h -d $u,
U=root:root
#R$*<@$*.$=T>$* $#$M $@$R
$:$1<@$2.$3>$4 user@domain.known
#R$*<@$*.$+>$* $#$M $@$R
$:$1<@$2.$3>$4 user@any.domain
R$*<@$*.$+>$* $#ddn $@ $2.$3
##################

POSTFIX config:

##################
myorigin = $mydomain
mydestination = $myhostname, localhost.$mydomain, $mydomain
relay_domains =test.com
smtpd_recipient_restrictions = permit_mynetworks
##################


Now you choose.
 
Old 10-23-2003, 02:27 AM   #3
kublador
Member
 
Registered: Aug 2002
Location: Philippines
Distribution: Slackware, CentOS, Ubuntu
Posts: 325

Original Poster
Rep: Reputation: 30
is that the config of postfix? that short?
 
Old 10-23-2003, 12:17 PM   #4
sirjosi
LQ Newbie
 
Registered: Oct 2003
Posts: 24

Rep: Reputation: 15
it may not be as simple as it seems. But the documentations Ive seen for postfix are a lot easier to understand. Im trying it myself now, but cant seem to gett smtp relaying to work...any ideas will be appreciated
 
Old 10-23-2003, 12:24 PM   #5
sirjosi
LQ Newbie
 
Registered: Oct 2003
Posts: 24

Rep: Reputation: 15
this might be what youre looking for.

http://www.redhat.com/support/resour...OWTO/x368.html

Im using sendmail now and you have to edit the Local-host files and add the different domains. Then you have to add it to virtusertable, which I believe Postfix also uses.

Im trying to migrate to Postfix. If you can tell me how you made it work, it will be much appreciated.
 
Old 10-23-2003, 12:24 PM   #6
sirjosi
LQ Newbie
 
Registered: Oct 2003
Posts: 24

Rep: Reputation: 15
dang wrong box
 
Old 10-24-2003, 04:16 AM   #7
joseph
Member
 
Registered: Jun 2003
Location: Batam
Distribution: Ubuntu 10 And Linux Mint
Posts: 414

Rep: Reputation: 30
Quote:
Originally posted by pablob
First of all I'd upgrade from sendmail to Postfix, which could be seen as a "mask" over sendmail which makes easier administration, and fixes the million bugs with sendmail.

It's an easy procedure, well documented, more secure and the most important:

No human being is able to configure sendmail. If they tell you so, they are indeed aliens. Call Mulder & Scully.

postfix config is at least human readable.

As an example:

SENDMAIL config:

##################
P=/usr/bin/procmail, F=lsSDFMAw5:/|@qPfhn9, S=10/30, R=20/40,
T=DNS/RFC822/X-Unix,
A=procmail -Y -a $h -d $u,
U=root:root
#R$*<@$*.$=T>$* $#$M $@$R
$:$1<@$2.$3>$4 user@domain.known
#R$*<@$*.$+>$* $#$M $@$R
$:$1<@$2.$3>$4 user@any.domain
R$*<@$*.$+>$* $#ddn $@ $2.$3
##################

POSTFIX config:

##################
myorigin = $mydomain
mydestination = $myhostname, localhost.$mydomain, $mydomain
relay_domains =test.com
smtpd_recipient_restrictions = permit_mynetworks
##################


Now you choose.
I don't think so, sendmail its easier to configure too, easy as postfix. i am using sendmail but i am not alien.

Please don't call Mulder and Scully to catch me. I am human being.
Actually with sendmail you can do a lot of thing.
If you want to use postfix, you can try www.postfix.org
 
Old 10-25-2003, 08:43 AM   #8
pablob
Member
 
Registered: Apr 2003
Location: Madrid
Distribution: RHEL, Kubuntu, Solaris, TRU64
Posts: 382

Rep: Reputation: 31
See !!?
He's an alien !!!!!

Now, for being serious:
The trick fro the relay SMTP is to set all the "my_networks", "my_destinations" ,etc... in a proper way.
The Postfix documentation is very rich about it.

Check "smtpd_recipient_restrictions = " parameters.
I.e.:

smtpd_client_restrictions = permit_mynetworks
smtpd_sender_restrictions = permit_mynetworks

The meaning of all this initial difficulties is NOT allowing accidental misuse of your SMTP server by spammers.



USEFUL COMMENTS I FOUND GOOGLEING:

############################################

The simplest form of relay control is accept mail for relay only from IP addresses owned by your organization, or otherwise known to be trustworthy.

mynetworks = 127.0.0.0/8 192.0.34.0/8
relay_domains =
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination, permit

The permit_mynetworks restriction returns PERMIT if the IP address of the connecting client matches an IP address in $mynetworks. The reject_unauth_destination returns REJECT if the destination is not the local machine or a member of $relay_domains.

#####################################

If your ISP is filtering traffic on port 25, thus blocking you from sending outgoing mail, and so you want to configure your mailserver to relay all your mail out through your ISP's server, like they want you to. If you're running postfix, this turns out to be very easy -- in /etc/postfix/main.cf, just set the variable:

relayhost = smtp.yourisp.com

then restart postfix (/etc/init.d/postfix restart, as root).

#####################################


More:
http://www.metaconsultancy.com/whitepapers/smtp.htm
http://www.redhat.com/support/resour...OWTO/x368.html
 
  


Reply



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
can't send email, smtp or sendmail dtra Linux - Software 1 11-19-2005 06:00 PM
Need to set up personal SMTP server to send email Whiskers Linux - General 3 08-29-2004 02:33 PM
Can't send email outside my server with sendmail rocketman3245 Mandriva 1 07-28-2004 10:01 PM
Using Postfix the send email via another smtp server - to anyone. scarstens Linux - Newbie 1 01-27-2004 03:31 PM
How can I relay email in sendmail? aarceo *BSD 1 09-14-2003 04:20 AM

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

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