mail from linux prompt

Gunnar Wrobel wrobel at pardus.de
Tue Dec 15 10:07:02 CET 2009


Quoting Naresh Kumar <nksharma74 at gmail.com>:

> Hi Gunnar,   Earlier I was using
> /usr/bin/mail which didn't work but /kolab/sbin/sendmail works fine
> but doesn't allow me to add "Subject" !

The subject needs to be part of the file you are piping into sendmail.  
The file could look like this for example:

Sender: someone at example.org
From: someone at example.org
To: somebody at example.org
Subject: test

test
.


> and how do I attach files to with it ?

There certainly exist command line tools that will generate a proper  
MIME mail that you can pipe into sendmail. But I have no suggestion  
here. You'd need to search for one.

I get the impression though that you expect too much from sendmail. It  
just does the mail processing. It does not help you to generate a  
mail. You pipe input into it and it delivers it. It does not care much  
for the input though.

Cheers,

Gunnar

> Regards, Naresh




>    From: Gunnar Wrobel
> <wrobel at pardus.de[1]>
> To: kolab-users at kolab.org[2]
> Date: Fri, 11 Dec 2009 09:55:01 +0100
> Subject: Re: mail from linux prompt
>  Quoting Naresh Kumar < href=\"mailto:nksharma74 at gmail.com\"
onclickxsscleaned=\"return
> top.js.OpenExtLink(window,event,this)\">nksharma74 at gmail.com>:
>
>   0px 0px 0px 0.8ex; padding-left: 1ex;\" class=\"gmail_quote\">I
have
> another query now. How
> can I send an email from prompt using postfix. I have written a
> script to monitor system health and kolab usage. I want to send the
> output of this script to myself via email. I could do it easily
> with
> sendmail using mail/mailx but with postfix I am missing something !

The postfix of the Kolab server provides a sendmail wrapper at
/kolab/sbin/sendmail. That one should usually works. Does it fail
somehow? Something specific in the logs if you try to use it?

Cheers,

Gunnar

-- 
Regards,

Naresh Kumar

Live simply.Love generously.Care deeply.Speak kindly.LEAVE THE REST
TO GOD

To know that we know what we know, and that we do not know what we do
not know, is the first step on the road to success.

-- 
______ http://kdab.com _______________ http://kolab-konsortium.com _

p at rdus Kolab work is funded in part by KDAB and the Kolab Konsortium

____ http://www.pardus.de _________________ http://gunnarwrobel.de _
E-mail : p at rdus.de                                 Dr. Gunnar Wrobel
Tel.   : +49 700 6245 0000                          Bundesstrasse 29
Fax    : +49 721 1513 52322                          D-20146 Hamburg
--------------------------------------------------------------------
    >> Mail at ease - Rent a kolab groupware server at p at rdus <<
--------------------------------------------------------------------

Links:
------
[1] mailto:wrobel at pardus.de
[2] mailto:kolab-users at kolab.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digitale PGP-Unterschrift
URL: <http://lists.kolab.org/pipermail/users/attachments/20091215/e2d6ba16/attachment.sig>


More information about the users mailing list