DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD Ports and Packages

FreeBSD Ports and Packages Installation and upgrading of ports and packages on FreeBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 6th January 2009
Mantazz Mantazz is offline
Shell Scout
 
Join Date: Oct 2008
Posts: 90
Default Savemail panic, cannot save rejected email anywhere

I'm not sure what to do about the following lines that recently started showing up in /var/log/messages on my FreeBSD 6.2-RELEASE server at home:
Code:
Jan  6 03:04:24 sendmail[4673]: n05CBoHb001464: Losing ./qfn05CBoHb001464: savemail panic
Jan  6 03:04:24 sendmail[4673]: n05CBoHb001464: SYSERR(root): savemail: cannot save rejected email anywhere
Jan  6 03:04:24 sendmail[4673]: n05CBoHc001464: Losing ./qfn05CBoHc001464: savemail panic
Jan  6 03:04:24 sendmail[4673]: n05CBoHc001464: SYSERR(root): savemail: cannot save rejected email anywhere
Jan  6 03:04:24 sendmail[4673]: n0684OXl004673: Losing ./qfn0684OXl004673: savemail panic
Jan  6 03:04:24 sendmail[4673]: n0684OXl004673: SYSERR(root): savemail: cannot save rejected email anywhere
Jan  6 03:04:24 sendmail[4673]: n0684OXn004673: Losing ./qfn0684OXn004673: savemail panic
Jan  6 03:04:24 sendmail[4673]: n0684OXn004673: SYSERR(root): savemail: cannot save rejected email anywhere
I've googled for this problem but nothing I have found so far seems to apply. I checked for /usr/sbin/sendmail, and it is indeed a symlink to /usr/sbin/mailwrapper. The file /etc/mail/mailer.conf has the following:
Code:
# $FreeBSD: src/etc/mail/mailer.conf,v 1.3 2002/04/05 04:25:12 gshapiro Exp $
#
# Execute the "real" sendmail program, named /usr/libexec/sendmail/sendmail
#
sendmail        /usr/libexec/sendmail/sendmail
send-mail       /usr/libexec/sendmail/sendmail
mailq           /usr/libexec/sendmail/sendmail
newaliases      /usr/libexec/sendmail/sendmail
hoststat        /usr/libexec/sendmail/sendmail
purgestat       /usr/libexec/sendmail/sendmail
I'm not sure what to check next. I have only been seeing this error message for the past few days on my system, and I do not recall having seen it at all prior to 29 December.

This system does not ordinarily send mail out; indeed I do not even own a domain to send mail out from...
Reply With Quote
  #2   (View Single Post)  
Old 6th January 2009
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Real Name: Ben
Spam Refugee
 
Join Date: Jul 2008
Location: Rotterdam, The Netherlands
Posts: 336
Default

There should be more information in /var/log/maillog. Perhaps email to root cannot be delivered, not even locally.
Reply With Quote
  #3   (View Single Post)  
Old 6th January 2009
Mantazz Mantazz is offline
Shell Scout
 
Join Date: Oct 2008
Posts: 90
Default

Here is a line that caught my eye in /var/log/maillog
Code:
Jan  6 03:04:24 sendmail[4673]: n05CBoHb001464: to=<root@myserver.org>, delay=19:50:19, xdelay=00:00:00, mailer=local, pri=363219
9, relay=local, dsn=5.2.0, stat=Service unavailable (/var/mail/root: irregular f
ile)
(where myserver.org is in the place of what I actually call the system)
I then checked /var/mail/root:
Code:
ls -ltd /var/mail/root
lrwxr-xr-x  1 root  mail  13 Dec 21 10:03 /var/mail/root -> /root/varmail
Which was something I did a while ago because the file was too large for the partition I made for /var. We can then look at /root/varmail:
Code:
 ls -ltd /root/varmail 
-rw-------  1 root  wheel  45164271 Jan  6 10:25 /root/varmail
Did I hopelessly break something here? I notice that for other users' mail files, the permissions are generally 600, which matches the permissions on /root/varmail.
Reply With Quote
  #4   (View Single Post)  
Old 6th January 2009
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Real Name: Ben
Spam Refugee
 
Join Date: Jul 2008
Location: Rotterdam, The Netherlands
Posts: 336
Default

I think the problem is that the directory /root is not writable by 'mail'

Try using /root/mail/varmail and do

Code:
chown root:mail /root/mail
chmod 775 /root/mail

Last edited by DutchDaemon; 6th January 2009 at 04:25 PM.
Reply With Quote
  #5   (View Single Post)  
Old 7th January 2009
Mantazz Mantazz is offline
Shell Scout
 
Join Date: Oct 2008
Posts: 90
Default

Quote:
Originally Posted by DutchDaemon View Post
I think the problem is that the directory /root is not writable by 'mail'

Try using /root/mail/varmail and do

Code:
chown root:mail /root/mail
chmod 775 /root/mail
I will try it and see if that helps, but I'm a little puzzled why it would matter. All the other mailboxes are set to 600, and that seems to work just fine for the minute amount of mail (almost entirely from cron) that moves on this system.

Why would the root mailbox need different permissions? That seems less than ideal, for sure...
Reply With Quote
  #6   (View Single Post)  
Old 6th January 2009
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Real Name: Ben
Spam Refugee
 
Join Date: Jul 2008
Location: Rotterdam, The Netherlands
Posts: 336
Default

Note: I'm not entirely sure whether the root mailbox can be symlinked like that. Sendmail likes a normail mailbox file to drop mail in, but if it can't follow the symlink due to a privilege problem, it may not report that correctly.
Reply With Quote
  #7   (View Single Post)  
Old 7th January 2009
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Real Name: Ben
Spam Refugee
 
Join Date: Jul 2008
Location: Rotterdam, The Netherlands
Posts: 336
Default

It's not so much about the mailbox permissions. All other mailboxes are in a directory that's writable by 'mail' (i.e. /var/mail). Your root mailbox is symlinked to a mailbox in the directory /root, which is not writable by 'mail'. That's why I suggest you create a subdirectory named 'mail' under /root that is writable by 'mail'. Still not sure about the symlink being acceptable for Sendmail, but one step at a time.
Reply With Quote
  #8   (View Single Post)  
Old 10th January 2009
Mantazz Mantazz is offline
Shell Scout
 
Join Date: Oct 2008
Posts: 90
Default

Hmm, this doesn't seem to be solving the problem yet. As root, I made a directory /root/Varmail for the file /root/Varmail/varmail:
Code:
>ls -ltd /root/Varmail
drwxrw----  2 root  mail  512 Jan  9 12:22 /root/Varmail
And the file inside it is called "varmail":
Code:
 ls -tld /root/Varmail/varmail 
-rwxrw----  1 root  mail  45164271 Jan  6 10:25 /root/Varmail/varmail
There is then a symbolic link from /var/mail for this file:
Code:
ls -ltd /var/mail/root
lrwxr-xr-x  1 root  mail  21 Jan  9 12:23 /var/mail/root -> /root/Varmail/varmail
But I still get the savemail panics in my daily logs. I see that the last entry in /root/Varmail/varmail dates from December 19, which was after I had moved the mail file.
Reply With Quote
  #9   (View Single Post)  
Old 10th January 2009
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Real Name: Ben
Spam Refugee
 
Join Date: Jul 2008
Location: Rotterdam, The Netherlands
Posts: 336
Default

I just more or less copied your setup, although my local delivery agent is procmail. What procmail does it this:

This is in /var/mail
Code:
lrwxr-xr-x   1 root      mail        15 Jan 10 22:28 BOGUS.root.NQR -> /root/mail/root
-rw-------   1 root      mail      1093 Jan 10 22:29 root
In other words: symlinks are not acceptable to procmail, which moves the symlinked mailbox out of the way, adding 'BOGUS' to its name, and recreates a mailbox called 'root' where it delivers the mail to.

Based on that I'd say symlinking a mailbox from /var/mail, even with correct ownership and privileges, is not possible.
Reply With Quote
Old 10th January 2009
Mantazz Mantazz is offline
Shell Scout
 
Join Date: Oct 2008
Posts: 90
Default

Quote:
Originally Posted by DutchDaemon View Post
I just more or less copied your setup, although my local delivery agent is procmail. What procmail does it this:

This is in /var/mail
Code:
lrwxr-xr-x   1 root      mail        15 Jan 10 22:28 BOGUS.root.NQR -> /root/mail/root
-rw-------   1 root      mail      1093 Jan 10 22:29 root
In other words: symlinks are not acceptable to procmail, which moves the symlinked mailbox out of the way, adding 'BOGUS' to its name, and recreates a mailbox called 'root' where it delivers the mail to.

Based on that I'd say symlinking a mailbox from /var/mail, even with correct ownership and privileges, is not possible.

Interesting. I have created a new file "root" in /var/mail with the appropriate permissions to see how sendmail and savemail react.

I suspect the conclusion here may be that I made a foolish administrative decision when I set up this system at home - I made /var its own 100MB partition, while giving around 50GB to / and 230GB to /usr. Clearly I should have given more space to /var...

Having seen that sendmail dislikes symlink files, I wonder if I could get away with a symlink directory instead? Perhaps it would be worthwhile to make a varmail directory in /usr, that /var/mail points to as a symlink itself? Then I could move all the mailboxes from /var/mail to /usr...
Reply With Quote
Old 11th January 2009
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Real Name: Ben
Spam Refugee
 
Join Date: Jul 2008
Location: Rotterdam, The Netherlands
Posts: 336
Default

Quote:
Originally Posted by Mantazz View Post
Having seen that sendmail dislikes symlink files, I wonder if I could get away with a symlink directory instead? Perhaps it would be worthwhile to make a varmail directory in /usr, that /var/mail points to as a symlink itself? Then I could move all the mailboxes from /var/mail to /usr...
That is certainly not a problem. I've had to symlink /var/mail to /usr/mail quiite a few times for lack of space, and it works fine.
Reply With Quote
Old 11th January 2009
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,167
Default

DutchDaemon,

Does procmail complain if you chmod the link itself to rw for root only, by using the "-h' flag to chmod?
Code:
# chmod -h 600
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 11th January 2009
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Real Name: Ben
Spam Refugee
 
Join Date: Jul 2008
Location: Rotterdam, The Netherlands
Posts: 336
Default

Quote:
Originally Posted by J65nko View Post
DutchDaemon,

Does procmail complain if you chmod the link itself to rw for root only, by using the "-h' flag to chmod?
Code:
# chmod -h 600
Code:
lrw-------   1 root      mail          15 Jan 11 04:04 root -> /root/mail/root

Jan 11 04:05:21 server procmail[94814]: Renamed bogus "/var/mail/root" into "/var/mail/BOGUS.root.NQR"

lrw-------   1 root      mail          15 Jan 11 04:04 BOGUS.root.NQR -> /root/mail/root
-rw-------   1 root      mail        1053 Jan 11 04:05 root



Last edited by DutchDaemon; 11th January 2009 at 03:08 AM.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PLEASE HELP SAVE BSD MAGAZINE Kruzer Off-Topic 14 27th August 2009 05:10 PM
how to save stackoverflow podcasts? ephemera Off-Topic 4 19th July 2009 03:32 PM
Doing a fresh install - what to save? Bruco FreeBSD General 4 30th May 2009 01:49 PM
Partition(s) present but not detected after panic jb_daefo FreeBSD General 0 29th May 2009 07:01 PM
FBSD 7 cd boot-only, kernel panic cysquatch FreeBSD Installation and Upgrading 9 18th July 2008 01:49 AM


All times are GMT. The time now is 12:10 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick