LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 07-01-2007, 10:48 PM   #1
orpheon
LQ Newbie
 
Registered: Feb 2007
Posts: 9

Rep: Reputation: 0
Unhappy sendmail and SMTP


I'm trying to set up my smartd and mdadm daemon so when anything fails, my computer will send an email to my gmail. My linux machine is plugged into the university's network and to prevent spam, the university blocks any mail not going through their SMTP. according to the help site:

Outgoing Server: smtp.university.edu
Server Requires Authentication: No
Secure Sockets Layer (SSL): No
Port: 25

so to get the daemon to send emails to me when my HD fail, I would have to config sendmail right? I went through a few tutorials yesterday with m4 and such but have not been able to figure out how exactly I can configure sendmail to make it work.

thanks in advance for the help!
 
Old 07-01-2007, 11:53 PM   #2
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,427

Rep: Reputation: 51
The answer is smarthost. In your sendmail config file, look for DS. It should be this:
Quote:
DSsmtp.university.edu
-twantrd
 
Old 07-02-2007, 12:01 AM   #3
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 13.37
Posts: 4,021

Rep: Reputation: 125Reputation: 125
EDIT: Too slow twantrd already suggested smarthost...
It sounds like you need to configure your sendmail to use smtp.university.edu as a smarthost. In your sendmail.mc file, add the following line:
Code:
define(`SMART_HOST',`smtp.university.edu')dnl
Then, re-generate your sendmail.cf file and re-start sendmail.

Last edited by gilead; 07-02-2007 at 12:02 AM.
 
Old 07-02-2007, 03:54 AM   #4
orpheon
LQ Newbie
 
Registered: Feb 2007
Posts: 9

Original Poster
Rep: Reputation: 0
thank for the initial answer. i'm actually not sure where I'm suppose to find the sendmail.mc file so there is a sendmail.cf file in /etc/mails but I don't seem to have a sendmail.mc (I'm running Slackware) So I've looked up a tutorial and it told me to do: m4 {directory of the file} sendmail.mc > sendmail.cf .
If only I can find the .mc file or if somoene could link me to a sample file for Slackware thanks

edit for readability

Last edited by orpheon; 07-02-2007 at 04:21 AM.
 
Old 07-02-2007, 02:06 PM   #5
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 13.37
Posts: 4,021

Rep: Reputation: 125Reputation: 125
Although I prefer to generate my .cf file each time, as twantrd posted you can modify /etc/mail/sendmail.cf directly and add the DS line to specify your smarthost.
 
Old 07-02-2007, 05:17 PM   #6
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,427

Rep: Reputation: 51
and restart sendmail after making the change .

-twantrd
 
Old 07-02-2007, 09:14 PM   #7
orpheon
LQ Newbie
 
Registered: Feb 2007
Posts: 9

Original Poster
Rep: Reputation: 0
this is what I get

$ sendmail -bt
/etc/mail/sendmail.cf: line 2: invalid argument to V line: "ERSIONID(TLS support"
/etc/mail/sendmail.cf: line 5: unknown configuration line "define(`SMART_HOST',`smtp.univserity.edu')dnl"
/etc/mail/sendmail.cf: line 6: fileclass: cannot open 'ATURE(authinfo)FEATURE(use_cw_file)FEATURE(use_ct_file)FEATURE(mailertable,hash': No such file or directory
Warning: .cf file is out of date: sendmail 8.13.8 supports version 10, .cf file is version 0
No local mailer defined
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)


I guess I shouldn't have tried to generate the .cf file last time... now it's all messed up

does anyone know where I can get a default .cf file for slackware?
 
Old 07-02-2007, 09:45 PM   #8
orpheon
LQ Newbie
 
Registered: Feb 2007
Posts: 9

Original Poster
Rep: Reputation: 0
okay I tried to use m4 again to rebuild the sendmail.cf file so here's my sendmail.mc file

divert(-1)
#
# configuration file
#
divert(0)
VERSIONID(`@(#)sendmail.mc 8.7 (Linux) 3/5/96')
OSTYPE(`linux')
dnl
#stanford is our smart host
define(`SMART_HOST', `smtp.stanford.edu')
dnl
# Support the local, smtp and uucp mail transport protocols.
MAILER(`local')
MAILER(`smtp')
MAILER(`uucp')
LOCAL_NET_CONFIG
# This rule ensures that all local mail is delivered using the
# smtp transport, everything else will go via the smart host.
R$* < @ $* .$m. > $* $#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3
dnl
#
FEATURE(rbl)
FEATURE(access_db)

I used m4 to build the .cf and restarted sendmail in rc.d. I tried sending myself an email to both my university and gmail account... neither worked
 
Old 07-03-2007, 06:16 AM   #9
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 13.37
Posts: 4,021

Rep: Reputation: 125Reputation: 125
Did you install a Slackware package for sendmail? I'd expect there to be a default .cf file or a standard .mc file that you can start from. I built mine from sources for a mail setup that's not quite standard so it's probably not going to be much good for your setup.
 
Old 07-03-2007, 07:19 PM   #10
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,427

Rep: Reputation: 51
If there is no backup and you really screwed up the conf, then re-install sendmail.

-twantrd
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
can I use sendmail for SMTP instead of my ISP's SMTP server? fcdev Linux - Networking 1 02-05-2007 01:27 AM
sendmail + smtp authentication omid1979 Linux - Networking 1 10-30-2005 10:12 AM
sendmail smtp addresses dskny Linux - Software 2 01-13-2004 08:32 PM
SMTP Auth for sendmail wolftechmn Linux - Networking 4 11-27-2003 01:17 PM
SMTP by SendMail thomas_hk03 Linux - Software 5 08-06-2003 10:53 PM


All times are GMT -5. The time now is 01:55 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration