Sendmail .forward, mailing to programs

Sendmail .forward, mailing to programs

Post by Logan Raaru » Sat, 23 Feb 2002 18:52:51



Hello,
I have some problems with forwarding to programs with sendmail .forward
file.
I just want to forward the mail to a program, but sendmail responds with the
following error:

The original message was received at Fri, 22 Feb 2002 10:31:53 GMT from lrpc
[62.xx.xx.xx] (may be forged)
----- The following addresses had permanent fatal errors ----- "|./sendsms"

--- The transcript of the session follows ---
550 /disk2/mailusers/lm002/.forward: line 2: "|./sendsms"... The address

I can't seem to find a solution to this problem. Can anyone help me?

 
 
 

Sendmail .forward, mailing to programs

Post by Fran » Sun, 24 Feb 2002 15:46:36




> Hello,
> I have some problems with forwarding to programs with sendmail .forward
> file.
> I just want to forward the mail to a program, but sendmail responds with
the
> following error:

> The original message was received at Fri, 22 Feb 2002 10:31:53 GMT from
lrpc
> [62.xx.xx.xx] (may be forged)
> ----- The following addresses had permanent fatal errors -----
"|./sendsms"

> --- The transcript of the session follows ---
> 550 /disk2/mailusers/lm002/.forward: line 2: "|./sendsms"... The address

> I can't seem to find a solution to this problem. Can anyone help me?

Hi,

which sendmail version do you use? Have you searched on
http://www.sendmail.org for a description/solution? What about posting this
problem to comp.mail.sendmail?

Frank

 
 
 

Sendmail .forward, mailing to programs

Post by Logan Raaru » Sun, 24 Feb 2002 20:03:47


Thanks for your reply.
My sendmail version is 8.9.3...
But I have posted my question at comp.mail.sendmail now, so I'll hope
someone can help me :)

/logan




> > Hello,
> > I have some problems with forwarding to programs with sendmail .forward
> > file.
> > I just want to forward the mail to a program, but sendmail responds with
> the
> > following error:

> > The original message was received at Fri, 22 Feb 2002 10:31:53 GMT from
> lrpc
> > [62.xx.xx.xx] (may be forged)
> > ----- The following addresses had permanent fatal errors -----
> "|./sendsms"

> > --- The transcript of the session follows ---
> > 550 /disk2/mailusers/lm002/.forward: line 2: "|./sendsms"... The address

> > I can't seem to find a solution to this problem. Can anyone help me?

> Hi,

> which sendmail version do you use? Have you searched on
> http://www.sendmail.org for a description/solution? What about posting
this
> problem to comp.mail.sendmail?

> Frank

 
 
 

Sendmail .forward, mailing to programs

Post by Fran » Thu, 28 Feb 2002 04:01:53


Hi Logan,

did you get an answer in comp.mail.sendmail?

Frank

 
 
 

Sendmail .forward, mailing to programs

Post by Logan Raaru » Fri, 08 Mar 2002 04:33:20



Quote:> Hi Logan,

> did you get an answer in comp.mail.sendmail?

> Frank

Hello Frank,
Yes, but i didn't find the answer. I can't figure out why it won't send mail
to programs.

Mvh Logan Raarup

 
 
 

Sendmail .forward, mailing to programs

Post by snogfest hosebeas » Fri, 08 Mar 2002 04:40:44


what was the question ?



> > Hi Logan,

> > did you get an answer in comp.mail.sendmail?

> > Frank

> Hello Frank,
> Yes, but i didn't find the answer. I can't figure out why it won't send
mail
> to programs.

> Mvh Logan Raarup

 
 
 

Sendmail .forward, mailing to programs

Post by Fran » Sun, 10 Mar 2002 02:30:27




> what was the question ?




> > > Hi Logan,

> > > did you get an answer in comp.mail.sendmail?

> > > Frank

Hi Logan,

From the news group and the sendmail version I guess you are on AIX 4.3x.
Could you provide subversion and maintenance level?
I tried to reproduce your problem on AIX 4.3.3 with maintenance update 7.
$HOME/.forward had permissions 0600 and has a line in it
| /home/user/scripts/mail.sh
The script starts with '#!/bin/sh' and has permissions 0755 (with something
in it like):
#!/bin/sh
cat - /tmp/newmail.$$

The directory /home/user/scripts is accessible for world.
And it worked.

Hope this helps.

Frank

Here the original question:
Hello,
I have some problems with forwarding to programs with sendmail .forward
file.
I just want to forward the mail to a program, but sendmail responds with the
following error:

The original message was received at Fri, 22 Feb 2002 10:31:53 GMT from lrpc
[62.xx.xx.xx] (may be forged)
----- The following addresses had permanent fatal errors ----- "|./sendsms"

--- The transcript of the session follows ---
550 /disk2/mailusers/lm002/.forward: line 2: "|./sendsms"... The address

I can't seem to find a solution to this problem. Can anyone help me?

 
 
 

1. SENDMAIL/.forward: Forwarding to programs

I'm posting this for a friend who is currently nntp impared:

============================================

I am having a problem under FreeBSD 2.2.2-RELEASE regarding forwarding
to an external program via the .forward file.  Whenever an email is
received, I need it to be passed to my custom program as well as
stored in that user's mailbox.  Thus, I would expect the .forward file
to be something like:

   \myemail
   |/the/path/myprogram

The problem is that when I create this .forward file and I send email
to the account, a message is returned that says:

   Line 2: |/the/path/myprogram myemail is unsafe for mailing

I search the net and in related FAQs and there were a number of ideas
that seemed promising (rsmsh configuration, listing valid sheels in
/etc/shells, etc.), but none of them turned out to be the problem.  I
tried to work around it by creating an alias in /etc/aliases that
reads:

    myprog: |/the/path/myprogram

Then in each .forward file I put:

    \myemail
    myprog

This seemed to work just fine until I ran into a problem today.  If
someone sends a message to two users on my system in a single SMTP
session and both users have myprog in the .forward file, only the
first user will actually have the message forwarded to "myprog."  The
myprog program is NOT executed for the second user.  



forward file, sendmail will leave copies of the email in both of their
mailboxes, but will execute "myprog" only once with UID=user1.  Myprog
is never executed with UID=user2.

I suppose this makes sense since if "myprog" was a user he wouldn't
want two forwarded copies of the same message.  However, I need my
program to be executed once for each user, even if it's the exact same
message.

Thus I am looking for a way to solve my problem.  I see two options
for solving the problem:

1. Figure out how to configure sendmail to allow me to put a program
in each user's .forward file without reporting the "unsafe" error
message.

2. If possible, I'd like to use the current solution where all user's
.forward files reference an alias in /etc/aliases which references the
program; that way if I ever change the location of the program I just
need to update the /etc/aliases file and everyone will be "updated"
immediately.  But I need to know if there's any way to tell sendmail
to execute "myprog" multiple times, once for each user receiving the
mail, executing as that user's UID.

Any and all help will be greatly appreciated.  If possible, please

Thanks,
  Craig Steiner

2. Strange DNS on Solaris 2.4

3. Sendmail forwards returned mail to postmaster

4. matroxfb_base.c - not a so little patch

5. Sendmail CANNOT forward mail decently

6. Unrecognized chars with remapped keyboard

7. mail forwarding with sendmail

8. printer error

9. sendmail mail forwarding

10. Forwarding mail using sendmail

11. forwarding all mail through sendmail to another machine

12. configuring sendmail to forward to another mail server

13. Forwarding mail from sendmail to Exchange server