GFI Software

Welcome to the GFI Software community forum! For support please open a ticket from https://support.gfi.com.

Home » GFI User Forums » Kerio Connect » howto send mail from shell
howto send mail from shell [message #118810] Fri, 23 January 2015 10:01 Go to next message
xray is currently offline  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 Go to previous messageGo to next message
freakinvibe is currently offline  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 #118815 is a reply to message #118812] Fri, 23 January 2015 12:59 Go to previous messageGo to next message
xray is currently offline  xray
Messages: 14
Registered: June 2014
Location: Düsseldorf
Thank you for your tip. I have a Linux Kerio installation, sendmail does not exist on this. Can I install it without affecting for Kerio?
Re: howto send mail from shell [message #118817 is a reply to message #118815] Fri, 23 January 2015 13:37 Go to previous messageGo to next message
freakinvibe is currently offline  freakinvibe
Messages: 588
Registered: April 2004
Installing sendmail would be overkill and might break stuff. Maybe the tool is already there, you just have to find it.

Hopefully a Linux specialist can help here.


Dexion Services AG - IT Support Services in Basel, Switzerland
https://dexionag.ch
Re: howto send mail from shell [message #118818 is a reply to message #118817] Fri, 23 January 2015 14:41 Go to previous messageGo to next message
xray is currently offline  xray
Messages: 14
Registered: June 2014
Location: Düsseldorf
#find / -name sendmail

/opt/kerio/mailserver/sendmail
Re: howto send mail from shell [message #118819 is a reply to message #118817] Fri, 23 January 2015 14:44 Go to previous messageGo to next message
clan is currently offline  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 #118823 is a reply to message #118810] Fri, 23 January 2015 19:08 Go to previous messageGo to next message
Kerio/GFI Brian is currently offline  Kerio/GFI Brian
Messages: 852
Registered: March 2004
Location: California
There is a KB article to address this: http://kb.kerio.com/364

Brian Carmichael
Instructional Content Architect
Re: howto send mail from shell [message #119062 is a reply to message #118823] Tue, 03 February 2015 13:40 Go to previous messageGo to next message
xray is currently offline  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 #119128 is a reply to message #119062] Thu, 05 February 2015 17:52 Go to previous messageGo to next message
lkacian is currently offline  lkacian
Messages: 79
Registered: May 2010
Location: Slovak Republic

Simply install postfix and configure it to listen only at localhost (inet_interfaces = localhost in main.cf. Disable SMTP service for Kerio on localhost.
Re: howto send mail from shell [message #119138 is a reply to message #119128] Thu, 05 February 2015 21:07 Go to previous messageGo to next message
xray is currently offline  xray
Messages: 14
Registered: June 2014
Location: Düsseldorf
Where can I disable SMTP service for Kerio on localhost. In KerioConnect Administration I'm not able to find the option.
Re: howto send mail from shell [message #119150 is a reply to message #119138] Fri, 06 February 2015 07:30 Go to previous messageGo to next message
Kedar
Messages: 356
Registered: April 2005
Go to Services, select SMTP and change selected IP addresses for this service.
Re: howto send mail from shell [message #153420 is a reply to message #119150] Tue, 27 December 2022 12:05 Go to previous message
linuxoid is currently offline  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.
Previous Topic: SpamAssassin 4.0.0 released
Next Topic: Größe des öffentlichen Ordners ändern
Goto Forum:
  


Current Time: Wed Mar 22 23:23:28 CET 2023

Total time taken to generate the page: 0.01834 seconds