Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-21-2006, 01:46 AM
|
#1
|
Member
Registered: May 2006
Posts: 69
Rep:
|
Slackware, Sendmail, SMTP, SSH Tunnels
I am running Slackware 10.2 with Sendmail 8.13.4. My school has configured it's network in a way that prevents anyone from using port 25, and therefore disabling smtp. I would like to be able to forward the mail from my machine to my school's smtp server, smtp.school.edu .
Does anyone have advice on how to accomplish this?
I am a little confused as to how to go about it. My first thoughts were that maybe all I need to do is configure /usr/share/sendmail/cf/cf/sendmail-slackware.mc so that I have a line that looks like this:
define('SMART_HOST','smtp.school.edu')
However, I am not sure if that would work, since port 25 is completely blocked. Does sendmail forward it's mail to the smart host via port 25? If that's the case, then I was thinking that I could set up an ssh tunnel between my machine and a machine that has access to smtp.school.edu and define my smart host like this:
define('SMART_HOST','localhost')
Similar to how it was done at http://www.underlinux.com.br/content/view/4549/58/
If I take this approach, though, I would need to establish the ssh tunnel when I boot up my machine, before the sendmail daemon initializes. So, if I need to take this route, could anyone offer some advice on which rc script I should look at to set up this tunnel?
|
|
|
05-21-2006, 03:15 AM
|
#2
|
Senior Member
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132
Rep:
|
Quote:
Originally Posted by anamericanjoe
I am running Slackware 10.2 with Sendmail 8.13.4. My school has configured it's network in a way that prevents anyone from using port 25, and therefore disabling smtp.
|
You can always run the mail server on a different port. But I doubt that you will need to.
Quote:
Originally Posted by anamericanjoe
I would like to be able to forward the mail from my machine to my school's smtp server, smtp.school.edu .
Does anyone have advice on how to accomplish this?
I am a little confused as to how to go about it. My first thoughts were that maybe all I need to do is configure /usr/share/sendmail/cf/cf/sendmail-slackware.mc so that I have a line that looks like this:
define('SMART_HOST','smtp.school.edu')
|
If you are going to generate a config all proper like, that would be a solid first step. If you want to do it quick & dirty, just edit /etc/mail/sendmail.cf directly to define the smart host. Restart sendmail and see if it works.
Quote:
Originally Posted by anamericanjoe
However, I am not sure if that would work, since port 25 is completely blocked.
|
YOUR port 25 may be blocked, but I would wager that the school's port 25 is working just fine.
Quote:
Originally Posted by anamericanjoe
Does sendmail forward it's mail to the smart host via port 25? If that's the case, then I was thinking that I could set up an ssh tunnel between my machine and a machine that has access to smtp.school.edu and define my smart host like this:
define('SMART_HOST','localhost')
Similar to how it was done at http://www.underlinux.com.br/content/view/4549/58/
If I take this approach, though, I would need to establish the ssh tunnel when I boot up my machine, before the sendmail daemon initializes. So, if I need to take this route, could anyone offer some advice on which rc script I should look at to set up this tunnel?
|
Sounds like a lot of work. Try the easy way first and see what isssues you have. You may want to ask how the schools mail server is set up, though, so you will know if you need SMTP AUTH or anything else to get things working for you.
|
|
|
05-21-2006, 07:15 PM
|
#3
|
Member
Registered: May 2006
Posts: 69
Original Poster
Rep:
|
Quote:
Originally Posted by shilo
Try the easy way first and see what isssues you have.
|
OK, so I have tried the easy way, but when I send mail from my machine it is not getting through to its destination. Any advice on where to go from here?
|
|
|
05-21-2006, 08:19 PM
|
#4
|
Senior Member
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132
Rep:
|
Quote:
Originally Posted by anamericanjoe
OK, so I have tried the easy way, but when I send mail from my machine it is not getting through to its destination. Any advice on where to go from here?
|
Check your mail log and see what it says the problem was. /var/log/maillog
|
|
|
05-21-2006, 10:45 PM
|
#5
|
Member
Registered: May 2006
Posts: 69
Original Poster
Rep:
|
OK, so these are the past five lines of my /var/log/maillog:
(Note that I have changed the name of the smtp server for posting purposes.)
Code:
May 21 22:31:06 yankee sm-mta[4732]: gethostbyaddr(192.168.1.103) failed: 1
May 21 22:31:06 yankee sm-mta[4732]: gethostbyaddr(192.168.1.102) failed: 1
May 21 22:31:07 yankee sm-mta[4733]: starting daemon (8.13.4): SMTP+queueing@00:25:00
May 21 22:31:07 yankee sm-msp-queue[4736]: starting daemon (8.13.4): queueing@00:25:00
May 21 22:34:50 yankee sendmail[4849]: k4M2Yoxs004849: from=user, size=217, class=0, nrcpts=1, msgid=<200605220234.k4M2Yoxs004849@yankee.localdomain>, relay=user@localhost
May 21 22:34:50 yankee sm-mta[4850]: k4M2Yo7b004850: from=<user@yankee.localdomain>, size=486, class=0, nrcpts=1, msgid=<200605220234.k4M2Yoxs004849@yankee.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
May 21 22:34:50 yankee sendmail[4849]: k4M2Yoxs004849: to=user@foo.bar.edu, ctladdr=user (1000/100), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30217, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k4M2Yo7b004850 Message accepted for delivery)
May 21 22:34:51 yankee sm-mta[4852]: k4M2Yo7b004850: to=<user@foo.bar.edu>, ctladdr=<user@yankee.localdomain> (1000/100), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=120486, relay=smtp.school.edu. [128.205.6.73], dsn=2.0.0, stat=Sent (ok 1148265385 qp 19289)
I ran
Code:
tail -f /var/log/maillog
as I tried sending an email from my machine, which resulted in the very last line.
I noticed many lines that read
Code:
gethostbyaddr(192.168.1.103) failed: 1
in the log file, but I don't know what that means...
Last edited by anamericanjoe; 05-21-2006 at 11:05 PM.
|
|
|
05-24-2006, 11:29 PM
|
#6
|
Member
Registered: May 2006
Posts: 69
Original Poster
Rep:
|
Maybe I tried to bite off more than I can chew with my initial question...
Let me quickly outline my problem with a more focused goal this time.
I am running sendmail on my machine, but my school's network blocks traffic that comes from port 25. I tried to configure sendmail to use the SMART_HOST macro and point the smart host to my school's smtp port, but mail from my machine never makes it to it's destination.
I am thinking that if I can get sendmail to send smtp traffic on some port other than 25, maybe I will be able to send messages from my machine. Does anyone know how I can do this?
Also, is this sort of a question ok for this forum? (I'm still learning the rules of the road for LQ, so I'm not sure.)
Thanks!
|
|
|
All times are GMT -5. The time now is 07:35 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|