Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DBMail: users

dbmail running scripts on emails

 

 

DBMail users RSS feed   Index | Next | Previous | View Threaded


gcarlos1 at gmail

Sep 28, 2009, 5:58 PM

Post #1 of 3 (171 views)
Permalink
dbmail running scripts on emails

Hello,

I was wondering if someone could help me out. I am trying to run a script
every time I receive a email using dbmail.

Paul J Stevens pointed me to this page
http://www.dbmail.org/dokuwiki/doku.php/setup_postfix but I am still having
problems.
Right now I am running a simple test script to see it work.

This is the content of the autoreply.rb script that I have placed in root
(/), permissions are set to read, write, exec for everyone:
#!/bin/sh
touch /testfile

I first created a users then I added the pipe command to the alias.

This is the command I am using to set the alias:
dbmail-users -x wiki[at]mydomain.com -t "| /autoreply.rb"

This is what the entry looks like in the db:

45 | wiki[at]mydomain.com | | /autoreply.rb | 0 |

This is the only error I see in the logs:
Sep 29 00:33:20 me dbmail/lmtpd[6100]: Error:[delivery]
pipe.c,send_mail(+188): sendmail error return value was [1]

Thanks for your help.

--
Guille
http://twitter.com/guillec


paul at nfg

Sep 29, 2009, 2:42 AM

Post #2 of 3 (159 views)
Permalink
Re: dbmail running scripts on emails [In reply to]

Guille Carlos wrote:
> This is the content of the autoreply.rb script that I have placed in
> root (/), permissions are set to read, write, exec for everyone:
> #!/bin/sh
> touch /testfile

What planet are you from? Don't install *anything* in /! Major culture
shock :-)

This is a permission problem. The postfix user is not allowed to create
a file in /. Move the script to a safer location like /usr/local/bin,
and have it touch a file in /tmp/ instead.



--
________________________________________________________________
Paul Stevens paul at nfg.nl
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands________________________________http://www.nfg.nl
_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail


g at guillecarlos

Sep 29, 2009, 2:04 PM

Post #3 of 3 (155 views)
Permalink
Re: dbmail running scripts on emails [In reply to]

According to my family I was born on Earth, which might actually explain a
lot :)
Anyways thanks everything is rolling!!!!

On Tue, Sep 29, 2009 at 5:42 AM, Paul J Stevens <paul[at]nfg.nl> wrote:

> Guille Carlos wrote:
> > This is the content of the autoreply.rb script that I have placed in
> > root (/), permissions are set to read, write, exec for everyone:
> > #!/bin/sh
> > touch /testfile
>
> What planet are you from? Don't install *anything* in /! Major culture
> shock :-)
>
> This is a permission problem. The postfix user is not allowed to create
> a file in /. Move the script to a safer location like /usr/local/bin,
> and have it touch a file in /tmp/ instead.
>
>
>
> --
> ________________________________________________________________
> Paul Stevens paul at nfg.nl
> NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
> The Netherlands________________________________http://www.nfg.nl
>



--
Guille
http://guillecarlos.com
http://twitter.com/guillec
http://awayfind.com/guille

DBMail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.