LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-10-2009, 03:18 PM   #1
thedoobie
LQ Newbie
 
Registered: Jul 2009
Distribution: Ubuntu
Posts: 5

Rep: Reputation: 0
Logwatch not sending mail, but "mail" works


I have installed postfix on Ubuntu Server 9.04. I am able to successfully send an email to my address using:
Code:
mail -s "test subject" my_address@gmail.com < my_test_message.txt
I have installed logwatch and configured "/usr/share/logwatch/default.conf/logwatch.conf" with the (seemingly) correct values:
Code:
Mailto = my_address@gmail.com 
MailFrom = my_address@gmail.com 
Output = mail 
Format = text
mailer = /usr/bin/mail
I changed the default "mailer = /usr/sbin/sendmail -t" to "mailer = /usr/bin/mail" since I have configured postfix (with "mail") instead of using "sendmail" (maybe this is my problem???). Also, I changed the /etc/cron.daily/00logwatch file to:
Code:
/usr/sbin/logwatch --mailto my_address@gmail.com
from "... -mailto root@my_machine.local". Any ideas on how to get logwatch sending emails properly? I am completely new to postfix and logwatch. Thanks in advance...
 
Old 07-10-2009, 03:32 PM   #2
thedoobie
LQ Newbie
 
Registered: Jul 2009
Distribution: Ubuntu
Posts: 5

Original Poster
Rep: Reputation: 0
Also, on executing "mail -s "test again" my_address@gmail.com < test_mesage" the /var/log/mail.log has:
Code:
Jul 10 16:21:24 my_machine postfix/pickup[2348]: 528C867244E: uid=1000 from=<my_user>
Jul 10 16:21:24 my_machine postfix/cleanup[2837]: 528C867244E: message-id=<20090710202124.528C867244E@my_machine.local>
Jul 10 16:21:24 my_machine postfix/qmgr[2349]: 528C867244E: from=<my_user@my_machine.local>, size=334, nrcpt=1 (queue active)
Jul 10 16:21:24 my_machine postfix/smtp[2839]: setting up TLS connection to smtp.gmail.com[x.x.x.x]:587
Jul 10 16:21:24 my_machine postfix/smtp[2839]: Verified TLS connection established to smtp.gmail.com[x.x.x.x]:587: TLSv1 with cipher RC4-MD5 (128/128 bits)
Jul 10 16:21:26 my_machine postfix/smtp[2839]: 528C867244E: to=<my_address@gmail.com>, relay=smtp.gmail.com[x.x.x.x]:587, delay=1.8, delays=0.03/0.02/0.76/0.98, dsn=2.5.0, status=sent (250 2.5.0 Ok.)
Jul 10 16:21:26 my_machine postfix/qmgr[2349]: 528C867244E: removed
However, when executing "sudo logwatch --mailto my_address@gmail.com" I get the following in /var/log/mail.log:
Code:
Jul 10 16:26:52 my_machine postfix/pickup[2348]: 0E38667244E: uid=0 from=<root>
Jul 10 16:26:52 my_machine postfix/cleanup[3263]: 0E38667244E: message-id=<20090710202652.0E38667244E@my_machine.local>
Jul 10 16:26:52 my_machine postfix/qmgr[2349]: 0E38667244E: from=<root@my_machine.local>, size=4324, nrcpt=1 (queue active)
Jul 10 16:26:52 my_machine postfix/smtp[3265]: setting up TLS connection to smtp.gmail.com[x.x.x.x]:587
Jul 10 16:26:52 my_machine postfix/smtp[3265]: Verified TLS connection established to smtp.gmail.com[x.x.x.x]:587: TLSv1 with cipher RC4-MD5 (128/128 bits)
Jul 10 16:26:53 my_machine postfix/smtp[3265]: 0E38667244E: to=<my_address@gmail.com>, relay=smtp.gmail.com[x.x.x.x]:587, delay=3.2, delays=1.8/0.02/0.77/0.61, dsn=5.7.0, status=bounced (host smtp.gmail.com[x.x.x.x] said: 550 5.7.0 From address is not one of your addresses. (in reply to end of DATA command))
Jul 10 16:26:53 my_machine postfix/cleanup[3263]: 8038F67244F: message-id=<20090710202653.8038F67244F@my_machine.local>
Jul 10 16:26:53 my_machine postfix/bounce[3266]: 0E38667244E: sender non-delivery notification: 8038F67244F
Jul 10 16:26:53 my_machine postfix/qmgr[2349]: 8038F67244F: from=<>, size=6165, nrcpt=1 (queue active)
Jul 10 16:26:53 my_machine postfix/qmgr[2349]: 0E38667244E: removed
Jul 10 16:26:53 my_machine postfix/smtp[3267]: 8038F67244F: to=<root@my_machine.local>, relay=none, delay=0.04, delays=0.02/0.02/0/0, dsn=5.4.6, status=bounced (mail for my_machine.local loops back to myself)
Jul 10 16:26:53 my_machine postfix/qmgr[2349]: 8038F67244F: removed
So, it seems that it is sending from "root" even though I have changed this in the logwatch.conf file.
 
  


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
How to check "incorrect mails" before sending it through my mail server? nishith Linux - Server 2 04-21-2009 07:47 AM
Who's sending this mail to "Bad destination mailbox address" ssfrstlstnm Linux - Server 10 06-20-2008 10:14 PM
Sending mail with some attached files using "mail" command? zahadumy Linux - Software 3 05-27-2006 10:43 PM
How to stop the redhat sending me e-mail called "LogWatch" automatically? chuanweizuo Red Hat 2 03-08-2005 09:19 AM
Sending mail with "mail" using another mailserver ericcarlson Linux - Software 0 07-25-2004 05:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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