Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

sqldatasource dal, wwwxxxenden, convert raid5 to raid 10 mdadm, apache force chunked, nrao wwwxxx, xxxxxdup, procmail change subject header, wwwXxx not20, Wwwxxx.doks sas, linux raid resync after reboot

Links

XODOX
Impressum

#1: Cannot mail directly to files

Posted on 2006-06-30 10:58:03 by steven.heylens

Hi,

for some reason, we do accept mails for some persons, but we do not
deliver that mail. We redirect the mail to /dev/null using the aliases
file.

eg.

myself: /dev/null

Everything seems to be working fine: mail is received by our sendmail
-bd daemon, abd delivered (or thrown away) using our sendmail -q
runner.

My problem is that when we manually put mail in the queue (eg. when we
put old mail from our archive back in the queue), and that mail is to
be delivered to /dev/null, our sendmail gives a 'Cannot mail directly
to files' as shown below

============================================================ ====
The original message was received at Sun, 19 Mar 2006 19:02:18 +0200
from localhost.localdomain [127.0.0.1]

Sorry, the user doens't exist

----- The following addresses had permanent fatal errors -----
/dev/null
(expanded from: myself)

----- Transcript of session follows -----
550 5.7.1 /dev/null... Cannot mail directly to files
============================================================ ======

Why does my sendmail -q gives this error, while it delivers 'normal'
mail to /dev/null or a mailbox.

Maybe I should mention that we upgrade our mailserver last week from an
old HP-UX 10.20 Machine (with sendmail 8.8.6) to a newer RH Linux 3.0
using sendmail 8.12.11... Could it be related to this?

Report this message

#2: Re: Cannot mail directly to files

Posted on 2006-06-30 20:22:59 by per

In article <1151657883.192010.43200@i40g2000cwc.googlegroups.com>
steven.heylens@gmail.com writes:
>
>My problem is that when we manually put mail in the queue (eg. when we
>put old mail from our archive back in the queue), and that mail is to
>be delivered to /dev/null, our sendmail gives a 'Cannot mail directly
>to files' as shown below

Well, "don't do that" (i.e. drop files into the queue directory).
Alternatively, put a message to a /dev/null-user in the queue with
something like (as root)

date | sendmail -Am -odq user

- and check how the queue files differ from those that you put in there
"directly". I don't know off-hand what the difference is, but in general
the "Cannot mail directly to files" error is generated when you actually
try to send "directly" (as opposed to via aliases or .forward) to a file
- allowing this would obviously be a huge security hole.

>Maybe I should mention that we upgrade our mailserver last week from an
>old HP-UX 10.20 Machine (with sendmail 8.8.6) to a newer RH Linux 3.0
>using sendmail 8.12.11... Could it be related to this?

Hm, with pre-8.12 you should drop the '-Am' from the above command and
there is no requirement to run as root. Hm again, you can't expect
8.8.x-generated queue files to be correctly handled by 8.12.x - it's
something like 7 *years* of development/evolution between them...

--Per Hedeland
per@hedeland.org

Report this message