LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 05-21-2013, 02:59 PM   #1
at398
LQ Newbie
 
Registered: May 2013
Posts: 15

Rep: Reputation: Disabled
Have royally messed up local mail service, how to reset to defaults without reinstall


SO i thought i would be really clever and get crontab to send emails to my gmail when it completes. I have added it as MAILTO=name@gmail.com,

however i kept getting errors that it cant send it to an external domain etc etc. So having fiddled around with postfix i am now in a position where
no internal mail can get through , all of it is frozen as it is in the wrong format, like this.

crontab -e runs a backup and sends to to root by default.

# mailq


2m 566 1UerbN-0003IF-D9 frozen
root@name@gmail.com

I dont really know how it was supposed to be at the start. I am fairly certain that it just a config file somewhere, but i (wrongly) blindly followed a couple of guides online to get me to this state.

I have exim4 and mutt installed. What is the quickest way to change it back to normal so crontab can actually send mail to root? (have purged exim4, mutt,postfix, and reinstalled exim4 and mutt).

Any advice much appreciated.
 
Old 05-21-2013, 03:37 PM   #2
at398
LQ Newbie
 
Registered: May 2013
Posts: 15

Original Poster
Rep: Reputation: Disabled
added my email adress to /etc/mailname, changed that back to my hostname, and added my email adress to MAILTO="...gmail.com", now works,
 
Old 05-21-2013, 07:51 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Important rule: ALWAYS backup cfg files before changing them (in fact any file).
I tend to add the current date (& sometimes time )to the filename
Code:
cp file.cfg file.cfg.20130522
YYYYMMDD format; sorts naturally if you have >1 instance.
 
Old 05-22-2013, 03:15 AM   #4
at398
LQ Newbie
 
Registered: May 2013
Posts: 15

Original Poster
Rep: Reputation: Disabled
Yep, that was a lesson for me. Will start backing up files from now on.
 
  


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
Laptop ran out of battery; GNOME royally messed up sun_earth Linux - Newbie 2 12-14-2010 11:09 PM
Can't reset Gnome to defaults jim.smith Linux - Desktop 2 07-06-2009 10:09 PM
Messed up royally: Eth0 the_riddler Linux - Networking 6 01-27-2006 10:14 AM
DNS Royally Messed Up - HELP! gabriele_101 Linux - Networking 3 04-15-2005 07:34 AM
I think I've royally messed things up phatcher Linux - General 1 09-28-2003 03:51 PM


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