LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-14-2005, 06:21 AM   #1
shadoxity
LQ Newbie
 
Registered: Apr 2005
Location: Lisarow, NSW, Australia
Distribution: FC 3
Posts: 18

Rep: Reputation: 0
qmail generating mail that sends to the wrong domain?


hey all setup qmail last night, and all is working fine but i check my queue every so often and there is a couple messages (im guessing automated somewhere) that are sending to root@mail.mydomain.com instead of root@mydomain.com

please help.. thanx, also is there a way to install qmHandle so i dont have to browse to the folder then type "perl qmHandle"? thanx

[root@localhost downloads]# perl qmHandle -l
2011179 (138, R)
Return-path: anonymous@mail.mydomain.net
From: root@mail.mydomain.net (Cron Daemon)
To: root@mail.mydomain.net
Subject: Cron <root@localhost> run-parts /etc/cron.daily
Date: 14 Apr 2005 04:02:22 +1000
Size: 536 bytes

2011178 (137, R)
Return-path: root@mail.mydomain.net
From: root@mail.mydomain.net
To: root@mail.mydomain.net
Subject: LogWatch for localhost.localdomain
Date: 14 Apr 2005 04:02:06 +1000
Size: 9903 bytes
 
Old 04-14-2005, 10:46 AM   #2
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
These messages are being sent by cron. The messages are being addressed to simply "root" and your qmail server is appending the domain to the end. I solved this by adding a domain called "mydomain.net" (without the mail. at the beginning) and then making mail.mydomain.net forward absolutely everything to "mydomain.net". This circumvented the problem. You basically just have to pretend like you don't have a mail.yourdomain.net because all the mail from there is auto-forwarded to your other domain.

I think you want to edit your "qmHandle" script and look at the top and see if there is a shebang line. It should say...

#!/usr/bin/perl

or something similar. Just be sure this is the correct path to perl on your system. The #! are required for the script to run, only the path probably needs to be corrected.
 
Old 04-15-2005, 03:04 AM   #3
shadoxity
LQ Newbie
 
Registered: Apr 2005
Location: Lisarow, NSW, Australia
Distribution: FC 3
Posts: 18

Original Poster
Rep: Reputation: 0
the domain i already have is mydomain.net so should i add mail.mydomain.net and forward all that to mydomain.net?

thanx
 
Old 04-15-2005, 07:37 AM   #4
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
Ohhh, Ok. Nevermind. Here's a better way.

Edit your /etc/crontab. Near the top, you'll see a line like this..

MAILTO=root

Change "root" to "you@yourdomain.com" and save the file. Now emails regarding cron will be sent to that address.

You can also change your LogWatch emails too. My config file was located under /etc/log.d/logwatch.conf. There is a line about halfway down that says...

MailTo = root

Change that to...

MailTo = you@yourdomain.com

And emails will be sent to the proper address.
 
Old 04-15-2005, 09:11 AM   #5
shadoxity
LQ Newbie
 
Registered: Apr 2005
Location: Lisarow, NSW, Australia
Distribution: FC 3
Posts: 18

Original Poster
Rep: Reputation: 0
thanx heaps changed them around, will know if it worked by the morning
 
Old 04-16-2005, 12:56 AM   #6
shadoxity
LQ Newbie
 
Registered: Apr 2005
Location: Lisarow, NSW, Australia
Distribution: FC 3
Posts: 18

Original Poster
Rep: Reputation: 0
yep worked thanx
 
  


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
Sendmail - wrong mail sender domain display jika Linux - Newbie 1 05-27-2005 02:29 AM
qmail sends but doesn't receive mail ysg08 Linux - Networking 5 01-14-2005 03:01 PM
Problems sending mail to a single domain with qmail dwbizzle Linux - Software 2 09-26-2003 07:36 AM
Changing domain sendmail sends mail with greenhornet Linux - Networking 5 09-09-2002 01:42 AM
how to set up second mail domain on qmail littlelittle Linux - General 2 05-02-2002 10:01 AM


All times are GMT -5. The time now is 05:22 PM.

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 Google+: linuxquestions
Open Source Consulting | Domain Registration