You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Clive Tonge <cv...@sympatico.ca> on 2004/02/27 23:03:59 UTC

Sending an email from the server

How do I generate a email from a script on the server to James.

I would like my backup script to inform me if  it worked or not each night.

An example would be greatly appreciated.

Thanks
Clive


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: Sending an email from the server

Posted by "Noel J. Bergman" <no...@devtech.com>.
> When I was evaluating james, I didn't want to touch a working sendmail
> configuration. I saw the james/sendmail doc, and immediately dismissed
> james. I discovered over time some tricks to 'try' things without
> touching sendmail.

You mean, like assigning different ports?  :-)  I do that for some of my
own, e.g., for a dedicated James instance that is programmed to handle
automated replies for a particular organization.  It runs on my build
server, so I kept it isolated from any other things I might be doing with
James.

> There have been some good suggestions over the last day on this topic.
> I'd like to see them in the documentation, so that newbies (like I was
> once) don't potentially get scared off.

Please feel free to submit a documentation patch, or contribute to the wiki
(http://wiki.apache.org/james).

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: Sending an email from the server

Posted by Gary Smart <ga...@acslink.net.au>.
When I was evaluating james, I didn't want to touch a working sendmail
configuration. I saw the james/sendmail doc, and immediately dismissed
james. I discovered over time some tricks to 'try' things without
touching sendmail. 

There have been some good suggestions over the last day on this topic.
I'd like to see them in the documentation, so that newbies (like I was
once) don't potentially get scared off.

Gary.


-----Original Message-----
From: Noel J. Bergman [mailto:noel@devtech.com] 
Sent: Sunday, 29 February 2004 4:28 PM
To: James Users List
Subject: RE: Sending an email from the server


> just in case everyone contributing to this discussion hasn't read it I

> wrote this: http://james.apache.org/james_and_sendmail.html
> specifically to address the needs of people who have multiple local
> users and want to replace sendmail with James [but] still retain the
> scriptable "mail" command

Your document is what I had used to setup my systems.  Worked fine.  :-)
I just needed a simple matcher to pick up root mail and forward to my
James id.

> The perl script sounds like a good idea though, I should check it out.

Yup.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: Sending an email from the server

Posted by "Noel J. Bergman" <no...@devtech.com>.
> just in case everyone contributing to this discussion hasn't read it
> I wrote this:
> http://james.apache.org/james_and_sendmail.html
> specifically to address the needs of people who have multiple local
> users and want to replace sendmail with James [but] still retain the
> scriptable "mail" command

Your document is what I had used to setup my systems.  Worked fine.  :-)  I
just needed a simple matcher to pick up root mail and forward to my James
id.

> The perl script sounds like a good idea though, I should check it out.

Yup.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: Sending an email from the server

Posted by Danny Angus <da...@apache.org>.
just in case everyone contributing to this discussion hasn't read it I wrote this:
http://james.apache.org/james_and_sendmail.html
specifically to address the needs of people who have multiple local users and want to replace sendmail with James for handling email routing and delivery but still retain the scriptable "mail" command support of sendmail so as not to break all the mail generated by software on the box.

The perl script sounds like a good idea though, I should check it out.

d.

> -----Original Message-----
> From: Noel J. Bergman [mailto:noel@devtech.com]
> Sent: 29 February 2004 07:27
> To: James Users List
> Subject: RE: Sending an email from the server
> 
> 
> > for those who have sendmail installed (but don't use it) and want to
> > receive local 'root' email.
> 
> > I just created a 'root' account in james (adduser root)
> 
> Simiarly, I just use a matcher to pick it up and forward.
> 
> 	--- Noel
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: Sending an email from the server

Posted by "Noel J. Bergman" <no...@devtech.com>.
> for those who have sendmail installed (but don't use it) and want to
> receive local 'root' email.

> I just created a 'root' account in james (adduser root)

Simiarly, I just use a matcher to pick it up and forward.

	--- Noel

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: Sending an email from the server

Posted by Gary Smart <ga...@acslink.net.au>.
Hi. Just thought I'd throw in my 2c worth for those who have sendmail
installed (but don't use it) and want to receive local 'root' email. I
thought this would be complicated, but it wasn't. - I just created a
'root' account in james (adduser root), and like magic (well, as long as
james is running), I receive all cron, logwatch, etc (including 'mail
root') emails.

Gary.

-----Original Message-----
From: Clive Tonge [mailto:cvt.news@sympatico.ca] 
Sent: Saturday, 28 February 2004 10:01 PM
To: James Users List
Subject: Re: Sending an email from the server


I am posting this to the James Users List in case others may find it
useful.

The problem: To send an email, from a script, on a Linux machine, 
through James, to local users.

The normal solution: Use mail to send the email. This doesn't work 
because mail is mapped to sendmail, which isn't installed because I am 
using James.  Note: this can be changed in mail with the sendmail 
command. But, I didn't understand how the command worked, so I left it 
alone..

Final Solution: Installed the utility SendEmail.  SendEmail is a perl 
script that will send an email to an SMTP server from a command line or 
script. It defaults to localhost port 25. Files can be attached, 
multiple recipients, cc: and bcc are supported.

The latest version of SendEmail can be obtained at:

http://caspian.dotconf.net/menu/Software/SendEmail/

The documentation was sparse, (the whole program is only 15 k) but the 
README file covered everything.  Two things to note: the README is 
written with \ (slashes) separating the options, in the examples, they 
aren't required. And to get the script to run correctly after it is 
installed, log off and back on.

Thanks Danny Angus for your help.

Sincerely,
Clive Tonge




---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: Sending an email from the server

Posted by Clive Tonge <cv...@sympatico.ca>.
I am posting this to the James Users List in case others may find it useful.

The problem: To send an email, from a script, on a Linux machine, 
through James, to local users.

The normal solution: Use mail to send the email. This doesn't work 
because mail is mapped to sendmail, which isn't installed because I am 
using James.  Note: this can be changed in mail with the sendmail 
command. But, I didn't understand how the command worked, so I left it 
alone..

Final Solution: Installed the utility SendEmail.  SendEmail is a perl 
script that will send an email to an SMTP server from a command line or 
script. It defaults to localhost port 25. Files can be attached, 
multiple recipients, cc: and bcc are supported.

The latest version of SendEmail can be obtained at:

http://caspian.dotconf.net/menu/Software/SendEmail/

The documentation was sparse, (the whole program is only 15 k) but the 
README file covered everything.  Two things to note: the README is 
written with \ (slashes) separating the options, in the examples, they 
aren't required. And to get the script to run correctly after it is 
installed, log off and back on.

Thanks Danny Angus for your help.

Sincerely,
Clive Tonge




---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: Sending an email from the server

Posted by Danny Angus <da...@apache.org>.
I *think* "mail" is normally mapped to sendmail, but not always.
Let me know what you find out.

d.
  -----Original Message-----
  From: Clive Tonge [mailto:cvt.news@sympatico.ca]
  Sent: 28 February 2004 17:20
  To: James Users List
  Subject: Re: Sending an email from the server


  Thanks Danny

  I will explore the mail command. I thought that it was part of sendmail. I
don't have sendmail setup.

  Clive

  Danny Angus wrote:

This is not seomthing James can really help you with, James will send the
mail, but your backup script must generate the mail and "send" it to James

What O/S are you using? *nix O/S's have a "mail" command you can use, I
think windows makes you wrestle with MAPI providers and suchlikes.

d

  -----Original Message-----
From: Clive Tonge [mailto:cvt.news@sympatico.ca]
Sent: 27 February 2004 22:04
To: 'James Users List'
Subject: Sending an email from the server


How do I generate a email from a script on the server to James.

I would like my backup script to inform me if  it worked or not
each night.

An example would be greatly appreciated.

Thanks
Clive


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org




Re: Sending an email from the server

Posted by Clive Tonge <cv...@sympatico.ca>.
Thanks Danny

I will explore the mail command. I thought that it was part of sendmail. 
I don't have sendmail setup.

Clive

Danny Angus wrote:

>This is not seomthing James can really help you with, James will send the mail, but your backup script must generate the mail and "send" it to James
>
>What O/S are you using? *nix O/S's have a "mail" command you can use, I think windows makes you wrestle with MAPI providers and suchlikes.
>
>d
>
>  
>
>>-----Original Message-----
>>From: Clive Tonge [mailto:cvt.news@sympatico.ca]
>>Sent: 27 February 2004 22:04
>>To: 'James Users List'
>>Subject: Sending an email from the server
>>
>>
>>How do I generate a email from a script on the server to James.
>>
>>I would like my backup script to inform me if  it worked or not 
>>each night.
>>
>>An example would be greatly appreciated.
>>
>>Thanks
>>Clive
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
>>    
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>For additional commands, e-mail: server-user-help@james.apache.org
>
>
>  
>


RE: Sending an email from the server

Posted by Danny Angus <da...@apache.org>.
This is not seomthing James can really help you with, James will send the mail, but your backup script must generate the mail and "send" it to James

What O/S are you using? *nix O/S's have a "mail" command you can use, I think windows makes you wrestle with MAPI providers and suchlikes.

d

> -----Original Message-----
> From: Clive Tonge [mailto:cvt.news@sympatico.ca]
> Sent: 27 February 2004 22:04
> To: 'James Users List'
> Subject: Sending an email from the server
> 
> 
> How do I generate a email from a script on the server to James.
> 
> I would like my backup script to inform me if  it worked or not 
> each night.
> 
> An example would be greatly appreciated.
> 
> Thanks
> Clive
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org