procmail
[Top] [All Lists]

Re: Is there any way to detect NULLs in email messages? ---> YES

1998-05-13 14:54:54
        Hi !!!

    If you use sendmail+procmail and procmailrc is not so friendly to you,
here is my advice:
    Use one Mlocal like this inside sendmail.cf :

Mlocal,  P=/usr/local/bin/send.spt, F=lsDFMAw5:/|@qSnE9, S=10/30, R=20/40,

T=DNS/RFC822/X-Unix,
A=send.spt $u

    Inside send.spt, make this:

#!/usr/bin/ksh
tr | exec /bin/procmail -d $1

        Alexandre




Jacques Gauthier wrote:

Fairly often I am getting NULLs in email messages.  This is screwing
up my
logfile and my mailbox index (under NeXTStep).

Is there any way to detect NULLs using procmail, and possibly
convert them
to something else or simply delete them?

If you usually save something to a file as:

:0: condition
file

Try:
:0: null.lock
| tr -d '\0'  >> file

The tr command will delete null characters with the
-d option.  In order to change the null to spaces
you can do this:

tr '\0' ' '

(Where in the second set of quotes there is a space)
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com



<Prev in Thread] Current Thread [Next in Thread>