howto send mail from shell [message #118810] |
Fri, 23 January 2015 10:01  |
xray
Messages: 14 Registered: June 2014 Location: Düsseldorf
|
|
|
|
Hi, is it possible to send mails by shell from the Kerio?
e.g.:
# > mail -s "Message TXT" alias<_at_>domain.gov
regards Jens
|
|
|
Re: howto send mail from shell [message #118812 is a reply to message #118810] |
Fri, 23 January 2015 12:38   |
freakinvibe
Messages: 588 Registered: April 2004
|
|
|
|
In the windows version, there is a tool in the MailServer folder:
sendmail.exe
With that command line tool, you can send emails. I guess there will be something similar under Linux and OSX.
The command line options are:
sendmail utility for Kerio Connect (c) Kerio Technologies s.r.o. All rights reserved.
Usage: sendmail [options] [recipient] [recipient] ...
Mail header and body are read from input,
header and body are divided by an empty line
The following options are recognized:
-B body_type (ignored)
The message body MIME type: 7BIT or 8BITMIME.
-F full_name
Set the sender full name. This is used only with messages
that have no From: message header.
-N dsn
Delivery status notification control: SUCCESS, FAILURE,
DELAY, NEVER and combinations divided by ','
-a address
SMTP server address. The default address is 127.0.0.1. You
can specify antoher than the default port (25) by adding
':port', for example 127.0.0.1:2525
-bm (ignored)
Read mail from standard input and arrange for delivery. This
is the default mode of operation.
-f sender
Set the envelope sender address. This is the address where
delivery problems are sent to, unless the message contains
an Errors-To: message header.
-i
When reading a message from standard input, don't treat
a line with only a . character as the end of input.
-oi
When reading a message from standard input, don't treat
a line with only a . character as the end of input.
-o x value (ignored)
Set option x to value.
-p password
Password for SMTP authentication
-r sender
Set the envelope sender address. This is the address where
delivery problems are sent to, unless the message contains
an Errors-To: message header.
-t (ignored)
Extract recipients from message headers. This requires that
no recipients be specified on the command line.
-u user_name
User name for SMTP authentication
-v
Enable verbose logging for debugging purposes. Multiple -v
options make the software increasingly verbose. For
compatibility with sendmail, mailx and other mail submission
software, a single -v option produces no output.
-L tag (ignored)
Set the identifier used in syslog messages to the supplied tag.
-O option=value (ignored)
Set option option to the specified value. This form uses long
names.
--
Delimits options. Following arguments (if any) are treated as
recipients, even if they begin with '-'.
Dexion Services AG - IT Support Services in Basel, Switzerland
https://dexionag.ch
|
|
|
|
|
|
Re: howto send mail from shell [message #118819 is a reply to message #118817] |
Fri, 23 January 2015 14:44   |
clan
Messages: 187 Registered: May 2011
|
|
|
|
sendmail is there, just not installed where it belongs: try /opt/kerio/mailserver/sendmail.
One way to make it available is creating a symbolic link to /usr/bin/sendmail, other solutions depend on your distribution. Just a few days ago there was a thread about using the alternatives command on Fedora or Redhat in this forum, the search should finde it.
|
|
|
|
Re: howto send mail from shell [message #119062 is a reply to message #118823] |
Tue, 03 February 2015 13:40   |
xray
Messages: 14 Registered: June 2014 Location: Düsseldorf
|
|
|
|
Sorry but the KB article is not the right for Kerio Connect 8 on Linux. How can I send a mail from shell.
e.g.:
echo "Message TXT" | mail admin@youdomian.com or mail -s "Message TXT" admin<_at_>youdomian.com
|
|
|
|
|
|
Re: howto send mail from shell [message #153420 is a reply to message #119150] |
Tue, 27 December 2022 12:05  |
linuxoid
Messages: 4 Registered: July 2020
|
|
|
|
ln -s /opt/kerio/mailserver/sendmail /usr/sbin/sendmail
sendmail -F sender@domain.com -u sender@domain.com -p password receiver<_at_>domain.com
Sends an empty email. But I couldn't send a message.
|
|
|