Thread view

At 12:18 AM 11/15/2001 -0800, you wrote:
>On Wed, 2001-11-14 at 23:59, Alessio Bragadini wrote:
> > barry wrote:
> >
> > > I would like to write a script that will take certain email I receive and
> > > auto submit it to mysite.
> >
> > I've done it for Bender, I need to recheck for Fry where a few things
> > have changed. Doesn't use a HTTP connection, but writes directly into
> > the database.
>I know someone wrote a script to read mbox format files and
>shove them into a Slash site.
> -Brian
That is what I have in mind. Is there an example available before I dive in
and do it (although I guess it is not that tough to do)
Alessio,
I don't want to dump them directly in the database because I want them to
have to be approved - the formatting and content is not entirely
predictable, plus I need to split off the introtext from the rest of it by
hand.
Barry
>--
>_______________________________________________________
>Brian Aker, brian@...
>Slashdot Senior Developer
>Seattle, Washington
>http://tangent.org/~brian/
>Email/Jabber brian@...
>_______________________________________________________
>You can't grep a dead tree.

Yes, this will help if I can get it to run.....
# The idea is, you set this as slash's email filter on the server
# by editing ~slash/.forward to say something like:
# "|/home/slash/mail2slash.pl
# THEN, as root cd to /etc/smrsh and soft-link in mail2slash.pl
# Otherwise the mail will keep bouncing and you will become as crazy
# as I did.
I am getting crazy...
I made a alias mail2slash:
mail2slash: |/home/barry/autoprocess/code/test3.pl
that program test3.pl looks like this:
[root@... code]# more test3.pl
#!/usr/bin/perl -w
open (OUT , ">>~barry/test.out");
print OUT "adfafdadfgsdfgs\n";
with permissions:
[root@... code]# ls -al test3.pl
-rwxr-xr-x 1 root mail 84 Nov 15 11:16 test3.pl
In /etc/I made a link:
[root@... smrsh]# ls -al
total 8
drwxr-xr-x 2 root root 4096 Nov 15 10:55 .
drwxr-xr-x 40 root root 4096 Nov 15 10:24 ..
lrwxrwxrwx 1 root root 37 Nov 15 10:55 test3.pl ->
/home/barry/autoprocess/code/test3.pl
but when I send mail to mail2slash, e.g.
[root@... smrsh]# mail -s test mail2slash [...]
it bounces to root with this message:
The original message was received at Thu, 15 Nov 2001 10:56:46 -0800from
root@... ----- The following addresses had permanent fatal errors
-----|/home/barry/autoprocess/code/test3.pl (reason: service
unavailable) (expanded from: mail2slash) ----- Transcript of session
follows -----smrsh: test3.pl not available for sendmail programs554 5.0.0
|/home/barry/autoprocess/code/test3.pl... Service unavailable
I searched the sendmail man, I searched google/googlegroups. A million
people have had the same issue, and the advice always seems to be what I
have already done.
Any other little pieces missing? Is it a problem that smrsh does not
know/like perl somehow?
Thanks!
Barry
At 09:18 AM 11/15/2001 -0500, shane wrote:
>At 12:18 AM 11/15/2001 -0800, Brian Aker wrote:
>>On Wed, 2001-11-14 at 23:59, Alessio Bragadini wrote:
>> > barry wrote:
>> >
>> > > I would like to write a script that will take certain email I
>> receive and
>> > > auto submit it to mysite.
>> >
>> > I've done it for Bender, I need to recheck for Fry where a few things
>> > have changed. Doesn't use a HTTP connection, but writes directly into
>> > the database.
>>I know someone wrote a script to read mbox format files and
>>shove them into a Slash site.
>> -Brian
>
>Is this what you're thinking of?
>
><URL: http://www.lottadot.com/files/mail2slash.txt >
>
>
>
>_______________________________________________
>Slashcode-general mailing list
>Slashcode-general@...
>https://lists.sourceforge.net/lists/listinfo/slashcode-general

Hi Barry,
I just subscribed to the mailing list so I missed the beginning of the
thread. What do you need to do? (I know about the archives, but don't
have much time now to read them - if you can provide a summary that'd be
great :-)
I got working the following: e-mails sent to submit@... get
processed by a small script that sends the message to the submissions
section of the Slash site. Then an author goes there, previews the story
and then posts it. It is also possible to post without going through
moderation, but I haven't done that yet.
My MTA is Exim but Sendmail would work as well. submit@... is
handled through a system-wide alias (/etc/aliases).
Cheers,
Eloy.-
On Thu, Nov 15, 2001 at 11:23:35AM -0800, barry wrote:
> Yes, this will help if I can get it to run.....
>
> # The idea is, you set this as slash's email filter on the server
> # by editing ~slash/.forward to say something like:
> # "|/home/slash/mail2slash.pl
> # THEN, as root cd to /etc/smrsh and soft-link in mail2slash.pl
> # Otherwise the mail will keep bouncing and you will become as crazy
> # as I did.
>
> I am getting crazy...
>
> I made a alias mail2slash:
>
> mail2slash: |/home/barry/autoprocess/code/test3.pl
>
> that program test3.pl looks like this:
>
> [root@... code]# more test3.pl
> #!/usr/bin/perl -w
> open (OUT , ">>~barry/test.out");
> print OUT "adfafdadfgsdfgs\n";
>
> with permissions:
>
> [root@... code]# ls -al test3.pl
> -rwxr-xr-x 1 root mail 84 Nov 15 11:16 test3.pl
>
> In /etc/I made a link:
> [root@... smrsh]# ls -al
> total 8
> drwxr-xr-x 2 root root 4096 Nov 15 10:55 .
> drwxr-xr-x 40 root root 4096 Nov 15 10:24 ..
> lrwxrwxrwx 1 root root 37 Nov 15 10:55 test3.pl ->
> /home/barry/autoprocess/code/test3.pl
>
> but when I send mail to mail2slash, e.g.
> [root@... smrsh]# mail -s test mail2slash [...]
>
> it bounces to root with this message:
>
> The original message was received at Thu, 15 Nov 2001 10:56:46 -0800from
> root@... ----- The following addresses had permanent fatal errors
> -----|/home/barry/autoprocess/code/test3.pl (reason: service
> unavailable) (expanded from: mail2slash) ----- Transcript of session
> follows -----smrsh: test3.pl not available for sendmail programs554 5.0.0
> |/home/barry/autoprocess/code/test3.pl... Service unavailable
>
>
> I searched the sendmail man, I searched google/googlegroups. A million
> people have had the same issue, and the advice always seems to be what I
> have already done.
>
> Any other little pieces missing? Is it a problem that smrsh does not
> know/like perl somehow?
>
> Thanks!
>
> Barry
>
>
> At 09:18 AM 11/15/2001 -0500, shane wrote:
> >At 12:18 AM 11/15/2001 -0800, Brian Aker wrote:
> >>On Wed, 2001-11-14 at 23:59, Alessio Bragadini wrote:
> >>> barry wrote:
> >>>
> >>> > I would like to write a script that will take certain email I
> >>receive and
> >>> > auto submit it to mysite.
> >>>
> >>> I've done it for Bender, I need to recheck for Fry where a few things
> >>> have changed. Doesn't use a HTTP connection, but writes directly into
> >>> the database.
> >>I know someone wrote a script to read mbox format files and
> >>shove them into a Slash site.
> >> -Brian
> >
> >Is this what you're thinking of?
> >
> ><URL: http://www.lottadot.com/files/mail2slash.txt >
> >
> >
> >
> >_______________________________________________
> >Slashcode-general mailing list
> >Slashcode-general@...
> >https://lists.sourceforge.net/lists/listinfo/slashcode-general