LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 01-28-2007, 02:17 PM   #1
griffinmt
LQ Newbie
 
Registered: Sep 2004
Location: Midland, MI
Distribution: Fedora V11
Posts: 11

Rep: Reputation: 0
Question More 'mail' questions


Somehow I can't see this forest, there are way too many trees in the way!

I have a Fedora 6 system running as a web server and use vnc from my desktop to 'manage' it.

What I would like to do is to have any locally generated email (eg: to root from cron jobs) to get forwarded to an external mail address. That way I can process (and automate) all my email from one place.

The linux system is running sendmail, although I have not done any configuration to it yet.

I have found one other similar request doing a search, but it did not contain a definitive answer.

Where do I start? (and finish )

Thanks,
Martyn
 
Old 01-28-2007, 04:34 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Sine you're using sendmail you can use its aliases capability. In /etc/mail/aliases, add a line like this:
Code:
root:  auser@somewhereelse.com
Then run newaliases or sendmail -bi. All mail for root should now be sent to the specified address.
 
Old 01-28-2007, 05:28 PM   #3
griffinmt
LQ Newbie
 
Registered: Sep 2004
Location: Midland, MI
Distribution: Fedora V11
Posts: 11

Original Poster
Rep: Reputation: 0
Unfortunately, using an alias does not do the same job as forwarding.

When the message gets routed to the new destination, it still is structured with the original address. Since this is a system on my internal network, it has no 'real-world' in DNS etc and the smtp server gets upset with it, believing it to be sent with a spoofed address, which technically it is.

Forwarding should resolve this (excuse the pun).

Martyn
 
Old 01-28-2007, 05:51 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
SMTP AUTH solves that problem here. I need to keep the original 'From' addresses so I can see at a glance when mail arrives from one of my servers...

I don't use .forward files, but it looks like there's plenty of info on google, e.g. http://www.physics.ubc.ca/computer/e...tforward.phtml. Did you mean that you've tried this and it didn't work? Or that you want to be modifying mail headers as part of the process?
 
Old 01-28-2007, 06:59 PM   #5
griffinmt
LQ Newbie
 
Registered: Sep 2004
Location: Midland, MI
Distribution: Fedora V11
Posts: 11

Original Poster
Rep: Reputation: 0
The .forward approach, in essence, is identical to the alias aproach, as far as I can figure.

But I could not get .forward to work with root, even after removing any alias settings.

The kind of forwarding I am looking for would create a new header and textually retain the original header at the top of the message. This way there is no spoofing going on.

Could you explain your reference to SMTP AUTH?

In the meantime, I am trying to search out all the default references to root and replace where possible. Not so easy when navigating thu the system seems 'foreign' to me.
 
Old 01-29-2007, 12:45 PM   #6
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Do you get any errors in /var/log/maillog?

I usually have my systems set up so that /etc/mail/aliases specifies that root's mail goes to an ordinary user's account. I've never had problems using the aliases database to send ordinary users' mail off-site. I haven't tried changing the sender email address as you're looking to do because in the set up I have here that would be spoofing (ie changing the sender address to make the receiving server think it was OK).

There's a very good reference for SMTP AUTH here at http://www.linuxquestions.org/questi...d.php?t=224543. I've used it and recommend it. Although the installation sections are Slackware specific, the configuration sections seem generic.
 
  


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
Mail server questions linuxnube Linux - Software 0 10-21-2003 11:20 AM
questions about a mail server DKY Linux - Newbie 35 08-01-2003 10:49 AM
e-mail questions PTBmilo Linux - Networking 2 01-11-2003 08:57 PM
2 different questions about mail messages finger51 Linux - Newbie 1 09-27-2002 11:59 AM
Questions regarding /etc/mail/access markng Linux - Security 6 08-19-2002 09:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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