Frank Tegtmeyer | 31 May 2003 17:16
X-Face
Picon

Re: My ISP doesn't relay my e-mail's

Luciano Schirmer Silveira <lss01 <at> terra.com.br> writes:

> I made maildirserial suid root so that I can call the script as normal user.

Better to use some kind of trigger to let this script start.

Easy to use: presence of a file, available data in a named pipe,
incoming mail for a special alias, ...

Regards, Frank

Luciano Schirmer Silveira | 5 Jun 2003 05:30
Picon
Favicon

Re: My ISP doesn't relay my e-mail's

I'm working on it, but to say the truth, that script doesn't work!!
I don't know what happens. The script is:

--------------------------

#!/bin/sh
for i in /var/qmail/alias/pppdir/new/*
do
        perl -pi -e 's/^Return-Path:.*/Return-Path: <mylogin\ <at> superig.com.br>/' $i
done

/usr/local/bin/maildirsmtp ~alias/pppdir alias-ppp- smtp.superig.com.br superig.com.br

cowsay "Your mail was sent!!!"    # a cute cow say that the mail is sent :)

--------------------------

The problem is that it runs the perl part for every file in
~alias/pppdir/new/, then it does not send the e-mail using the
maildirsmtp line, but it runs the cowsay line.

If I change the perl part by another thing like an 'echo' command, the
e-mails are sent correctly. Seems like perl is fu**ing it all!!

I'd appreciate more details about a way of triggering. Any information
is welcome.

Thanks for now!!

On Sat, 2003-05-31 at 12:16, Frank Tegtmeyer wrote:
(Continue reading)

Frank Tegtmeyer | 5 Jun 2003 11:21
X-Face
Picon

Re: My ISP doesn't relay my e-mail's

Luciano Schirmer Silveira <lss01 <at> terra.com.br> writes:

> I'm working on it, but to say the truth, that script doesn't work!!
> The problem is that it runs the perl part for every file in
> ~alias/pppdir/new/, then it does not send the e-mail using the
> maildirsmtp line, but it runs the cowsay line.

You don't run the script as user alias. Maybe the files are owned by
the other user after running the script. Did you check this?

> e-mails are sent correctly. Seems like perl is fu**ing it all!!

You simply have to run the script as user alias. It will work.

> I'd appreciate more details about a way of triggering. Any information
> is welcome.

Example for using a named pipe:

Create a named pipe somewhere (for example in /var/qmail) that is
readable by alias and writeable for everyone who needs to trigger the
sending of mail (for example group users):

mkfifo /var/qmail/sendtrigger
chown alias.users /var/qmail/sendtrigger
chmod 420 /var/qmail/sendtrigger

Then create a new command script 'sendnow' in /usr/local/bin
(*not* setuid):

(Continue reading)

clemens fischer | 5 Jun 2003 12:22

Re: My ISP doesn't relay my e-mail's

Frank Tegtmeyer <fte-sub-serialmail <at> fte.to>:

> #!/bin/sh
> echo 'go' > /var/qmail/sendtrigger
>
> This script does nothing besides writing to the pipe.
>
> Now you can use the sendnow command to trigger the sending of mail.

note that it will most propably block when there's no reader on the
other side of the pipe.  you _could_ add an `&' at the end of the line
with the little risk of races in edge cases that might not even be of
interest.  like running an uneven number of sendtrigger writers and
readers causing extra runs of the serialmail?

  clemens

clemens fischer | 5 Jun 2003 11:16

Re: My ISP doesn't relay my e-mail's

Luciano Schirmer Silveira <lss01 <at> terra.com.br>:

>         perl -pi -e 's/^Return-Path:.*/Return-Path: <mylogin\ <at> superig.com.br>/' $i
>
> /usr/local/bin/maildirsmtp ~alias/pppdir alias-ppp- smtp.superig.com.br superig.com.br

doesn't maildirsmtp remove/rewrite the Return-Path automatically,
ie. remove the prefix by itself?  i never had to fiddle with that
header.

  clemens

Frank Tegtmeyer | 5 Jun 2003 11:53
X-Face
Picon

Re: My ISP doesn't relay my e-mail's

"clemens fischer" <ino-qc <at> spotteswoode.de.eu.org> writes:

> doesn't maildirsmtp remove/rewrite the Return-Path automatically,
> ie. remove the prefix by itself?  i never had to fiddle with that
> header.

No, Return-Path is not touched. The last Delivered-To is adjusted.

Of course the whole problem could be solved by setting the correct
values in the MUA, but who knows if this is possible.

Regards, Frank


Gmane