Help with trashed sendmail file pweeeeeze!

MeNeZ

Expert Member
Joined
Jul 28, 2006
Messages
1,850
Hi,

(Firstly, Im not a Linux guy. The dude who does this stuff left so Im sitting with manuals scratching my chin) :wtf:

I had to edit the sendmail.cf file because an SMTP server changed, halfway thru I lost connection and when I logged in again the file has dissapeared!
Ive found an old one but its stock standard.

I get this error which I researched and it basically means there is no mail server specified which makes sense, how much of the sendmail.cf needs to be edited? I imagine it will need the mail server name & SMTP details??? :confused:
 

MeNeZ

Expert Member
Joined
Jul 28, 2006
Messages
1,850
Oops, here is the error:

cygni:/var/log # rcsendmail restart
Shutting down SMTP port done
Initializing SMTP port (sendmail)554 5.0.0 No local mailer defined
startproc: exit status of parent of /usr/sbin/sendmail: 70
failed
 

w1z4rd

Karmic Sangoma
Joined
Jan 17, 2005
Messages
49,747
Get a linux dude.

Here is a linux pro tip. Before you edit a config file make sure to back it up first.
 

MeNeZ

Expert Member
Joined
Jul 28, 2006
Messages
1,850
Im pretty sure I just need to define the local mailer by editing the sendmail.cf file
 

MickZA

Executive Member
Joined
Jan 19, 2007
Messages
7,575
Lets check if you have have lost the original .cf file.
What's the output of the following commands?

Code:
[root@centos53 ~]# updatedb
[root@centos53 ~]# locate sendmail.cf
/etc/mail/sendmail.cf
[root@centos53 ~]#
 

macxsanity

Well-Known Member
Joined
Mar 17, 2009
Messages
336
i guess he left because either the pay is crap or the working conditions are hostile .....
 

thisgeek

Expert Member
Joined
Apr 22, 2005
Messages
3,372
If you're using a remote shell with a dodgy connection, I highly recommend running screen first.
 

|tera|

Master of Messengers
Joined
Mar 31, 2006
Messages
25,906
Menez, I guess the first step would be to actually know where your mail server is? Is it a local machine on the network, is it a remote server? You have to start at step one, then two :p
 

avert

Senior Member
Joined
Jul 13, 2009
Messages
742
look for a filename called .sendmail.cf.swp in the directory

or try recover it

grep -b 'search-text' /dev/partition > file.txt
 

MeNeZ

Expert Member
Joined
Jul 28, 2006
Messages
1,850
Yayness! thanks guys, refreshed this page and found many helpfull peeps :D

i fixed it using the omsendin command to recreate the sendmail file and then I changed the permissions with winscp! woooot

*makes backup of sendmail.cf FTW*
 
Top